|
Oracle Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10674-05 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.security.crypto.cert.PKCS7
public class PKCS7
This class implements a subset of PKCS #7. Two modes are implemented: wrapping X.509 certificates and CRLs (SignedData with empty signerInfos), and making a detached RSA/MD5 or RSA/SHA signature with one signer.
| Field Summary | |
|---|---|
protected static int[] |
pkcs7The pkcs-7 OBJECT-IDENTIFIER, as defined in PKCS #7. |
| Constructor Summary | |
|---|---|
PKCS7()Creates a new empty instance. |
|
PKCS7(oracle.security.crypto.asn1.ASN1Sequence s) |
|
PKCS7(CRL crl)Make a wrapper for a CRL. |
|
PKCS7(java.io.InputStream is) |
|
PKCS7(java.util.List<X509> certificates, java.util.List<CRL> crls)Make a wrapper for a list of certificates and CRL's. |
|
PKCS7(java.util.Vector<X509> certificates, java.util.Vector<CRL> crls)Deprecated. Use PKCS7(List, List) |
|
PKCS7(X509 cert)Make a wrapper for a certificate. |
|
PKCS7(java.security.cert.X509Certificate signer, java.security.interfaces.RSAPrivateKey k, oracle.security.crypto.core.AlgorithmIdentifier sigAlg, byte[] doc)Make a detached signature. |
|
PKCS7(X509 signer, oracle.security.crypto.core.RSAPrivateKey k, byte[] doc)Deprecated. Use PKCS7(X509Certificate, java.security.interfaces.RSAPrivateKey, AlgorithmIdentifier, byte[]) |
|
| Method Summary | |
|---|---|
void |
addCertificate(X509 cert)Add certificate to the vector of certificates. |
void |
addCRL(CRL crl)Add CRL to the vector of CRLs. |
java.util.Vector<X509> |
getCertificates()Deprecated. |
java.util.ArrayList<X509> |
getCertificatesAsList()Returns list of certificates to be wrapped. |
java.util.Vector<CRL> |
getCRLs()Deprecated. |
java.util.ArrayList<CRL> |
getCRLsAsList()Returns vector of CRLs to be wrapped. |
byte[] |
getEncoded()Returns the ASN.1 encoding. |
X500Name |
getIssuer()If this object is a detached signature, returns the issuer of the signer's certificate. |
java.math.BigInteger |
getSerialNo()If this object is a detached signature, returns the serial number of the signer's certificate. |
void |
input(oracle.security.crypto.asn1.ASN1Sequence s)Read in ASN.1 form. |
void |
input(java.io.InputStream is)Read from the specified input stream. |
int |
length()Returns length of ASN.1 encoding. |
void |
output(java.io.OutputStream os)Output contents to the specified output stream. |
void |
readExternal(java.io.ObjectInput is) |
void |
setDocument(byte[] doc)Specify the document for verification. |
void |
setPublicKey(oracle.security.crypto.core.RSAPublicKey pk)Sets the public key which will be used to verify the signature. |
void |
setPublicKey(java.security.interfaces.RSAPublicKey pk)Sets the public key which will be used to verify the signature. |
void |
setSigner(X509 signer)Set the signer certificate. |
void |
setSigner(java.security.cert.X509Certificate signer)Set the signer certificate. |
void |
sign(java.security.cert.X509Certificate signer, java.security.interfaces.RSAPrivateKey privKey, oracle.security.crypto.core.AlgorithmIdentifier sigAlg, byte[] doc)Make a detached signature using the given signature algorithm. |
void |
sign(X509 signer, oracle.security.crypto.core.RSAPrivateKey privKey, oracle.security.crypto.core.AlgorithmIdentifier sigAlg, byte[] doc)Deprecated. Use sign(X509Certificate, java.security.interfaces.RSAPrivateKey, AlgorithmIdentifier, byte[]) |
void |
sign(X509 signer, oracle.security.crypto.core.RSAPrivateKey privKey, byte[] doc)Deprecated. Use sign(X509Certificate, java.security.interfaces.RSAPrivateKey, AlgorithmIdentifier, byte[]) |
boolean |
verify()If this object is a detached signature, verify the signature. |
void |
writeExternal(java.io.ObjectOutput os) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int[] pkcs7
| Constructor Detail |
|---|
public PKCS7()
public PKCS7(java.util.Vector<X509> certificates,
java.util.Vector<CRL> crls)
PKCS7(List, List)
public PKCS7(java.util.List<X509> certificates,
java.util.List<CRL> crls)
public PKCS7(X509 cert)
public PKCS7(CRL crl)
public PKCS7(X509 signer,
oracle.security.crypto.core.RSAPrivateKey k,
byte[] doc)
throws oracle.security.crypto.core.SignatureException
PKCS7(X509Certificate, java.security.interfaces.RSAPrivateKey, AlgorithmIdentifier, byte[])oracle.security.crypto.core.SignatureException
public PKCS7(java.security.cert.X509Certificate signer,
java.security.interfaces.RSAPrivateKey k,
oracle.security.crypto.core.AlgorithmIdentifier sigAlg,
byte[] doc)
throws oracle.security.crypto.core.SignatureException
oracle.security.crypto.core.SignatureException
public PKCS7(java.io.InputStream is)
throws java.io.IOException
java.io.IOException
public PKCS7(oracle.security.crypto.asn1.ASN1Sequence s)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
@Deprecated
public java.util.Vector<X509> getCertificates()
public java.util.ArrayList<X509> getCertificatesAsList()
@Deprecated
public java.util.Vector<CRL> getCRLs()
public java.util.ArrayList<CRL> getCRLsAsList()
public void addCertificate(X509 cert)
public void addCRL(CRL crl)
public X500Name getIssuer()
public java.math.BigInteger getSerialNo()
public void setPublicKey(oracle.security.crypto.core.RSAPublicKey pk)
public void setPublicKey(java.security.interfaces.RSAPublicKey pk)
public void setSigner(X509 signer)
public void setSigner(java.security.cert.X509Certificate signer)
public void setDocument(byte[] doc)
java.lang.IllegalStateException - if Message Digest algorithm is bad.
public void sign(X509 signer,
oracle.security.crypto.core.RSAPrivateKey privKey,
byte[] doc)
throws oracle.security.crypto.core.SignatureException
sign(X509Certificate, java.security.interfaces.RSAPrivateKey, AlgorithmIdentifier, byte[])oracle.security.crypto.core.AlgID#md5WithRSAEncryption.oracle.security.crypto.core.SignatureException
public void sign(X509 signer,
oracle.security.crypto.core.RSAPrivateKey privKey,
oracle.security.crypto.core.AlgorithmIdentifier sigAlg,
byte[] doc)
throws oracle.security.crypto.core.SignatureException
sign(X509Certificate, java.security.interfaces.RSAPrivateKey, AlgorithmIdentifier, byte[])oracle.security.crypto.core.SignatureException
public void sign(java.security.cert.X509Certificate signer,
java.security.interfaces.RSAPrivateKey privKey,
oracle.security.crypto.core.AlgorithmIdentifier sigAlg,
byte[] doc)
throws oracle.security.crypto.core.SignatureException
oracle.security.crypto.core.SignatureException
public boolean verify()
throws oracle.security.crypto.core.AuthenticationException
oracle.security.crypto.core.AuthenticationException - if there is an error during verification
public void output(java.io.OutputStream os)
throws java.io.IOException
output in interface oracle.security.crypto.util.Streamablejava.io.IOException
public void input(java.io.InputStream is)
throws java.io.IOException
input in interface oracle.security.crypto.util.Streamablejava.io.IOException
public void input(oracle.security.crypto.asn1.ASN1Sequence s)
throws java.io.IOException
java.io.IOExceptionpublic int length()
length in interface oracle.security.crypto.util.Streamablepublic byte[] getEncoded()
public void writeExternal(java.io.ObjectOutput os)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput is)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundException
|
Oracle Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10674-05 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||