All Packages Class Hierarchy This Package Previous Next Index
Class semper.certificate.CAServer
java.lang.Object
|
+----java.lang.Thread
|
+----semper.certificate.CAServer
- public class CAServer
- extends Thread
- implements ComPointConstants
-
CAServer(String, ComPoint)
-
-
allEntriesInArchive()
-
-
getFilledTemplate(ComPoint)
- Get filled Template from client.
-
getLocalCertificates(Certificate)
- getLocalCertificates retrieves a selection of local certificates (from
the local archive).
-
installRegistration(Registration)
- Store registration in Archive under special access name.
-
Interrupt(int)
-
-
run()
-
-
sendCertificate(ComPoint)
- sendCertificate is a advanced version of sendIssuedCertificate.
-
sendError(ComPoint, String)
- Send error: Send an error to the opposite side.
-
sendIssuedCertificate(ComPoint)
- Send issued Certificate to client.
-
sendTemplate(ComPoint)
- Send Template to myClient.
-
sendTrustedPK(ComPoint)
- Send trusted public key to myClient.
-
storeCertificate(Certificate)
- Store certificate in Archive.
CAServer
public CAServer(String str,
ComPoint caComPoint) throws CertificateException, RuntimeException
run
public void run()
- Overrides:
- run in class Thread
sendTrustedPK
public void sendTrustedPK(ComPoint comPoint) throws CertificateException
- Send trusted public key to myClient. The trusted public key is the public key of
the CA which is not certified. This key is simply sent to the client with
no protection at all. This is a reply to a call of getTrustedPK at the client side.
- Parameters:
- myClient: - The client, that sent a getTrustedPK request and
therefore shall get my trusted public key as requested.
- Throws: CertificateException
- if communication fails.
- See Also:
- getTrustedPK
sendTemplate
public synchronized void sendTemplate(ComPoint comPoint) throws CertificateException
- Send Template to myClient. This method is synchronised in order to avoid
two different templates getting the same serial number. The client request
a Template using sendTemplateRequest.
- Parameters:
- myClient: - The client, that sent a getTemplateRequest and therefore
shall get a template as requested
- Throws: CertificateException
- if a send during this phase fails.
- See Also:
- sendTemplateRequest
getFilledTemplate
public synchronized Template getFilledTemplate(ComPoint comPoint) throws CertificateException
- Get filled Template from client. This method also verifies signature on
template against the public key to be registered (to crosscheck,
whether the user
indeed has access to the secret key which is the counterpart to
the public key in the Template). This metod also computes a designated
name for
the client based on the information in the template (done by module).
This designated name
is sent to the client. The client sends the filled out template using
sendFilledTemplate.
- Parameters:
- myClient: - Client who filled out Template.
- Returns:
- the filled out template if the verification and all communication
succeeded. Null otherwise.
- See Also:
- computeDN, sendFilledTemplate
sendIssuedCertificate
public synchronized void sendIssuedCertificate(ComPoint comPoint) throws CertificateException
- Send issued Certificate to client. A user in the process of being
registered can
request a certificate using issueCertificateRequest.
This service first verifies that the client has been registered.
If not an error is
sent to the client. If the user has been registered this service tries to
issue a certificate. Whether this succeeds or not depends on the
preferences set
by the CA.
- Parameters:
- myClient: - Client who sent request to issue Certificate
- Throws: CertificateException
- if send fails.
- See Also:
- getCertificateRequest
sendError
public static void sendError(ComPoint comPoint,
String message) throws CertificateException
- Send error: Send an error to the opposite side. This function
is used to send an error, by first sending an ERROR code and then an error message.
- Parameters:
- comPoint: - comPoint to the other part
- message: - Error Message to be sent
- Throws: CertificateException
- if the error couldn't be sent
installRegistration
public void installRegistration(Registration reg) throws CertificateException
- Store registration in Archive under special access name. This service
has to be called in order to be able to retrieve the Registration later.
The client can use this as well in order to store the registration locally.
- Parameters:
- reg: - the Registration that shall be installed.
- Throws: CertificateException
- if the Archive can't
process the request.
storeCertificate
public static void storeCertificate(Certificate cert) throws CertificateException
- Store certificate in Archive. Can also be used by client.
- Parameters:
- cert: - Certificate to be stored.
- Throws: CertificateException
- if store fails.
getLocalCertificates
public static Vector getLocalCertificates(Certificate partialCert)
- getLocalCertificates retrieves a selection of local certificates (from
the local archive). A partial Certificate, containing null or 0 for unidentified
fields and correct values for the other fields is used as search criteria.
- Parameters:
- partialCert - is the Certificate containing search criteria.
- Returns:
- s a Vector of certificates from the archive matching the search criteria.
sendCertificate
public void sendCertificate(ComPoint comPoint) throws CertificateException
- sendCertificate is a advanced version of sendIssuedCertificate.
It is not maintained for the moment.
It tries to send a list of certificates after receiving a
request from myClient. In order to do so, the client has
to send a partial Certificate, containing null or 0 for unidentified
fields and correct values for the other fields.
- Parameters:
- Client - myClient is the client who sent a getCertificatesRequest.
- Throws: CertificateException
- if the retrieved certifiactes
couldn't be sent to myClient.
Interrupt
public static void Interrupt(int ms)
allEntriesInArchive
public static void allEntriesInArchive()
All Packages Class Hierarchy This Package Previous Next Index