PcapPlusPlus
Next
|
#include <X509Decoder.h>
Public Member Functions | |
X509Version | getVersion () const |
X509SerialNumber | getSerialNumber () const |
X509Name | getIssuer () const |
X509Name | getSubject () const |
X509Timestamp | getNotBefore () const |
X509Timestamp | getNotAfter () const |
X509Algorithm | getPublicKeyAlgorithm () const |
X509Key | getPublicKey () const |
X509Algorithm | getSignatureAlgorithm () const |
X509Key | getSignature () const |
size_t | getExtensionCount () const |
bool | hasExtension (const X509ExtensionType &extensionType) const |
std::vector< uint8_t > | toDER () const |
std::string | toJson (int indent=-1) const |
const X509Internal::X509Certificate * | getRawCertificate () const |
Static Public Member Functions | |
static std::unique_ptr< X509Certificate > | fromDER (uint8_t *derData, size_t derDataLen, bool ownDerData=false) |
static std::unique_ptr< X509Certificate > | fromDER (const std::string &derData) |
static std::unique_ptr< X509Certificate > | fromDERFile (const std::string &derFileName) |
Represents an X.509 certificate
|
static |
Creates an X509Certificate from a hex string containing DER-encoded data
[in] | derData | Hex string containing DER-encoded certificate data |
An | exception if the data is not a valid ASN.1 record |
|
static |
Creates an X509Certificate from DER-encoded data
[in] | derData | Pointer to the DER-encoded certificate data |
[in] | derDataLen | Length of the DER-encoded data |
[in] | ownDerData | If true, the certificate will take ownership of the data and free it when the certificate class is destructed |
An | exception if the data is not a valid ASN.1 record |
|
static |
Creates an X509Certificate from a file containing DER-encoded data
[in] | derFileName | Path to the file containing DER-encoded certificate |
An | exception if the file doesn't exist, cannot be read or contains invalid data |
size_t pcpp::X509Certificate::getExtensionCount | ( | ) | const |
Gets the number of extensions in the certificate
X509Name pcpp::X509Certificate::getIssuer | ( | ) | const |
Gets the issuer of the certificate
X509Timestamp pcpp::X509Certificate::getNotAfter | ( | ) | const |
Gets the notAfter timestamp of the certificate's validity period
X509Timestamp pcpp::X509Certificate::getNotBefore | ( | ) | const |
Gets the notBefore timestamp of the certificate's validity period
X509Key pcpp::X509Certificate::getPublicKey | ( | ) | const |
Gets the public key from the certificate
X509Algorithm pcpp::X509Certificate::getPublicKeyAlgorithm | ( | ) | const |
Gets the public key algorithm used in the certificate
const X509Internal::X509Certificate* pcpp::X509Certificate::getRawCertificate | ( | ) | const |
Gets the raw internal certificate object
X509SerialNumber pcpp::X509Certificate::getSerialNumber | ( | ) | const |
Gets the serial number of the certificate
X509Key pcpp::X509Certificate::getSignature | ( | ) | const |
Gets the signature of the certificate
X509Algorithm pcpp::X509Certificate::getSignatureAlgorithm | ( | ) | const |
Gets the signature algorithm used to sign the certificate
X509Name pcpp::X509Certificate::getSubject | ( | ) | const |
Gets the subject of the certificate
X509Version pcpp::X509Certificate::getVersion | ( | ) | const |
Gets the version of the certificate
bool pcpp::X509Certificate::hasExtension | ( | const X509ExtensionType & | extensionType | ) | const |
Checks if the certificate has a specific extension
[in] | extensionType | The extension type to check for |
std::vector<uint8_t> pcpp::X509Certificate::toDER | ( | ) | const |
Converts the certificate to DER-encoded format
std::string pcpp::X509Certificate::toJson | ( | int | indent = -1 | ) | const |
Converts the certificate to a JSON string representation
[in] | indent | Number of spaces to use for indentation (-1 for no pretty printing) |