Package com.netscape.cmstools
Class CRMFPopClient
java.lang.Object
com.netscape.cmstools.CRMFPopClient
A command-line utility used to generate a Certificate Request Message
Format (CRMF) request with proof of possesion (POP).
IMPORTANT: The transport certificate file needs to be created to contain the transport certificate in its base64 encoded format.
- Version:
- $Revision$, $Date$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.mozilla.jss.pkix.primitive.AVA
org.mozilla.jss.pkix.crmf.CertRequest
createCertRequest
(boolean use_shared_secret, org.mozilla.jss.crypto.CryptoToken token, org.mozilla.jss.crypto.X509Certificate transportCert, String algorithm, KeyPair keyPair, org.mozilla.jss.pkix.primitive.Name subject, org.mozilla.jss.crypto.KeyWrapAlgorithm keyWrapAlgorithm) org.mozilla.jss.pkix.crmf.CertRequest
createCertRequest
(org.mozilla.jss.crypto.CryptoToken token, org.mozilla.jss.crypto.X509Certificate transportCert, String algorithm, KeyPair keyPair, org.mozilla.jss.pkix.primitive.Name subject, org.mozilla.jss.crypto.KeyWrapAlgorithm keyWrapAlgorithm) org.mozilla.jss.pkix.crmf.CertTemplate
createCertTemplate
(org.mozilla.jss.pkix.primitive.Name subject, PublicKey publicKey) createCRMFRequest
(org.mozilla.jss.pkix.crmf.CertRequest certRequest, org.mozilla.jss.pkix.crmf.ProofOfPossession pop) org.mozilla.jss.asn1.OCTET_STRING
org.mozilla.jss.pkix.primitive.Name
createName
(String dn, boolean encodingEnabled) static org.apache.commons.cli.Options
org.mozilla.jss.pkix.crmf.ProofOfPossession
org.mozilla.jss.crypto.Signature
createSigner
(org.mozilla.jss.crypto.CryptoToken token, String algorithm, KeyPair keyPair) static String
getKeyWrapAlgotihm
(PKIClient pkiclient) boolean
boolean
static void
static void
printError
(String message) static void
void
processResponse
(org.apache.http.HttpResponse response) void
setUseOAEP
(boolean useOAEP) void
setVerbose
(boolean verbose) void
boolean
useOAEP()
-
Field Details
-
verbose
public boolean verbose
-
-
Constructor Details
-
CRMFPopClient
public CRMFPopClient()
-
-
Method Details
-
createOptions
public static org.apache.commons.cli.Options createOptions() -
printHelp
public static void printHelp() -
printError
-
main
- Throws:
Exception
-
getKeyWrapAlgotihm
- Throws:
Exception
-
setVerbose
public void setVerbose(boolean verbose) -
setUseOAEP
public void setUseOAEP(boolean useOAEP) -
useOAEP
public boolean useOAEP() -
isVerbose
public boolean isVerbose() -
createCertRequest
public org.mozilla.jss.pkix.crmf.CertRequest createCertRequest(org.mozilla.jss.crypto.CryptoToken token, org.mozilla.jss.crypto.X509Certificate transportCert, String algorithm, KeyPair keyPair, org.mozilla.jss.pkix.primitive.Name subject, org.mozilla.jss.crypto.KeyWrapAlgorithm keyWrapAlgorithm) throws Exception - Throws:
Exception
-
createCertRequest
public org.mozilla.jss.pkix.crmf.CertRequest createCertRequest(boolean use_shared_secret, org.mozilla.jss.crypto.CryptoToken token, org.mozilla.jss.crypto.X509Certificate transportCert, String algorithm, KeyPair keyPair, org.mozilla.jss.pkix.primitive.Name subject, org.mozilla.jss.crypto.KeyWrapAlgorithm keyWrapAlgorithm) throws Exception - Throws:
Exception
-
createIDPOPLinkWitness
- Throws:
Exception
-
createCertTemplate
public org.mozilla.jss.pkix.crmf.CertTemplate createCertTemplate(org.mozilla.jss.pkix.primitive.Name subject, PublicKey publicKey) throws Exception - Throws:
Exception
-
createSigner
public org.mozilla.jss.crypto.Signature createSigner(org.mozilla.jss.crypto.CryptoToken token, String algorithm, KeyPair keyPair) throws Exception - Throws:
Exception
-
createPop
public org.mozilla.jss.pkix.crmf.ProofOfPossession createPop(String algorithm, byte[] signature) throws Exception - Throws:
Exception
-
createCRMFRequest
public String createCRMFRequest(org.mozilla.jss.pkix.crmf.CertRequest certRequest, org.mozilla.jss.pkix.crmf.ProofOfPossession pop) throws Exception - Throws:
Exception
-
submitRequest
public void submitRequest(String request, String hostPort, String username, String profileID, String requestor) throws Exception - Throws:
Exception
-
processResponse
- Throws:
Exception
-
isEncoded
-
createAVA
public org.mozilla.jss.pkix.primitive.AVA createAVA(org.mozilla.jss.asn1.OBJECT_IDENTIFIER oid, int n, String elementValue) throws Exception - Throws:
Exception
-
createName
public org.mozilla.jss.pkix.primitive.Name createName(String dn, boolean encodingEnabled) throws Exception - Throws:
Exception
-