Package org.jscep.message

Examples of org.jscep.message.PkcsPkiEnvelopeEncoder


    @Test
    public void test404() throws Exception {
  KeyPair keyPair = KeyPairGenerator.getInstance("RSA").generateKeyPair();

  PkcsPkiEnvelopeEncoder envEnc = new PkcsPkiEnvelopeEncoder(
    getCertificate(keyPair), "DES");
  PkiMessageEncoder enc = new PkiMessageEncoder(keyPair.getPrivate(),
    getCertificate(keyPair), envEnc);

  TransactionId transId = TransactionId.createTransactionId();
View Full Code Here


  }

  @Test
  public void testGetCRL() throws Exception {
    IssuerAndSerialNumber iasn = new IssuerAndSerialNumber(name, goodSerial);
    PkcsPkiEnvelopeEncoder envEncoder = new PkcsPkiEnvelopeEncoder(
        getRecipient(), "DESede");
    PkiMessageEncoder encoder = new PkiMessageEncoder(priKey, sender,
        envEncoder);

    PkcsPkiEnvelopeDecoder envDecoder = new PkcsPkiEnvelopeDecoder(sender,
View Full Code Here

  }

  @Test
  public void testGetCertBad() throws Exception {
    IssuerAndSerialNumber iasn = new IssuerAndSerialNumber(name, badSerial);
    PkcsPkiEnvelopeEncoder envEncoder = new PkcsPkiEnvelopeEncoder(
        getRecipient(), "DES");
    PkiMessageEncoder encoder = new PkiMessageEncoder(priKey, sender,
        envEncoder);

    PkcsPkiEnvelopeDecoder envDecoder = new PkcsPkiEnvelopeDecoder(sender,
View Full Code Here

  @Test
  public void testEnrollmentGet() throws Exception {
    PKCS10CertificationRequest csr = getCsr(name, pubKey, priKey,
        "password".toCharArray());

    PkcsPkiEnvelopeEncoder envEncoder = new PkcsPkiEnvelopeEncoder(
        getRecipient(), "DESede");
    PkiMessageEncoder encoder = new PkiMessageEncoder(priKey, sender,
        envEncoder);

    PkcsPkiEnvelopeDecoder envDecoder = new PkcsPkiEnvelopeDecoder(sender,
View Full Code Here

  @Test
  public void testEnrollmentPost() throws Exception {
    PKCS10CertificationRequest csr = getCsr(name, pubKey, priKey,
        "password".toCharArray());

    PkcsPkiEnvelopeEncoder envEncoder = new PkcsPkiEnvelopeEncoder(
        getRecipient(), "DES");
    PkiMessageEncoder encoder = new PkiMessageEncoder(priKey, sender,
        envEncoder);

    PkcsPkiEnvelopeDecoder envDecoder = new PkcsPkiEnvelopeDecoder(sender,
View Full Code Here

  @Test
  public void testEnrollmentWithPoll() throws Exception {
    PKCS10CertificationRequest csr = getCsr(pollName, pubKey, priKey,
        "password".toCharArray());

    PkcsPkiEnvelopeEncoder envEncoder = new PkcsPkiEnvelopeEncoder(
        getRecipient(), "DES");
    PkiMessageEncoder encoder = new PkiMessageEncoder(priKey, sender,
        envEncoder);

    PkcsPkiEnvelopeDecoder envDecoder = new PkcsPkiEnvelopeDecoder(sender,
View Full Code Here

      PrivateKey priKey, String profile) throws ClientException {
    CertStore store = getCaCertificate(profile);
    Capabilities caps = getCaCapabilities(profile);
    CertStoreInspector certs = CertStoreInspector.getInstance(store);
    X509Certificate recipientCertificate = certs.getRecipient();
    PkcsPkiEnvelopeEncoder envEncoder = new PkcsPkiEnvelopeEncoder(
        recipientCertificate, caps.getStrongestCipher());

    String sigAlg = caps.getStrongestSignatureAlgorithm();
    return new PkiMessageEncoder(priKey, identity, envEncoder, sigAlg);
  }
View Full Code Here

    }
      } else {
    throw new ServletException("Unknown Message for Operation");
      }

      PkcsPkiEnvelopeEncoder envEncoder = new PkcsPkiEnvelopeEncoder(
        reqCert, "DESede");
      PkiMessageEncoder encoder = new PkiMessageEncoder(getSignerKey(),
        getSigner(), envEncoder);
      CMSSignedData signedData;
      try {
View Full Code Here

TOP

Related Classes of org.jscep.message.PkcsPkiEnvelopeEncoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.