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.
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:
my 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
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:
my SSLCertificate $cert($der_cert);
- Exceptions
-
SSLCERTIFICATE-CONSTRUCTOR-ERROR | invalid X.509 certificate data |
Qore::SSLCertificate::copy |
( |
| ) |
|
Copying objects of this class is not supported, an exception will be thrown.
- Exceptions
-
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:
my
hash $hash = $cert.getInfo();
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:
my
hash $h = $cert.getIssuerHash();
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:
my
date $end = $cert.getNotAfterDate();
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:
my
date $start = $cert.getNotBeforeDate();
string Qore::SSLCertificate::getPEM |
( |
| ) |
|
Returns a string in PEM format representing the certificate.
- Returns
- a string in PEM format representing the certificate
- Example:
my string $pem_str = $cert.getPEM();
- Exceptions
-
X509-ERROR | could not create PEM string from X509 certificate data |
*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:
my *
binary $bin = $cert.getPublicKey();
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:
my string $str = $cert.getPublicKeyAlgorithm();
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:
my
hash $h = $cert.getPurposeHash();
int Qore::SSLCertificate::getSerialNumber |
( |
| ) |
|
Returns the integer serial number of the certificate.
- Returns
- the integer serial number of the certificate
- Code Flags:
- CONSTANT
- Example:
my int $sn = $cert.getSerialNumber();
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:
my
binary $bin = $cert.getSignature();
string Qore::SSLCertificate::getSignatureType |
( |
| ) |
|
Returns the signature type of the certificate.
- Returns
- the signature type of the certificate
- Code Flags:
- CONSTANT
- Example:
my string $str = $cert.getSignatureType();
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:
my
hash $h = $cert.getSubjectHash();
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:
my int $ver = $cert.getVersion();