Class CRMFPopClient

java.lang.Object
com.netscape.cmstools.CRMFPopClient

public class CRMFPopClient extends Object
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 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

      public static void printError(String message)
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • getKeyWrapAlgotihm

      public static String getKeyWrapAlgotihm(PKIClient pkiclient) throws Exception
      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

      public org.mozilla.jss.asn1.OCTET_STRING createIDPOPLinkWitness() throws Exception
      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

      public void processResponse(org.apache.http.HttpResponse response) throws Exception
      Throws:
      Exception
    • isEncoded

      public boolean isEncoded(String elementValue)
    • 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