SSLCertificate objects allow Qore code to work with X.509 certificate data.
More...
SSLCertificate objects allow Qore code to work with X.509 certificate data.
◆ constructor() [1/2]
Qore::SSLCertificate::constructor |
( |
string |
pem | ) |
|
Creates the SSLCertificate object from the PEM-encoded version of the X.509 certificate.
- Parameters
-
pem | the PEM representation of the X.509 certificate |
- Example:
SSLCertificate cert(pem_cert_string);
- Exceptions
-
SSLCERTIFICATE-CONSTRUCTOR-ERROR | invalid X.509 certificate data |
- Since
- 0.8.4: the deprecated functionality where the if the string passed was less than 200 bytes long, it was assumed to be a file name has been removed; the string is assumed to be the PEM-encoded X.509 Certificate itself
◆ constructor() [2/2]
Qore::SSLCertificate::constructor |
( |
binary |
der | ) |
|
Creates the SSLCertificate object from the DER-encoded version of the X.509 certificate.
- Parameters
-
der | the DER-encoded representation of the X.509 certificate |
- Example:
SSLCertificate cert(der_cert);
- Exceptions
-
SSLCERTIFICATE-CONSTRUCTOR-ERROR | invalid X.509 certificate data |
◆ copy()
Qore::SSLCertificate::copy |
( |
| ) |
|
Copying objects of this class is not supported, an exception will be thrown.
- Exceptions
-
◆ getInfo()
hash Qore::SSLCertificate::getInfo |
( |
| ) |
|
Returns a hash of all information for the certificate.
- Returns
- a hash of all information for the certificate with the following keys:
- Code Flags:
- CONSTANT
- Example:
hash hash = cert.getInfo();
◆ getIssuerHash()
hash Qore::SSLCertificate::getIssuerHash |
( |
| ) |
|
Returns a hash of strings representing the issuer information of the certificate.
- Returns
- a hash of key-value pairs representing the issuer information of the certificate
- Code Flags:
- CONSTANT
- Example:
hash h = cert.getIssuerHash();
◆ getNotAfterDate()
date Qore::SSLCertificate::getNotAfterDate |
( |
| ) |
|
Returns a date/time value representing the end date of the certificate.
- Returns
- a date/time value representing the end date of the certificate
- Code Flags:
- CONSTANT
- Example:
date end = cert.getNotAfterDate();
◆ getNotBeforeDate()
date Qore::SSLCertificate::getNotBeforeDate |
( |
| ) |
|
Returns a date/time value representing the start date of the certificate.
- Returns
- a date/time value representing the start date of the certificate
- Code Flags:
- CONSTANT
- Example:
date start = cert.getNotBeforeDate();
◆ getPEM()
string Qore::SSLCertificate::getPEM |
( |
| ) |
|
Returns a string in PEM format representing the certificate.
- Returns
- a string in PEM format representing the certificate
- Example:
string pem_str = cert.getPEM();
- Exceptions
-
X509-ERROR | could not create PEM string from X509 certificate data |
◆ getPublicKey()
*binary Qore::SSLCertificate::getPublicKey |
( |
| ) |
|
Returns a binary object representing the public key of the certificate in DER (Distinguished Encoding Rules) format or NOTHING if no public key is present in the certificate.
- Returns
- a binary object representing the public key of the certificate in DER (Distinguished Encoding Rules) format or NOTHING if no public key is present in the certificate
- Code Flags:
- CONSTANT
- Example:
*binary bin = cert.getPublicKey();
◆ getPublicKeyAlgorithm()
string Qore::SSLCertificate::getPublicKeyAlgorithm |
( |
| ) |
|
Returns the name of the public key algorithm of the certificate.
- Returns
- the name of the public key algorithm of the certificate
- Code Flags:
- CONSTANT
- Example:
string str = cert.getPublicKeyAlgorithm();
◆ getPurposeHash()
hash Qore::SSLCertificate::getPurposeHash |
( |
| ) |
|
Returns a hash of booleans representing the allowed purposes of the certificate.
- Returns
- a hash of booleans representing the allowed purposes of the certificate
- Code Flags:
- CONSTANT
- Example:
hash h = cert.getPurposeHash();
◆ getSerialNumber()
int Qore::SSLCertificate::getSerialNumber |
( |
| ) |
|
Returns the integer serial number of the certificate.
- Returns
- the integer serial number of the certificate
- Code Flags:
- CONSTANT
- Example:
int sn = cert.getSerialNumber();
◆ getSignature()
binary Qore::SSLCertificate::getSignature |
( |
| ) |
|
Returns a binary object representing the signature of the certificate.
- Returns
- a binary object representing the signature of the certificate
- Code Flags:
- CONSTANT
- Example:
binary bin = cert.getSignature();
◆ getSignatureType()
string Qore::SSLCertificate::getSignatureType |
( |
| ) |
|
Returns the signature type of the certificate.
- Returns
- the signature type of the certificate
- Code Flags:
- CONSTANT
- Example:
string str = cert.getSignatureType();
◆ getSubjectHash()
hash Qore::SSLCertificate::getSubjectHash |
( |
| ) |
|
Returns a hash of strings representing the subject information of the certificate.
- Returns
- a hash of key-value pairs representing the subject information of the certificate
- Code Flags:
- CONSTANT
- Example:
hash h = cert.getSubjectHash();
◆ getVersion()
int Qore::SSLCertificate::getVersion |
( |
| ) |
|
Returns the version of the certificate as an integer.
- Returns
- the version of the certificate as an integer
- Code Flags:
- CONSTANT
- Example:
int ver = cert.getVersion();