qca
QCA::Certificate Class Reference
[QCA user API]
#include <QtCrypto>

Detailed Description
Public Key (X.509) certificate.This class contains one X.509 certificate
Definition at line 849 of file qca_cert.h.
Constructor & Destructor Documentation
| QCA::Certificate::Certificate | ( | ) |
| QCA::Certificate::Certificate | ( | const QString & | fileName | ) |
Create a Certificate from a PEM encoded file.
- Parameters:
-
fileName the name (and path, if required) of the file that contains the PEM encoded certificate
Definition at line 1431 of file qca_cert.cpp.
| QCA::Certificate::Certificate | ( | const CertificateOptions & | opts, | |
| const PrivateKey & | key, | |||
| const QString & | provider = QString() | |||
| ) |
Create a Certificate with specified options and a specified private key.
- Parameters:
-
opts the options to use key the private key for this certificate provider the provider to use to create this key, if a particular provider is required
Definition at line 1437 of file qca_cert.cpp.
| QCA::Certificate::Certificate | ( | const Certificate & | from | ) |
Standard copy constructor.
- Parameters:
-
from the certificate to copy from
Definition at line 1447 of file qca_cert.cpp.
| QCA::Certificate::~Certificate | ( | ) |
Definition at line 1452 of file qca_cert.cpp.
Member Function Documentation
| void QCA::Certificate::change | ( | CertContext * | c | ) |
For internal use only.
- Parameters:
-
c context (internal)
Definition at line 1726 of file qca_cert.cpp.
| QString QCA::Certificate::commonName | ( | ) | const |
The common name of the subject of the certificate.
Common names are normally the name of a person, company or organisation
Definition at line 1523 of file qca_cert.cpp.
| Constraints QCA::Certificate::constraints | ( | ) | const |
| QStringList QCA::Certificate::crlLocations | ( | ) | const |
List of URI locations for CRL files.
Each URI refers to the same CRL file
Definition at line 1508 of file qca_cert.cpp.
| Certificate QCA::Certificate::fromDER | ( | const QByteArray & | a, | |
| ConvertResult * | result = 0, |
|||
| const QString & | provider = QString() | |||
| ) | [static] |
Import the certificate from DER.
- Parameters:
-
a the array containing the certificate in DER format result a pointer to a ConvertResult, which if not-null will be set to the conversion status provider the provider to use, if a specific provider is required
- Returns:
- the Certificate corresponding to the certificate in the provided array
Definition at line 1604 of file qca_cert.cpp.
| Certificate QCA::Certificate::fromPEM | ( | const QString & | s, | |
| ConvertResult * | result = 0, |
|||
| const QString & | provider = QString() | |||
| ) | [static] |
Import the certificate from PEM format.
- Parameters:
-
s the string containing the certificate in PEM format result a pointer to a ConvertResult, which if not-null will be set to the conversion status provider the provider to use, if a specific provider is required
- Returns:
- the Certificate corresponding to the certificate in the provided string
Definition at line 1618 of file qca_cert.cpp.
| Certificate QCA::Certificate::fromPEMFile | ( | const QString & | fileName, | |
| ConvertResult * | result = 0, |
|||
| const QString & | provider = QString() | |||
| ) | [static] |
Import the certificate from a file.
- Parameters:
-
fileName the name (and path, if required) of the file containing the certificate in PEM format result a pointer to a ConvertResult, which if not-null will be set to the conversion status provider the provider to use, if a specific provider is required
- Returns:
- the Certificate corresponding to the certificate in the provided string
Definition at line 1632 of file qca_cert.cpp.
| bool QCA::Certificate::isCA | ( | ) | const |
Test if the Certificate is valid as a Certificate Authority.
- Returns:
- true if the Certificate is valid as a Certificate Authority
Definition at line 1541 of file qca_cert.cpp.
| bool QCA::Certificate::isIssuerOf | ( | const Certificate & | other | ) | const |
Test if the Certificate has signed another Certificate object and is therefore the issuer.
- Parameters:
-
other the certificate to test
- Returns:
- true if this certificate is the issuer of the argument
Definition at line 1551 of file qca_cert.cpp.
| bool QCA::Certificate::isNull | ( | ) | const |
Test if the certificate is empty (null).
- Returns:
- true if the certificate is null
Definition at line 1463 of file qca_cert.cpp.
| bool QCA::Certificate::isSelfSigned | ( | ) | const |
Test if the Certificate is self-signed.
- Returns:
- true if the certificate is self-signed
Definition at line 1546 of file qca_cert.cpp.
| CertificateInfo QCA::Certificate::issuerInfo | ( | ) | const |
Properties of the issuer of the certificate.
- See also:
- subjectInfo for how the return value works.
Definition at line 1488 of file qca_cert.cpp.
| CertificateInfoOrdered QCA::Certificate::issuerInfoOrdered | ( | ) | const |
Properties of the issuer of the certificate, as an ordered list (QList of CertificateInfoPair).
This allows access to the certificate information in the same order as they appear in a certificate. Each pair in the list has a type and a value.
- See also:
- issuerInfo for an unordered version
subjectInfoOrdered for the ordered information on the subject
CertificateInfoPair for the elements in the list
Definition at line 1493 of file qca_cert.cpp.
| QByteArray QCA::Certificate::issuerKeyId | ( | ) | const |
| QStringList QCA::Certificate::issuerLocations | ( | ) | const |
List of URI locations for issuer certificate files.
Each URI refers to the same issuer file
Definition at line 1513 of file qca_cert.cpp.
| bool QCA::Certificate::matchesHostName | ( | const QString & | host | ) | const |
Test if the subject of the certificate matches a specified host name.
This will return true (indicating a match), if the specified host name meets the RFC 2818 validation rules with this certificate.
If the host is an internationalized domain name, then it must be provided in unicode format, not in IDNA ACE/punycode format.
- Parameters:
-
host the name of the host to compare to
Definition at line 1646 of file qca_cert.cpp.
| QDateTime QCA::Certificate::notValidAfter | ( | ) | const |
| QDateTime QCA::Certificate::notValidBefore | ( | ) | const |
| QStringList QCA::Certificate::ocspLocations | ( | ) | const |
| bool QCA::Certificate::operator!= | ( | const Certificate & | other | ) | const [inline] |
Inequality operator.
- Parameters:
-
other the certificate to compare this certificate with
Definition at line 1164 of file qca_cert.h.
| Certificate & QCA::Certificate::operator= | ( | const Certificate & | from | ) |
Standard assignment operator.
- Parameters:
-
from the Certificate to assign from
Definition at line 1456 of file qca_cert.cpp.
| bool QCA::Certificate::operator== | ( | const Certificate & | a | ) | const |
Test for equality of two certificates.
- Parameters:
-
a the certificate to compare this certificate with
- Returns:
- true if the two certificates are the same
Definition at line 1710 of file qca_cert.cpp.
| int QCA::Certificate::pathLimit | ( | ) | const |
The upper bound of the number of links in the certificate chain, if any.
Definition at line 1557 of file qca_cert.cpp.
| QStringList QCA::Certificate::policies | ( | ) | const |
The policies that apply to this certificate.
Policies are specified as strings containing OIDs
Definition at line 1503 of file qca_cert.cpp.
| BigInteger QCA::Certificate::serialNumber | ( | ) | const |
| SignatureAlgorithm QCA::Certificate::signatureAlgorithm | ( | ) | const |
The signature algorithm used for the signature on this certificate.
Definition at line 1562 of file qca_cert.cpp.
| CertificateInfo QCA::Certificate::subjectInfo | ( | ) | const |
Properties of the subject of the certificate, as a QMultiMap.
This is the method that provides information on the subject organisation, common name, DNS name, and so on. The list of information types (i.e. the key to the multi-map) is a CertificateInfoType. The values are a list of QString.
An example of how you can iterate over the list is:
Definition at line 1478 of file qca_cert.cpp.
| CertificateInfoOrdered QCA::Certificate::subjectInfoOrdered | ( | ) | const |
Properties of the subject of the certificate, as an ordered list (QList of CertificateInfoPair).
This allows access to the certificate information in the same order as they appear in a certificate. Each pair in the list has a type and a value.
For example:
CertificateInfoOrdered info = cert.subjectInfoOrdered(); // info[0].type == CommonName // info[0].value == "example.com"
- See also:
- subjectInfo for an unordered version
issuerInfoOrdered for the ordered information on the issuer
CertificateInfoPair for the elements in the list
Definition at line 1483 of file qca_cert.cpp.
| QByteArray QCA::Certificate::subjectKeyId | ( | ) | const |
| PublicKey QCA::Certificate::subjectPublicKey | ( | ) | const |
The public key associated with the subject of the certificate.
Definition at line 1533 of file qca_cert.cpp.
| QByteArray QCA::Certificate::toDER | ( | ) | const |
| QString QCA::Certificate::toPEM | ( | ) | const |
| bool QCA::Certificate::toPEMFile | ( | const QString & | fileName | ) | const |
Export the Certificate into PEM format in a file.
- Parameters:
-
fileName the name of the file to use
Definition at line 1599 of file qca_cert.cpp.
| Validity QCA::Certificate::validate | ( | const CertificateCollection & | trusted, | |
| const CertificateCollection & | untrusted, | |||
| UsageMode | u = UsageAny, |
|||
| ValidateFlags | vf = ValidateAll | |||
| ) | const |
Check the validity of a certificate.
- Parameters:
-
trusted a collection of trusted certificates untrusted a collection of additional certificates, not necessarily trusted u the use required for the certificate vf the conditions to validate
- Note:
- This function may block
Definition at line 1577 of file qca_cert.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference