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.AVAorg.mozilla.jss.pkix.crmf.CertRequestcreateCertRequest(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.CertRequestcreateCertRequest(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.CertTemplatecreateCertTemplate(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_STRINGorg.mozilla.jss.pkix.primitive.NamecreateName(String dn, boolean encodingEnabled) static org.apache.commons.cli.Optionsorg.mozilla.jss.pkix.crmf.ProofOfPossessionorg.mozilla.jss.crypto.SignaturecreateSigner(org.mozilla.jss.crypto.CryptoToken token, String algorithm, KeyPair keyPair) generateECCKeyPair(org.mozilla.jss.crypto.CryptoToken token, String curve, boolean sslECDH, boolean temporary, int sensitive, int extractable) static StringgetKeyWrapAlgotihm(PKIClient pkiclient) booleanbooleanstatic voidstatic voidprintError(String message) static voidvoidprocessResponse(org.apache.http.HttpResponse response) voidsetUseOAEP(boolean useOAEP) voidsetVerbose(boolean verbose) voidbooleanuseOAEP()
-
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() -
generateECCKeyPair
public KeyPair generateECCKeyPair(org.mozilla.jss.crypto.CryptoToken token, String curve, boolean sslECDH, boolean temporary, int sensitive, int extractable) throws Exception - Throws:
Exception
-
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
-