Oracle Security Developer Tools S/MIME Java API Reference
10g (10.1.4.0.1)

B28172-01


oracle.security.crypto.smime.ess
Class SigningCertificate

java.lang.Object
  extended byoracle.security.crypto.smime.ess.SigningCertificate

All Implemented Interfaces:
oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class SigningCertificate
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object

An ESS Signing Certificate.


Constructor Summary
SigningCertificate(oracle.security.crypto.cms.CMSSignerInfo si)
          Create a new SigningCertificateAttribute object.
SigningCertificate(java.io.InputStream is)
          Create a new SigningCertificateAttribute object.
SigningCertificate(oracle.security.crypto.cert.X509 cert)
          Create a new SigningCertificate object.
SigningCertificate(oracle.security.crypto.cert.X509 cert, java.util.Vector policy)
          Create a new SigningCertificate object.
SigningCertificate(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.cert.X509 caCert, boolean addIssuerSerial)
          Create a new SigningCertificateAttribute object.
SigningCertificate(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.cert.X509 caCert, boolean useIssuerSerial, java.util.Vector policy)
          Create a new SigningCertificateAttribute object.

 

Method Summary
 void addCertificate(oracle.security.crypto.cert.X509 cert)
          Adds a certificate to this signing certificate attribute object.
 void addCertificate(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.cert.X509 caCert, boolean issuerSerial)
          Adds a certificate to this signing certificate attribute object.
 void addPolicy(oracle.security.crypto.cert.X509PolicyInformation policy)
          Adds a policy information to this signing certificate attribute object
 java.util.Enumeration certIDs()
          Returns the list of certificate identifiers.
 boolean equals(java.lang.Object o)
          Indicates if the object equals the specified object.
 int hashCode()
          Return the hash code for this object.
 void input(java.io.InputStream is)
          Initialized this object by reading the encoding from the specified input stream.
 int length()
          Returns the length of this object's encoding.
 void output(java.io.OutputStream os)
          Output this object's encoding to the specified output stream.
 java.util.Enumeration policies()
          Returns the list of policies asserted by the signer.
 java.lang.String toString()
          Returns a string representation of this object.
 void verifyAuthorizationCertificate(oracle.security.crypto.cert.X509 cert)
          Verifies if a certificate is in the signing certificate attribute, and compare the result of its hash to the value in the signing certificate attribute.
 void verifyAuthorizationCertificate(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.cert.X509 caCert)
          Verifies if a certificate is in the signing certificate attribute, and compare the result of its hash to the value in the signing certificate attribute.
 void verifySignerCertificate(oracle.security.crypto.cert.X509 cert)
          Verifies if the certificate which was used to verify the signature is identical to the one used to create the signature.
 void verifySignerCertificate(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.cert.X509 caCert)
          Verifies if the certificate which was used to verify the signature is identical to the one used to create the signature.

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

SigningCertificate

public SigningCertificate(oracle.security.crypto.cert.X509 cert)
                   throws oracle.security.crypto.core.AlgorithmIdentifierException
Create a new SigningCertificate object.
Parameters:
cert - The X509 signer certificate.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException - An error occurred during certificate hash generation.

SigningCertificate

public SigningCertificate(oracle.security.crypto.cert.X509 cert,
                          java.util.Vector policy)
                   throws oracle.security.crypto.core.AlgorithmIdentifierException
Create a new SigningCertificate object.
Parameters:
cert - The X509 signer certificate.
policy - The policies (X509PolicyInformation) that the signer asserts.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException - An error occurred during certificate hash generation.

SigningCertificate

public SigningCertificate(oracle.security.crypto.cert.X509 cert,
                          oracle.security.crypto.cert.X509 caCert,
                          boolean addIssuerSerial)
                   throws oracle.security.crypto.core.AlgorithmIdentifierException
Create a new SigningCertificateAttribute object.
Parameters:
cert - The X509 certificate.
addIssuerSerial - If true, the issuer/serial number is used.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException - An error occurred during certificate hash generation.

SigningCertificate

public SigningCertificate(oracle.security.crypto.cert.X509 cert,
                          oracle.security.crypto.cert.X509 caCert,
                          boolean useIssuerSerial,
                          java.util.Vector policy)
                   throws oracle.security.crypto.core.AlgorithmIdentifierException
Create a new SigningCertificateAttribute object.
Parameters:
cert - The X509 signer certificate.
useIssuerSerial - If true, the issuer/serial number is used.
policy - The policies (X509PolicyInformation) that the signer asserts.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException - An error occurred during certificate hash generation.

SigningCertificate

public SigningCertificate(java.io.InputStream is)
                   throws java.io.IOException
Create a new SigningCertificateAttribute object.
Parameters:
is - The input stream.
Throws:
java.io.IOException - If the input is not correctly formatted or an I/O exception occurs while reading from the input stream.

SigningCertificate

public SigningCertificate(oracle.security.crypto.cms.CMSSignerInfo si)
                   throws oracle.security.crypto.util.InvalidInputException
Create a new SigningCertificateAttribute object.
Parameters:
si - The message signer (CMSSignerInfo).
Throws:
oracle.security.crypto.util.InvalidInputException - If the attribute is not present or it is multi valued or its encoding is incorrect.

Method Detail

addCertificate

public void addCertificate(oracle.security.crypto.cert.X509 cert)
                    throws oracle.security.crypto.core.AlgorithmIdentifierException
Adds a certificate to this signing certificate attribute object.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException

addCertificate

public void addCertificate(oracle.security.crypto.cert.X509 cert,
                           oracle.security.crypto.cert.X509 caCert,
                           boolean issuerSerial)
                    throws oracle.security.crypto.core.AlgorithmIdentifierException
Adds a certificate to this signing certificate attribute object.
Throws:
oracle.security.crypto.core.AlgorithmIdentifierException

addPolicy

public void addPolicy(oracle.security.crypto.cert.X509PolicyInformation policy)
Adds a policy information to this signing certificate attribute object

certIDs

public java.util.Enumeration certIDs()
Returns the list of certificate identifiers.
Returns:
An Enumeration of ESSCertID objects.

policies

public java.util.Enumeration policies()
Returns the list of policies asserted by the signer.
Returns:
An Enumeration of X509PolicyInformation objects.

toString

public java.lang.String toString()
Returns a string representation of this object.
Returns:
A string.

equals

public boolean equals(java.lang.Object o)
Indicates if the object equals the specified object.
Returns:
If true this object is equal to the specified object; false otherwise.

hashCode

public int hashCode()
Return the hash code for this object.
Returns:
The hash code value.

verifySignerCertificate

public void verifySignerCertificate(oracle.security.crypto.cert.X509 cert)
                             throws oracle.security.crypto.core.AuthenticationException
Verifies if the certificate which was used to verify the signature is identical to the one used to create the signature.
Parameters:
cert - The certificate used to verify the signature.
Throws:
oracle.security.crypto.core.AuthenticationException - If the certificate used to verify the signature does not correspond to the one used to create the signature.

verifySignerCertificate

public void verifySignerCertificate(oracle.security.crypto.cert.X509 cert,
                                    oracle.security.crypto.cert.X509 caCert)
                             throws oracle.security.crypto.core.AuthenticationException
Verifies if the certificate which was used to verify the signature is identical to the one used to create the signature.
Parameters:
cert - The certificate used to verify the signature.
caCert - The issuer's certificate used to verify the signature.
Throws:
oracle.security.crypto.core.AuthenticationException - If the certificate used to verify the signature does not correspond to the one used to create the signature.

verifyAuthorizationCertificate

public void verifyAuthorizationCertificate(oracle.security.crypto.cert.X509 cert)
                                    throws oracle.security.crypto.core.AuthenticationException
Verifies if a certificate is in the signing certificate attribute, and compare the result of its hash to the value in the signing certificate attribute. This verification does not apply for the certificate that has created the signature (the method will return an AuthenticationException because it will not have found the IssuerAndSerialNo in the signing certificate attribute)
Throws:
oracle.security.crypto.core.AuthenticationException - if the certificate is not in the signing certificate attribute or if its hash function is different from the one in ths signing certificate attribute

verifyAuthorizationCertificate

public void verifyAuthorizationCertificate(oracle.security.crypto.cert.X509 cert,
                                           oracle.security.crypto.cert.X509 caCert)
                                    throws oracle.security.crypto.core.AuthenticationException
Verifies if a certificate is in the signing certificate attribute, and compare the result of its hash to the value in the signing certificate attribute. This verification does not apply for the certificate that has created the signature (the method will return an AuthenticationException because it will not have found the IssuerAndSerialNo in the signing certificate attribute)
Throws:
oracle.security.crypto.core.AuthenticationException - if the certificate is not in the signing certificate attribute or if its hash function is different from the one in ths signing certificate attribute

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Initialized this object by reading the encoding from the specified input stream.
Specified by:
input in interface oracle.security.crypto.util.Streamable
Parameters:
is - The input stream.
Throws:
java.io.IOException

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Output this object's encoding to the specified output stream.
Specified by:
output in interface oracle.security.crypto.util.Streamable
Parameters:
os - The output stream.
Throws:
java.io.IOException

length

public int length()
Returns the length of this object's encoding.
Specified by:
length in interface oracle.security.crypto.util.Streamable
Returns:
The length in bytes.

Oracle Security Developer Tools S/MIME Java API Reference
10g (10.1.4.0.1)

B28172-01


Copyright © 2005 ,2006 , Oracle. All rights reserved.