All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::X509Certificate Class Reference

#include <X509Certificate.h>

Public Member Functions

 X509Certificate (const X509Certificate &other)
 
X509Certificateoperator= (const X509Certificate &other)
 
 ~X509Certificate ()
 
void Destroy ()
 
X501DistinguishedName GetIssuerField () const
 
X501DistinguishedName GetSubjectField () const
 
Int64 GetNotBeforeEpochTime () const
 
Int64 GetNotAfterEpochTime () const
 
UInt32 GetRawX509VersionNumber () const
 
UString ToString () const
 
UString GetFingerprint (const enum DigestAlgorithm::Type in_digest_algorithm=DigestAlgorithm::e_SHA256) const
 
std::vector< UCharGetSerialNumber () const
 
std::vector< X509ExtensionGetExtensions () const
 
std::vector< UCharGetData () const
 
 X509Certificate (TRN_X509Certificate impl)
 

Public Attributes

TRN_X509Certificate m_impl
 

Detailed Description

This class represents an X509 public-key certificate, as specified in RFC 5280.

Definition at line 22 of file X509Certificate.h.

Constructor & Destructor Documentation

pdftron::PDF::X509Certificate::X509Certificate ( const X509Certificate other)
pdftron::PDF::X509Certificate::~X509Certificate ( )
pdftron::PDF::X509Certificate::X509Certificate ( TRN_X509Certificate  impl)

Member Function Documentation

void pdftron::PDF::X509Certificate::Destroy ( )
std::vector<UChar> pdftron::PDF::X509Certificate::GetData ( ) const

Retrieves the certificate as binary DER-encoded data. (DER is short for Distinguished Encoding Rules.).

Returns
a container of bytes representing the certificate, encoded as binary DER.
std::vector<X509Extension> pdftron::PDF::X509Certificate::GetExtensions ( ) const

Retrieves all extensions (as first specified in V3 of X509, see RFC 5280) from the certificate.

Returns
a container of X509Extension objects.
UString pdftron::PDF::X509Certificate::GetFingerprint ( const enum DigestAlgorithm::Type  in_digest_algorithm = DigestAlgorithm::e_SHA256) const

Retrieves, in a string, a text representation of a cryptographically-secure digest of the certificate that can be used to identify it uniquely.

Parameters
Anenumeration representing the digest algorithm to use. Currently supported are SHA-1 (SHA-160), SHA-256, SHA-384, and SHA-512.
Returns
a string representation of the fingerprint, in the form of double ASCII characters representing hex bytes, separated by colons
Note
Default algorithm parameter is currently SHA-256, but may change in future without further warning, pursuant to security needs.
X501DistinguishedName pdftron::PDF::X509Certificate::GetIssuerField ( ) const

Retrieves the names of the certificate issuer as a map of OIDs (i.e. one of the object identifiers from the X.500 attribute types) to string values. The issuer field identifies the entity that has signed and issued the certificate. The returned value will contain all of the AttributeTypeAndValue items from all of the RelativeDistinguishedNames in the Name of the issuer. See RFC 5280, section 4.1.2.4 and Appendix A.1 (page 116).

Returns
an X501DistinguishedName object
Int64 pdftron::PDF::X509Certificate::GetNotAfterEpochTime ( ) const

Retrieves the notAfter time from the certificate's Validity entry in the form of an integral value representing an epoch time.

Returns
an integer containing an epoch time
Int64 pdftron::PDF::X509Certificate::GetNotBeforeEpochTime ( ) const

Retrieves the notBefore time from the certificate's Validity entry in the form of an integral value representing an epoch time.

Returns
an integer containing an epoch time
UInt32 pdftron::PDF::X509Certificate::GetRawX509VersionNumber ( ) const

Retrieves the version number representing which version of X509 the certificate corresponds to, from the certificate.

Returns
an integer containing the version number
Note
The X509 version number in the certificate, which we return unchanged here, is zero-indexed and therefore is one less in value than the actual version. e.g. X509v3 is represented by a returned version number of 2.
std::vector<UChar> pdftron::PDF::X509Certificate::GetSerialNumber ( ) const

Retrieves the serialNumber entry from the certificate.

Returns
a big-integer-style container holding bytes representing the components of an integral serial number in big-endian order.
X501DistinguishedName pdftron::PDF::X509Certificate::GetSubjectField ( ) const

Retrieves the names of the certificate subject as a map of OIDs (i.e. one of the object identifiers from the X.500 attribute types) to string values. The subject field represents the identity of the entity associated with the certificate's public key. The returned value will contain all of the AttributeTypeAndValue items from all of the RelativeDistinguishedNames in the Name of the subject. See RFC 5280, section 4.1.2.6 and Appendix A.1 (page 116).

Returns
an X501DistinguishedName object
X509Certificate& pdftron::PDF::X509Certificate::operator= ( const X509Certificate other)
UString pdftron::PDF::X509Certificate::ToString ( ) const

Returns a string representation of the certificate.

Returns
a string representation of the certificate.
Note
Output may change in future versions.

Member Data Documentation

TRN_X509Certificate pdftron::PDF::X509Certificate::m_impl

Definition at line 128 of file X509Certificate.h.


The documentation for this class was generated from the following file: