org.eclipse.osgi.internal.signedcontent
Class PKCS7Processor

java.lang.Object
  extended by org.eclipse.osgi.internal.signedcontent.PKCS7Processor
All Implemented Interfaces:
SignedContentConstants

public class PKCS7Processor
extends Object
implements SignedContentConstants

This class processes a PKCS7 file. See RFC 2315 for specifics.


Field Summary
 
Fields inherited from interface org.eclipse.osgi.internal.signedcontent.SignedContentConstants
AUTHORIZATION_ENGINE, DEFAULT_AUTHORIZATION_ENGINE, DEFAULT_TRUST_ENGINE, digestManifestSearch, digestManifestSearchLen, DOT_DSA, DOT_RSA, DOT_SF, DSA_OID, EMPTY_STRING, MD2_OID, MD2_STR, MD5_OID, MD5_STR, META_INF, META_INF_MANIFEST_MF, MF_DIGEST_PART, MF_ENTRY_NAME, MF_ENTRY_NEWLN_NAME, RSA_OID, SHA1_OID, SHA1_STR, SHA224_OID, SHA224_STR, SHA256_OID, SHA256_STR, SHA384_OID, SHA384_STR, SHA512_224_OID, SHA512_224_STR, SHA512_256_OID, SHA512_256_STR, SHA512_OID, SHA512_STR, SIG_DASH, SIGNEDDATA_OID, SIGNING_TIME, TIMESTAMP_OID, TIMESTAMP_TST_OID, TRUST_ENGINE
 
Constructor Summary
PKCS7Processor(byte[] pkcs7, int pkcs7Offset, int pkcs7Length, String signer, String file)
           
 
Method Summary
 Certificate[] getCertificates()
           
 Map<int[],byte[]> getSignedAttrs()
          Return a map of signed attributes, the key(objid) = value(PKCSBlock in bytes for the key)
 Date getSigningTime()
           
 Certificate[] getTSACertificates()
           
 Map<int[],byte[]> getUnsignedAttrs()
          Return a map of signed attributes, the key(objid) = value(PKCSBlock in bytes for the key)
 void verifyCerts()
           
 void verifySFSignature(byte[] data, int dataOffset, int dataLength)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PKCS7Processor

public PKCS7Processor(byte[] pkcs7,
                      int pkcs7Offset,
                      int pkcs7Length,
                      String signer,
                      String file)
               throws CertificateException,
                      NoSuchAlgorithmException,
                      InvalidKeyException,
                      SignatureException,
                      NoSuchProviderException
Throws:
CertificateException
NoSuchAlgorithmException
InvalidKeyException
SignatureException
NoSuchProviderException
Method Detail

verifyCerts

public void verifyCerts()
                 throws InvalidKeyException,
                        SignatureException,
                        CertificateException,
                        NoSuchAlgorithmException,
                        NoSuchProviderException
Throws:
InvalidKeyException
SignatureException
CertificateException
NoSuchAlgorithmException
NoSuchProviderException

getCertificates

public Certificate[] getCertificates()

verifySFSignature

public void verifySFSignature(byte[] data,
                              int dataOffset,
                              int dataLength)
                       throws InvalidKeyException,
                              NoSuchAlgorithmException,
                              SignatureException
Throws:
InvalidKeyException
NoSuchAlgorithmException
SignatureException

getUnsignedAttrs

public Map<int[],byte[]> getUnsignedAttrs()
Return a map of signed attributes, the key(objid) = value(PKCSBlock in bytes for the key)

Returns:
map if there is any signed attributes, null otherwise

getSignedAttrs

public Map<int[],byte[]> getSignedAttrs()
Return a map of signed attributes, the key(objid) = value(PKCSBlock in bytes for the key)

Returns:
map if there is any signed attributes, null otherwise

getSigningTime

public Date getSigningTime()

getTSACertificates

public Certificate[] getTSACertificates()


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.