Skip navigation links

Oracle Fusion Middleware S/MIME Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10672-03


oracle.security.crypto.smime.ess
Class SigningCertificate

java.lang.Object
  extended by oracle.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(java.security.cert.X509Certificate cert)
          Create a new SigningCertificate object.
SigningCertificate(java.security.cert.X509Certificate cert, java.util.Vector policy)
          Create a new SigningCertificate object.
SigningCertificate(java.security.cert.X509Certificate cert, java.security.cert.X509Certificate caCert, boolean addIssuerSerial)
          Create a new SigningCertificateAttribute object.
SigningCertificate(java.security.cert.X509Certificate cert, java.security.cert.X509Certificate caCert, boolean useIssuerSerial, java.util.Vector policy)
          Create a new SigningCertificateAttribute object.

 

Method Summary
 void addCertificate(java.security.cert.X509Certificate cert)
          Adds a certificate to this signing certificate attribute object.
 void addCertificate(java.security.cert.X509Certificate cert, java.security.cert.X509Certificate 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(java.security.cert.X509Certificate 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(java.security.cert.X509Certificate cert, java.security.cert.X509Certificate 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(java.security.cert.X509Certificate cert)
          Verifies if the certificate which was used to verify the signature is identical to the one used to create the signature.
 void verifySignerCertificate(java.security.cert.X509Certificate cert, java.security.cert.X509Certificate 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(java.security.cert.X509Certificate cert)
                   throws java.security.NoSuchAlgorithmException,
                          java.security.cert.CertificateEncodingException
Create a new SigningCertificate object.

Note the changes in the method signature

Previously : public SigningCertificate (X509 )

Now : public SigningCertificate (X509Certificate )

Note the changes in the exceptions

Exceptions no longer thrown : AlgorithmIdentifierException

Exceptions introduced : NoSuchAlgorithmException,CertificateEncodingException

Parameters:
cert - The X509 signer certificate.
Throws:
java.security.NoSuchAlgorithmException - An error occurred during certificate hash generation.
java.security.cert.CertificateEncodingException - An error occured during certificate encoding

SigningCertificate

public SigningCertificate(java.security.cert.X509Certificate cert,
                          java.util.Vector policy)
                   throws java.security.NoSuchAlgorithmException,
                          java.security.cert.CertificateEncodingException
Create a new SigningCertificate object.

Note the changes in the method signature

Previously : public SigningCertificate (X509 ,Vector)

Now : public SigningCertificate (X509Certificate ,Vector)

Note the changes in the exceptions

Exceptions no longer thrown : AlgorithmIdentifierException

Exceptions introduced : NoSuchAlgorithmException,CertificateEncodingException

Parameters:
cert - The X509 signer certificate.
policy - The policies (X509PolicyInformation) that the signer asserts.
Throws:
java.security.NoSuchAlgorithmException - An error occurred during certificate hash generation.
java.security.cert.CertificateEncodingException - An error occured during certificate encoding

SigningCertificate

public SigningCertificate(java.security.cert.X509Certificate cert,
                          java.security.cert.X509Certificate caCert,
                          boolean addIssuerSerial)
                   throws java.security.NoSuchAlgorithmException,
                          java.security.cert.CertificateEncodingException
Create a new SigningCertificateAttribute object.

Note the changes in the method signature

Previously : public SigningCertificate (X509, X509, boolean)

Now : public SigningCertificate (X509Certificate, X509Certificate, boolean)

Note the changes in the exceptions

Exceptions no longer thrown : AlgorithmIdentifierException

Exceptions introduced : NoSuchAlgorithmException,CertificateEncodingException

Parameters:
cert - The X509 certificate.
cert - The issuer's X509 certificate.
addIssuerSerial - If true, the issuer/serial number is used.
Throws:
java.security.NoSuchAlgorithmException - An error occurred during certificate hash generation.
java.security.cert.CertificateEncodingException - An error occured during certificate encoding

SigningCertificate

public SigningCertificate(java.security.cert.X509Certificate cert,
                          java.security.cert.X509Certificate caCert,
                          boolean useIssuerSerial,
                          java.util.Vector policy)
                   throws java.security.cert.CertificateEncodingException,
                          java.security.NoSuchAlgorithmException
Create a new SigningCertificateAttribute object.

Note the changes in the method signature

Previously : public SigningCertificate (X509, X509, boolean,Vector)

Now : public SigningCertificate (X509Certificate, X509Certificate, boolean,Vector)

Note the changes in the exceptions

Exceptions no longer thrown : AlgorithmIdentifierException

Exceptions introduced : NoSuchAlgorithmException,CertificateEncodingException

Parameters:
cert - The X509 signer certificate.
cert - The issuer's X509 certificate.
useIssuerSerial - If true, the issuer/serial number is used.
policy - The policies (X509PolicyInformation) that the signer asserts.
Throws:
java.security.NoSuchAlgorithmException - An error occurred during certificate hash generation.
java.security.cert.CertificateEncodingException - An error occured during certificate encoding

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(java.security.cert.X509Certificate cert)
                    throws java.security.NoSuchAlgorithmException,
                           java.security.cert.CertificateEncodingException
Adds a certificate to this signing certificate attribute object.

Note the changes in the method signature

Previously : public void addCertificate(X509 )

Now : public void addCertificate(X509Certificate )

Note the changes in the exceptions

Exceptions no longer thrown : AlgorithmIdentifierException

Exceptions introduced : NoSuchAlgorithmException,CertificateEncodingException

Parameters:
X509 - The certificate to add.
Throws:
java.security.NoSuchAlgorithmException - An error occurred during certificate hash generation.
java.security.cert.CertificateEncodingException - An error occured during certificate encoding

addCertificate

public void addCertificate(java.security.cert.X509Certificate cert,
                           java.security.cert.X509Certificate caCert,
                           boolean issuerSerial)
                    throws java.security.NoSuchAlgorithmException,
                           java.security.cert.CertificateEncodingException
Adds a certificate to this signing certificate attribute object.

Note the changes in the method signature

Previously : public void addCertificate(X509, X509, boolean)

Now : public void addCertificate(X509Certificate , X509Certificate, boolean)

Note the changes in the exceptions

Exceptions no longer thrown : AlgorithmIdentifierException

Exceptions introduced : NoSuchAlgorithmException,CertificateEncodingException

Parameters:
X509Certificate - The certificate to add.
Throws:
java.security.NoSuchAlgorithmException - An error occurred during certificate hash generation.
java.security.cert.CertificateEncodingException - An error occured during certificate encoding

addPolicy

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

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.
Overrides:
toString in class java.lang.Object
Returns:
A string.

equals

public boolean equals(java.lang.Object o)
Indicates if the object equals the specified object.
Overrides:
equals in class java.lang.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.
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code value.

verifySignerCertificate

public void verifySignerCertificate(java.security.cert.X509Certificate 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.

Note the changes in the method signature

Previously : public void verifySignerCertificate(X509)

Now : public void verifySignerCertificate(X509Certificate )

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(java.security.cert.X509Certificate cert,
                                    java.security.cert.X509Certificate 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.

Note the changes in the method signature

Previously : public void verifySignerCertificate(X509, X509)

Now : public void verifySignerCertificate(X509Certificate , X509Certificate )

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(java.security.cert.X509Certificate 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)

Note the changes in the method signature

Previously : public void verifyAuthorizationCertificate(X509)

Now : public void verifyAuthorizationCertificate(X509Certificate )

Parameters:
cert - the certificate to verify
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(java.security.cert.X509Certificate cert,
                                           java.security.cert.X509Certificate 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)

Previously : public void verifyAuthorizationCertificate(X509, X509)

Now : public void verifyAuthorizationCertificate(X509Certificate ,X509Certificate )

Parameters:
X509 - the certificate to verify
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.

Skip navigation links

Oracle Fusion Middleware S/MIME Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10672-03


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