Running RetrieveCertificate

The RetrieveCertificate sample application request a certificate from an Entrust Certificate Authority.

To run this sample application, execute the following command line in the etjava/examples directory.

java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.pkcs10.RetrieveCertificate <ca_ip> <ca_port> <epf_file> <epf_pwd> <ref> <code> <cert_def> <p10_file> <x509_file>

Parameter

Value

<ca_ip>

The hostname or IP address of an Entrust Certification Authority.

<ca_port>

The port for accessing the Entrust Certification Authority.

<epf_file>

The path of an Entrust user profile in .epf file format.

<epf_pwd>

The password for accessing the Entrust profile.

<ref>

The reference number of the Entrust user for which the certificate is requested.

<code>

The authorization code of the Entrust user for which the certificate is requested.

<cert_def>

The name of the certificate definition. This value associates a policy with the certificate.

<p10_file>

The path of an input file containing the PKCS #10 certificate request. The Entrust Certificate Authority will ignore the subject's DN in this request.

<x509_file>

The path of an output file for saving the issued X.509 certificate.

For example:

C:\etjava\examples>java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.pkcs10.RetrieveCertificate cdwood-70 829 "First Officer.epf" Password! 66404084 RXJ6-SVBN-48WE Verification MyUser.p10 MyUser.cer
 
Installing JCA providers... DONE
Retrieving certificate... DONE
 
 
Certificate in X.509 format written to: C:\etjava\examples\MyUser.cer
 
Recieved Certificate:
 
Version: 3
Serial number: 1066404085
Signature algorithm: sha1WithRSAEncryption
Issuer: cn=ca,o=entrust,c=ca
Valid not before: Thu May 12 15:12:47 EDT 2005
not after: Mon May 12 15:42:47 EDT 2008
Subject: cn=May1205-02 May1205-02,cn=ca,o=entrust,c=ca
public exponent: 10001
modulus: 95a108d2508efb7785088d8c1ff30a88e6fb9bc37277ec42aa620e1c8fd034ee0229357
29266ec75f3a0e69ae4ad46a715f6c052a320f1a457e798e5ac86b2b8e61d1d2b160dc518b1d4efc
3403442cb08ec03b53b95e05ac2eace84d3b6bd1476c5ffc6c4093e9373a17b3caacd5316dc8bf54
394b94fb4381a6fae2af652a5
 
Extension 1: not critical AuthorityKeyIdentifier
KeyIdentifier: F7:5B:A4:0F:AD:4A:00:C2:CA:34:BD:C6:A4:D0:5E:87:26:36:9F:26
 
Extension 2: not critical EntrustVersInfo
version: V7.0 00001101
 
Extension 3: not critical CRLDistributionPoints
DistributionPoint: directoryName: cn=CRL2,cn=ca,o=entrust,c=ca
 
Extension 4: not critical BasicConstraints
CA: no
 
Extension 5: not critical PrivateKeyUsagePeriod
not before: Thu May 12 15:12:47 EDT 2005
not after : Mon Jun 18 19:42:47 EDT 2007
 
Extension 6: not critical KeyUsage
digitalSignature
 
Extension 7: not critical SubjectKeyIdentifier
CB:96:8D:76:D0:BD:C6:F8:FB:98:2F:B1:45:2D:35:8B:B5:CD:5B:9C
 
Certificate Fingerprint: 07:61:56:EF:F8:BF:12:4F:35:75:66:8F:EF:11:24:C6