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.cerInstalling JCA providers... DONERetrieving certificate... DONECertificate in X.509 format written to: C:\etjava\examples\MyUser.cerRecieved Certificate:Version: 3Serial number: 1066404085Signature algorithm: sha1WithRSAEncryptionIssuer: cn=ca,o=entrust,c=caValid not before: Thu May 12 15:12:47 EDT 2005 not after: Mon May 12 15:42:47 EDT 2008Subject: cn=May1205-02 May1205-02,cn=ca,o=entrust,c=capublic exponent: 10001modulus: 95a108d2508efb7785088d8c1ff30a88e6fb9bc37277ec42aa620e1c8fd034ee022935729266ec75f3a0e69ae4ad46a715f6c052a320f1a457e798e5ac86b2b8e61d1d2b160dc518b1d4efc3403442cb08ec03b53b95e05ac2eace84d3b6bd1476c5ffc6c4093e9373a17b3caacd5316dc8bf54394b94fb4381a6fae2af652a5Extension 1: not critical AuthorityKeyIdentifierKeyIdentifier: F7:5B:A4:0F:AD:4A:00:C2:CA:34:BD:C6:A4:D0:5E:87:26:36:9F:26Extension 2: not critical EntrustVersInfoversion: V7.0 00001101Extension 3: not critical CRLDistributionPointsDistributionPoint: directoryName: cn=CRL2,cn=ca,o=entrust,c=caExtension 4: not critical BasicConstraintsCA: noExtension 5: not critical PrivateKeyUsagePeriodnot before: Thu May 12 15:12:47 EDT 2005not after : Mon Jun 18 19:42:47 EDT 2007Extension 6: not critical KeyUsagedigitalSignatureExtension 7: not critical SubjectKeyIdentifierCB:96:8D:76:D0:BD:C6:F8:FB:98:2F:B1:45:2D:35:8B:B5:CD:5B:9CCertificate Fingerprint: 07:61:56:EF:F8:BF:12:4F:35:75:66:8F:EF:11:24:C6