demo.x509.qualified
Class QualifiedCert

java.lang.Object
  |
  +--demo.x509.qualified.QualifiedCert

public class QualifiedCert
extends Object

This class tests the QualifiedCertificate implementation.

A QCStatement is used by indicating that the certificate created in this test is a qualified certificate. The QCStatement is a pricate one implemented by class MyPrivateQCStatement. The corresponding statement ID is registered as indicating a qualyfied certificate. Beside the private statement two further QCStatement objects are added to the certificate, a SemanticsInformation and a second "private" statement only containing a statement ID and no statement info. The biometric data hash calculated for the BiometricInfo extensions is calculated "on the fly" by connecting to the given source data uri. Note that this may not be work when you run the demo because for some reason you may not be able to connect to the URL used. Please change the corresponding code sequence by using a different URL (or, for instance, supplying the data from an input stream).

To avoid the time consuming process of key creation, the issuer certificate and private key are read in from a keystore "jce.keystore" located in the current working directory (if it yet not does exist, please run SetupKeyStore for creating it.

Version:
File Revision 20

Constructor Summary
QualifiedCert()
           
 
Method Summary
 QualifiedCertificate createCertificate(Name subject, PublicKey pk, Name issuer, PrivateKey sk, AlgorithmID algorithm, int serialNumber, V3Extension[] extensions)
          Creates a certificate.
static void main(String[] argv)
          Tests the QualifiedCertificate implementation.
 void start()
          Starts the test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QualifiedCert

public QualifiedCert()
Method Detail

createCertificate

public QualifiedCertificate createCertificate(Name subject,
                                              PublicKey pk,
                                              Name issuer,
                                              PrivateKey sk,
                                              AlgorithmID algorithm,
                                              int serialNumber,
                                              V3Extension[] extensions)
                                       throws Exception
Creates a certificate.

Parameters:
subject - the certificate subject
pk - the subject´s public key to be certified
issuer - the name of the certification authority that issues the certificate
sk - the issuer´s private key for signing the certificate
algorithm - the ID of the signature algorithm
serialNumber - the serial number of the certifcate to be created
extensions - an array of X509v3 extensions to be added to the certificate
Returns:
the certificate just created

start

public void start()
Starts the test.

main

public static void main(String[] argv)
                 throws Exception
Tests the QualifiedCertificate implementation.

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK