Qore Programming Language Reference Manual 1.19.2
|
SSLCertificate objects allow Qore code to work with X.509 certificate data. More...
#include <QC_SSLCertificate.dox.h>
Public Member Methods | |
constructor (string pem) | |
Creates the SSLCertificate object from the PEM-encoded version of the X.509 certificate. More... | |
constructor (binary der) | |
Creates the SSLCertificate object from the DER-encoded version of the X.509 certificate. More... | |
copy () | |
Returns a copy of the certificate object. More... | |
binary | getDER () |
Returns a binary object in DER format representing the certificate. More... | |
hash< auto > | getInfo () |
Returns a hash of all information for the certificate. More... | |
hash< auto > | getIssuerHash () |
Returns a hash of strings representing the issuer information of the certificate. More... | |
date | getNotAfterDate () |
Returns a date/time value representing the end date of the certificate. More... | |
date | getNotBeforeDate () |
Returns a date/time value representing the start date of the certificate. More... | |
string | getPEM () |
Returns a string in PEM format representing the certificate. More... | |
*binary | 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. More... | |
string | getPublicKeyAlgorithm () |
Returns the name of the public key algorithm of the certificate. More... | |
hash< auto > | getPurposeHash () |
Returns a hash of booleans representing the allowed purposes of the certificate. More... | |
int | getSerialNumber () |
Returns the integer serial number of the certificate. More... | |
binary | getSignature () |
Returns a binary object representing the signature of the certificate. More... | |
string | getSignatureType () |
Returns the signature type of the certificate. More... | |
hash< auto > | getSubjectHash () |
Returns a hash of strings representing the subject information of the certificate. More... | |
int | getVersion () |
Returns the version of the certificate as an integer. More... | |
Public Member Methods inherited from Qore::Serializable | |
constructor () | |
The constructor does not perform any action; this class is just used to mark a class as serializable by inheriting this class. | |
copy () | |
The copy constructor does not perform any action; this class is just used to mark a class as serializable by inheriting this class. | |
serialize (OutputStream stream) | |
converts the object to binary data representing the object More... | |
binary | serialize () |
converts the object to binary data representing the object More... | |
hash< SerializationInfo > | serializeToData () |
converts the object to a serialization hash representing the object More... | |
Additional Inherited Members | |
Static Public Member Methods inherited from Qore::Serializable | |
static auto | deserialize (InputStream stream) |
Deserializes data produced with serialize() and returns the value represented by the data. More... | |
static auto | deserialize (binary bin) |
Deserializes data produced with serialize() and returns the value represented by the data. More... | |
static auto | deserialize (string bin) |
Deserializes data produced with serialize() and returns the value represented by the data. More... | |
static auto | deserialize (hash< SerializationInfo > data) |
Deserializes data produced with serializeToData() and returns the value represented by the data. More... | |
static hash< SerializationInfo > | deserializeToData (InputStream stream) |
Deserializes data produced with serialize() and returns the value represented by the data. More... | |
static hash< SerializationInfo > | deserializeToData (binary bin) |
Deserializes data produced with serialize() and returns the value represented by the data. More... | |
static | serialize (auto val, OutputStream stream) |
serializes the data and writes the serialized data to the given output stream More... | |
static binary | serialize (auto val) |
serializes the data and returns the serialized data as a binary object More... | |
static hash< SerializationInfo > | serializeToData (auto val) |
converts the value to a serialization hash representing the value More... | |
SSLCertificate objects allow Qore code to work with X.509 certificate data.
The SSLCertificate class supports data serialization; note that the serialized data is a representation of the data that does not require a password, so for source data that requires a password to use, the serialized representation of the private key should be protected carefully (transmitted only in an encrypted stream)
Qore::SSLCertificate::constructor | ( | binary | der | ) |
Creates the SSLCertificate object from the DER-encoded version of the X.509 certificate.
der | the DER-encoded representation of the X.509 certificate |
SSLCERTIFICATE-CONSTRUCTOR-ERROR | invalid X.509 certificate data |
Qore::SSLCertificate::constructor | ( | string | pem | ) |
Creates the SSLCertificate object from the PEM-encoded version of the X.509 certificate.
pem | the PEM representation of the X.509 certificate |
SSLCERTIFICATE-CONSTRUCTOR-ERROR | invalid X.509 certificate data |
Qore::SSLCertificate::copy | ( | ) |
Returns a copy of the certificate object.
binary Qore::SSLCertificate::getDER | ( | ) |
Returns a binary object in DER format representing the certificate.
X509-ERROR | could not create DER data from certificate data |
hash< auto > Qore::SSLCertificate::getInfo | ( | ) |
Returns a hash of all information for the certificate.
"version"
: The version of the X.509 certificate (see SSLCertificate::getVersion())"serialNumber"
: The serial number of the X.509 certificate (see SSLCertificate::getSerialNumber())"subject"
: The subject hash of the X.509 certificate (see SSLCertificate::getSubjectHash())"issuer"
: The issuer hash of the X.509 certificate (see SSLCertificate::getIssuerHash())"purposes"
: The purpose hash of the X.509 certificate (see SSLCertificate::getPurposeHash())"notBefore"
: The "not before date" of the X.509 certificate (see SSLCertificate::getNotBeforeDate())"notAfter"
: The "not after date" of the X.509 certificate (see SSLCertificate::getNotAfterDate())"signatureType"
: The signature type string of the X.509 certificate (see SSLCertificate::getSignatureType())"signature"
: The binary signature of the X.509 certificate (see SSLCertificate::getSignature())"publicKey"
: The binary public key of the X.509 certificate (see SSLCertificate::getPublicKey())hash< auto > Qore::SSLCertificate::getIssuerHash | ( | ) |
Returns a hash of strings representing the issuer information of the certificate.
date Qore::SSLCertificate::getNotAfterDate | ( | ) |
Returns a date/time value representing the end date of the certificate.
date Qore::SSLCertificate::getNotBeforeDate | ( | ) |
Returns a date/time value representing the start date of the certificate.
string Qore::SSLCertificate::getPEM | ( | ) |
Returns a string in PEM format representing the certificate.
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.
string Qore::SSLCertificate::getPublicKeyAlgorithm | ( | ) |
Returns the name of the public key algorithm of the certificate.
hash< auto > Qore::SSLCertificate::getPurposeHash | ( | ) |
Returns a hash of booleans representing the allowed purposes of the certificate.
int Qore::SSLCertificate::getSerialNumber | ( | ) |
Returns the integer serial number of the certificate.
binary Qore::SSLCertificate::getSignature | ( | ) |
Returns a binary object representing the signature of the certificate.
string Qore::SSLCertificate::getSignatureType | ( | ) |
Returns the signature type of the certificate.
hash< auto > Qore::SSLCertificate::getSubjectHash | ( | ) |
Returns a hash of strings representing the subject information of the certificate.