X.509 certificate More...
Header: | #include <oxideqsslcertificate.h> |
Instantiated By: | SslCertificate |
enum | PrincipalAttr { PrincipalAttrOrganizationName, PrincipalAttrCommonName, PrincipalAttrLocalityName, PrincipalAttrOrganizationUnitName, PrincipalAttrCountryName, PrincipalAttrStateOrProvinceName } |
OxideQSslCertificate(const OxideQSslCertificate & other) | |
~OxideQSslCertificate() | |
QDateTime | effectiveDate() const |
QDateTime | expiryDate() const |
QString | fingerprintSHA1() const |
QStringList | getIssuerInfo(PrincipalAttr attr) const |
QStringList | getSubjectInfo(PrincipalAttr attr) const |
bool | isExpired() const |
bool | isValid() const |
QVariant | issuer() const |
QString | issuerDisplayName() const |
QString | serialNumber() const |
QString | subjectDisplayName() const |
QString | toPem() const |
bool | operator!=(const OxideQSslCertificate & other) const |
OxideQSslCertificate | operator=(const OxideQSslCertificate & other) |
bool | operator==(const OxideQSslCertificate & other) const |
X.509 certificate
OxideQSslCertificate represents a X.509 certificate provided by a remote server.
Information about the subject of the certificate can be discovered by calling getSubjectInfo. Information about the issuer of the certificate (the entity that signed it) can be discovered by calling getIssuerInfo. For self-signed certificates, this will return the same as getSubjectInfo.
For certificates that aren't self-signed, the issuer's certificate can be accessed via issuer.
This represents an issuer or subject field, which you can pass to getSubjectInfo or getIssuerInfo
Constant | Value | Description |
---|---|---|
OxideQSslCertificate::PrincipalAttrOrganizationName | 0 | 'O' - The name of the organization. |
OxideQSslCertificate::PrincipalAttrCommonName | 1 | 'CN' - The Common Name. Generally used to store the host name. |
OxideQSslCertificate::PrincipalAttrLocalityName | 2 | 'L' - The locality. |
OxideQSslCertificate::PrincipalAttrOrganizationUnitName | 3 | 'OU' - The organizational unit name. |
OxideQSslCertificate::PrincipalAttrCountryName | 4 | 'C' - The country name. |
OxideQSslCertificate::PrincipalAttrStateOrProvinceName | 5 | 'ST' - The state or province name. |
Copy constructs a certificate from other.
Destroys this certificate.
Returns the start date for this certificate.
Returns the expiry date for this certificate.
Returns the SHA1 fingerprint of this certificate as a hex encoded string.
Returns the value of the field specified by attr for this certificate's issuer.
Returns the value of the field specified by attr for this certificate's subject.
Returns true if this certificate has expired.
Returns true if this is a valid certificate instance. Instances created with the default constructor are invalid.
Returns the issuer of this certificate. If the certificate is not self-signed, this will be a valid OxideQSslCertificate. If the certificate is self-signed, this will be a null variant.
See also QVariant::isNull.
Returns the display name of the issuer of this certificate.
Returns the serial number of this certificate as a hex encoded string.
See also QByteArray::toHex.
Returns the display name of the subject of this certificate.
Returns a PEM encoded version of this certificate.
Returns true if this certificate does not equal other.
Assigns other to this certificate.
Returns true if this certificate equals other. A certificate will only be equal to one that it was copied from.