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 java.lang.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, SIG_DASH, SIGNEDDATA_OID, SIGNING_TIME, TIMESTAMP_OID, TIMESTAMP_TST_OID, TRUST_ENGINE
 
Constructor Summary
PKCS7Processor(byte[] pkcs7, int pkcs7Offset, int pkcs7Length, java.lang.String signer, java.lang.String file)
           
 
Method Summary
 java.security.cert.Certificate[] getCertificates()
           
 java.util.Map<int[],byte[]> getSignedAttrs()
          Return a map of signed attributes, the key(objid) = value(PKCSBlock in bytes for the key)
 java.util.Date getSigningTime()
           
 java.security.cert.Certificate[] getTSACertificates()
           
 java.util.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,
                      java.lang.String signer,
                      java.lang.String file)
               throws java.security.cert.CertificateException,
                      java.security.NoSuchAlgorithmException,
                      java.security.InvalidKeyException,
                      java.security.SignatureException,
                      java.security.NoSuchProviderException
Throws:
java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
java.security.NoSuchProviderException
Method Detail

verifyCerts

public void verifyCerts()
                 throws java.security.InvalidKeyException,
                        java.security.SignatureException,
                        java.security.cert.CertificateException,
                        java.security.NoSuchAlgorithmException,
                        java.security.NoSuchProviderException
Throws:
java.security.InvalidKeyException
java.security.SignatureException
java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException

getCertificates

public java.security.cert.Certificate[] getCertificates()

verifySFSignature

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

getUnsignedAttrs

public java.util.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 java.util.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 java.util.Date getSigningTime()

getTSACertificates

public java.security.cert.Certificate[] getTSACertificates()


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.