com.aspose.words
Class CertificateHolder

java.lang.Object
    extended by com.aspose.words.CertificateHolder

public class CertificateHolder 
extends java.lang.Object

Represents a holder of System.Security.Cryptography.X509Certificates.X509Certificate2 instance.

CertificateHolder can be created by static factory methods only. It contains an instance of System.Security.Cryptography.X509Certificates.X509Certificate2 which is used to introduce private, public keys and certificate chains into the system. This class is applied in DigitalSignatureUtil and PdfDigitalSignatureDetails instead of obsolete methods with System.Security.Cryptography.X509Certificates.X509Certificate2 as parameters.


Property Getters/Setters Summary
System.Security.Cryptography.X509Certificates.X509Certificate2getCertificate()
           Returns the instance of System.Security.Cryptography.X509Certificates.X509Certificate2 which holds private, public keys and certificate chain.
System.Security.Cryptography.X509Certificates.X509Certificate2 instance
 
Method Summary
static CertificateHoldercreate(byte[] certBytes, java.lang.String password)
           Creates CertificateHolder object using byte array of PKCS12 store and its password.
certBytes - A byte array that contains data from an X.509 certificate.
password - The password required to access the X.509 certificate data.
An instance of CertificateHolder
static CertificateHoldercreate(java.lang.String fileName, java.lang.String password)
           Creates CertificateHolder object using path to PKCS12 store and its password.
fileName - The name of a certificate file.
password - The password required to access the X.509 certificate data.
An instance of CertificateHolder
static CertificateHoldercreate(java.lang.String fileName, java.lang.String password, java.lang.String alias)
           Creates CertificateHolder object using path to PKCS12 store, its password and the alias by using which private key and certificate will be found.
fileName - The name of a certificate file.
password - The password required to access the X.509 certificate data.
alias - The associated alias for a certificate and its private key
An instance of CertificateHolder
 

Property Getters/Setters Detail

getCertificate

public System.Security.Cryptography.X509Certificates.X509Certificate2 getCertificate()
Returns the instance of System.Security.Cryptography.X509Certificates.X509Certificate2 which holds private, public keys and certificate chain.
System.Security.Cryptography.X509Certificates.X509Certificate2 instance

Method Detail

create

public static CertificateHolder create(byte[] certBytes, java.lang.String password)
                                    throws java.lang.Exception
Creates CertificateHolder object using byte array of PKCS12 store and its password.
certBytes - A byte array that contains data from an X.509 certificate.
password - The password required to access the X.509 certificate data.
An instance of CertificateHolder

create

public static CertificateHolder create(java.lang.String fileName, java.lang.String password)
                                    throws java.lang.Exception
Creates CertificateHolder object using path to PKCS12 store and its password.
fileName - The name of a certificate file.
password - The password required to access the X.509 certificate data.
An instance of CertificateHolder

create

public static CertificateHolder create(java.lang.String fileName, java.lang.String password, java.lang.String alias)
                                    throws java.lang.Exception
Creates CertificateHolder object using path to PKCS12 store, its password and the alias by using which private key and certificate will be found.
fileName - The name of a certificate file.
password - The password required to access the X.509 certificate data.
alias - The associated alias for a certificate and its private key
An instance of CertificateHolder

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.