pki
Class PKICert

java.lang.Object
  |
  +--pki.PKICert

public class PKICert
extends java.lang.Object

This class issues certificates.

Version:
$Id: PKICert.java,v 1.12 2003/12/16 08:36:58 tk4 Exp $
Author:
Thomas Kriegelstein

Field Summary
(package private)  char[] carr
           
(package private)  pki.PKIDatabase data
           
static boolean debug
           
(package private)  java.security.KeyStore ks
           
(package private)  java.util.Properties settings
           
 
Constructor Summary
PKICert(java.util.Properties settings)
          Initializes this certification object.
 
Method Summary
 java.security.cert.X509Certificate createCertificate(java.math.BigInteger serial, java.security.PublicKey pk, char[] keypasswd)
          Creates a certificate relative to the person certificate with the given serial number.
 java.security.cert.X509Certificate createCertificate(java.security.cert.X509Certificate person, java.security.PublicKey pk, char[] keypasswd)
          Creates a certificate relative to a given person certificate.
 java.security.cert.X509Certificate createPersonCertificate(java.security.PublicKey pk, java.util.Properties p, char[] keypasswd)
          Creates a person certificate and stores it into the database.
 void setDatabase(pki.PKIDatabase data)
          Registers the database object.
 boolean start()
          Starts the certification object by loading the keystore.
 void stop()
          Stops the certificate object.
 boolean testCertificate(java.security.cert.X509Certificate cert)
          Checks a certificate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug

settings

java.util.Properties settings

data

pki.PKIDatabase data

ks

java.security.KeyStore ks

carr

char[] carr
Constructor Detail

PKICert

public PKICert(java.util.Properties settings)
Initializes this certification object.

Parameters:
settings - the PKI settings
Method Detail

stop

public void stop()
Stops the certificate object.


start

public boolean start()
Starts the certification object by loading the keystore.

Returns:
true, if starting was successful, false otherwise

setDatabase

public void setDatabase(pki.PKIDatabase data)
Registers the database object.

Parameters:
data - the database object

testCertificate

public boolean testCertificate(java.security.cert.X509Certificate cert)
Checks a certificate.

Parameters:
cert - the certificate to check
Returns:
true, if the certificate is valid, false otherwise

createPersonCertificate

public java.security.cert.X509Certificate createPersonCertificate(java.security.PublicKey pk,
                                                                  java.util.Properties p,
                                                                  char[] keypasswd)
Creates a person certificate and stores it into the database.

Parameters:
pk - the public key to certify
p - the properties of the certificate (the elements of a X.509 Distinguished Name)
keypasswd - the password for the private keystore
Returns:
the generated X.509 certificate

createCertificate

public java.security.cert.X509Certificate createCertificate(java.math.BigInteger serial,
                                                            java.security.PublicKey pk,
                                                            char[] keypasswd)
Creates a certificate relative to the person certificate with the given serial number.

Parameters:
serial - the serial number of the person certificate
pk - the public key to certify
keypasswd - the password of the private keystore
Returns:
the generated X.509 certificate

createCertificate

public java.security.cert.X509Certificate createCertificate(java.security.cert.X509Certificate person,
                                                            java.security.PublicKey pk,
                                                            char[] keypasswd)
Creates a certificate relative to a given person certificate.

Parameters:
person - the person certifiate
pk - the public key to certify
keypasswd - the password for the private key store
Returns:
the generated X.509 certificate


Copyright © 2003 DRIM Team. All Rights Reserved.