Examples of CMSProcessable


Examples of org.bouncycastle.cms.CMSProcessable

    public void testCertStoreReplacement()
        throws Exception
    {
        List                  certList = new ArrayList();
        CMSProcessable        msg = new CMSProcessableByteArray("Hello World!".getBytes());


        certList.add(_signDsaCert);

        CertStore           certs = CertStore.getInstance("Collection",
View Full Code Here

Examples of org.bouncycastle.cms.CMSProcessable

    public void testEncapsulatedCertStoreReplacement()
        throws Exception
    {
        List                  certList = new ArrayList();
        CMSProcessable        msg = new CMSProcessableByteArray("Hello World!".getBytes());


        certList.add(_signDsaCert);

        CertStore           certs = CertStore.getInstance("Collection",
View Full Code Here

Examples of org.bouncycastle.cms.CMSProcessable

    public void testCertOrdering1()
        throws Exception
    {
        List                  certList = new ArrayList();
        CMSProcessable        msg = new CMSProcessableByteArray("Hello World!".getBytes());

        certList.add(_origCert);
        certList.add(_signCert);
        certList.add(_signDsaCert);
View Full Code Here

Examples of org.bouncycastle.cms.CMSProcessable

    public void testCertOrdering2()
        throws Exception
    {
        List                  certList = new ArrayList();
        CMSProcessable        msg = new CMSProcessableByteArray("Hello World!".getBytes());

        certList.add(_signCert);
        certList.add(_signDsaCert);
        certList.add(_origCert);
View Full Code Here

Examples of org.bouncycastle.cms.CMSProcessable

    public void testSignerStoreReplacement()
        throws Exception
    {
        List                  certList = new ArrayList();
        CMSProcessable        msg = new CMSProcessableByteArray("Hello World!".getBytes());

        certList.add(_origCert);
        certList.add(_signCert);

        CertStore           certs = CertStore.getInstance("Collection",
View Full Code Here

Examples of org.bouncycastle.cms.CMSProcessable

    public void testSHA1WithRSAEncapsulated()
        throws Exception
    {
        List certList = new ArrayList();
        CMSProcessable msg = new CMSProcessableByteArray(TEST_MESSAGE.getBytes());

        certList.add(keyCert);

        CertStore certsAndCrls = CertStore.getInstance("Collection",
                        new CollectionCertStoreParameters(certList));
View Full Code Here

Examples of org.bouncycastle.cms.CMSProcessable

        throw new SignatureVerificationException("No algorithm found in signature block: " + theSignature);
      }

      theSignature = theSignature.substring(spaceIndex + 1);

      CMSProcessable content = new CMSProcessableByteArray(theBytes);
      CMSSignedData s = new CMSSignedData(content, Base64.decodeBase64(theSignature));

      ourLog.debug("Verifying message against public key with alias[{}]", myKeyAlias);

      SignerInformationVerifier vib = new JcaSimpleSignerInfoVerifierBuilder().build(pubKey);
View Full Code Here

Examples of org.bouncycastle.cms.CMSProcessable

            }
          }
        }
      }
      if (verified) {
        CMSProcessable signedContent = signedData.getSignedContent();
        byte[] content = (byte[]) signedContent.getContent();
        verified = Arrays.equals(data, content);
      }
      return verified;
    } catch (Exception e) {
      throw new SignerException(e);
View Full Code Here

Examples of org.bouncycastle.cms.CMSProcessable

  }

  public byte[] getContent(final byte[] data) {
    try {
      CMSSignedData signedData = new CMSSignedData(data);
      CMSProcessable processable = signedData.getSignedContent();
      return this.getContent(processable);
    } catch (Exception e) {
      throw new SignerException(e);
    }
  }
View Full Code Here

Examples of org.bouncycastle.cms.CMSProcessable

  }

  public byte[] getContent(final byte[] data) {
    try {
      CMSSignedData signedData = new CMSSignedData(data);
      CMSProcessable processable = signedData.getSignedContent();
      return this.getContent(processable);
    } catch (Exception e) {
      throw new SignerException(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.