Pdf |
The PdfCertificate type exposes the following members.
Name | Description | |
---|---|---|
![]() | PdfCertificate(Object) | Initializes a new instance of the PdfCertificate class from the specified source. The certificate source is an instance of a X509Certificate2. |
![]() | PdfCertificate(String) | Initializes a new instance of the PdfCertificate class from a file with the specified file name. |
Name | Description | |
---|---|---|
![]() | Subject | Gets the subject distinguished name from the certificate. |
![]() | SubjectCommonName | Gets the value of a Common Name attribute from Subject's distinguished name. |
Name | Description | |
---|---|---|
![]() | Equals(Object) |
Determines whether the specified Object is equal to this PdfCertificate instance.
(Overrides ObjectEquals(Object)) |
![]() | Equals(PdfCertificate) | Determines whether the specified PdfCertificate is equal to this PdfCertificate instance. |
![]() ![]() | FromPem | Creates a PdfCertificate from a PEM encoded certificate data. Froms the pem. |
![]() | GetHashCode |
Returns a hash code for this PdfCertificate instance.
(Overrides ObjectGetHashCode) |
![]() | GetRawData | Gets the copy of raw data of a PdfCertificate. |
![]() | ToString |
Returns a String that represents this PdfCertificate instance.
(Overrides ObjectToString) |
SautinSoft.Pdf doesn't use X509Certificate2 class to represent a certificate because X509Certificate2 creates a file that holds the certificate with the public key (in various locations on a hard drive) and on some operating systems and platforms that file is not deleted unless Reset method is called. This creation of a file prevents usages of certificates in Medium Trust.
Another reason why SautinSoft.Pdf abstracts a certificate with a PdfCertificate class instead of using X509Certificate2 directly is to enable different implementations of a certificate. For example, either X509Certificate2 implementation from .NET or Org.BouncyCastle.X509.X509Certificate implementation from Bouncy Castle could be used.