|
Qt Cryptographic Architecture
|
Go to the documentation of this file.
47 class CertificateCollection;
48 class CertificateChain;
230 return !(*
this == other);
235 QSharedDataPointer<Private> d;
303 return !(*
this == other);
308 QSharedDataPointer<Private> d;
471 return !(*
this == other);
476 QSharedDataPointer<Private> d;
519 ValidateRevoked = 0x01,
520 ValidateExpired = 0x02,
521 ValidatePolicy = 0x04
1178 return !(*
this == other);
1190 friend class Private;
1191 QSharedDataPointer<Private> d;
1296 Validity * result =
nullptr)
const;
1306 return first().chain_validate(*
this, trusted, untrusted_crls, u, vf);
1313 return first().chain_complete(*
this, issuers, result);
1475 return !(*
this == other);
1589 friend class Private;
1590 QSharedDataPointer<Private> d;
1613 CessationOfOperation,
1707 return !(*
this == other);
1836 return !(*
this == other);
1911 friend class Private;
1912 QSharedDataPointer<Private> d;
2030 bool toPKCS7File(
const QString &fileName,
const QString &provider = QString());
2066 QSharedDataPointer<Private> d;
2315 bool toFile(
const QString &fileName,
const SecureArray &passphrase,
const QString &provider = QString())
const;
2350 const QString & provider = QString());
2385 const QString & provider = QString());
2389 QSharedDataPointer<Private> d;
2716 friend class Private;
@ DN
Distinguished name (the primary name)
Definition: qca_cert.h:127
@ IncorporationLocality
The locality of incorporation (EV certificates), id = "1.3.6.1.4.1.311.60.2.1.1".
Definition: qca_cert.h:72
bool operator==(const CertificateInfoType &other) const
Comparison operator.
bool operator==(const Certificate &a) const
Test for equality of two certificates.
QString toPEM() const
Export the Certificate into a PEM format.
CertificateChain complete(const QList< Certificate > &issuers=QList< Certificate >(), Validity *result=nullptr) const
Complete a certificate chain for the primary certificate, using the rest of the certificates in the c...
Definition: qca_cert.h:1309
@ KeyAgreement
Certificate can be used for key agreement, id = "KeyUsage.keyAgreement"
Definition: qca_cert.h:323
void loadPrivateKeyFromPEM(const QString &s)
Initiate an asynchronous loading of a PrivateKey from a PEM format string.
A Certificate Authority is used to generate Certificates and Certificate Revocation Lists (CRLs).
Definition: qca_cert.h:2078
@ ErrorExpiredCA
The Certificate Authority has expired.
Definition: qca_cert.h:509
@ ErrorInvalidPurpose
The purpose does not match the intended usage.
Definition: qca_cert.h:503
bool isNull() const
Test if this key is empty (null)
QString toPEM() const
Export the Certificate Request into a PEM format.
static CertificateCollection fromFlatTextFile(const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
import a CertificateCollection from a text file
QByteArray issuerKeyId() const
The key identification of the CRL issuer.
QDateTime notValidBefore() const
the first time the certificate will be valid
Section
Section of the certificate that the constraint belongs in.
Definition: qca_cert.h:370
CertificateOptions & operator=(const CertificateOptions &from)
Standard assignment operator.
bool operator!=(const CRL &other) const
Inequality operator.
Definition: qca_cert.h:1834
bool isCA() const
Test if the Certificate is valid as a Certificate Authority.
bool isNull() const
Test if this CRL entry is empty.
CertificateRequestFormat format() const
test the format type for this certificate
CertificateCollection & operator=(const CertificateCollection &from)
Standard assignment operator.
static KeyBundle fromFile(const QString &fileName, const SecureArray &passphrase=SecureArray(), ConvertResult *result=nullptr, const QString &provider=QString())
bool operator!=(const CertificateInfoType &other) const
Inequality operator.
Definition: qca_cert.h:228
Certificate information type.
Definition: qca_cert.h:120
void loadPrivateKeyFromDER(const SecureArray &a)
Initiate an asynchronous loading of a PrivateKey from a DER format array.
PrivateKey privateKey() const
The private key that has been loaded.
CertificateInfoOrdered dnOnly() const
Return a new CertificateInfoOrdered that only contains the Distinguished Name (DN) types found in thi...
Definition: qca_cert.h:582
QStringList userIds() const
The list of all user identifications associated with the key.
@ ErrorExpired
The certificate has expired, or is not yet valid (e.g.
Definition: qca_cert.h:507
bool operator==(const CertificateRequest &csr) const
Test for equality of two certificate requests.
static bool canUsePKCS7(const QString &provider=QString())
test if the CertificateCollection can be imported and exported to PKCS#7 format
@ ErrorPathLengthExceeded
The path length from the root CA to this certificate is too long.
Definition: qca_cert.h:506
bool isNull() const
test if the certificate request is empty
void setCRLLocations(const QStringList &locations)
set the CRL locations of the certificate
QCA_EXPORT QStringList makeFriendlyNames(const QList< Certificate > &list)
Create a list of unique friendly names among a list of certificates.
bool matchesHostName(const QString &host) const
Test if the subject of the certificate matches a specified host name.
PGPKey()
Create an empty PGP key.
bool toFile(const QString &fileName) const
Export the key to a file.
@ RemoveFromCRL
certificate was previously in a CRL, but is now valid
Definition: qca_cert.h:1615
@ IncorporationCountry
The country of incorporation (EV certificates), id = "1.3.6.1.4.1.311.60.2.1.3".
Definition: qca_cert.h:76
QByteArray toDER() const
Export the Certificate Revocation List (CRL) in DER format.
QByteArray toDER() const
Export the Certificate Request into a DER format.
Reason reason() const
The reason that this CRL entry was created.
QByteArray subjectKeyId() const
The key identifier associated with the subject.
@ IPAddress
IP address, id = "GeneralName.iPAddress".
Definition: qca_cert.h:79
KeyLoader(QObject *parent=nullptr)
Create a KeyLoader object.
bool toPEMFile(const QString &fileName) const
Export the Certificate Revocation List (CRL) into PEM format in a file.
KeyBundle & operator=(const KeyBundle &from)
Standard assignment operator.
@ Email
Email address, id = "GeneralName.rfc822Name".
Definition: qca_cert.h:67
Generic private key.
Definition: qca_publickey.h:833
@ KeyCertificateSign
Certificate can be used for key certificate signing, id = "KeyUsage.keyCertSign"
Definition: qca_cert.h:324
CertificateRequest(const CertificateRequest &from)
Standard copy constructor.
bool toPKCS7File(const QString &fileName, const QString &provider=QString())
export the CertificateCollection to a PKCS#7 file
QList< CRL > crls() const
The CRLs in this collection.
bool toPEMFile(const QString &fileName) const
Export the Certificate into PEM format in a file.
CertificateInfoOrdered subjectInfoOrdered() const
@ DataEncipherment
Certificate can be used for encrypting / decrypting data, id = "KeyUsage.dataEncipherment"
Definition: qca_cert.h:322
QCA - the Qt Cryptographic Architecture.
Definition: qca_basic.h:41
@ KeyCompromise
private key has been compromised
Definition: qca_cert.h:1609
void loadKeyBundleFromFile(const QString &fileName)
Initiate an asynchronous loading of a KeyBundle from a file.
void addCRL(const CRL &crl)
Append a CRL to this collection.
QString toString() const
Export the CertificateRequest to a string.
static Certificate fromPEM(const QString &s, ConvertResult *result=nullptr, const QString &provider=QString())
Import the certificate from PEM format.
General superclass for an algorithm.
Definition: qca_core.h:1164
CertificateInfoTypeKnown known() const
The type as part of the CertificateInfoTypeKnown enumerator.
One entry in a certificate information list.
Definition: qca_cert.h:246
static CertificateRequest fromPEMFile(const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
Import the certificate request from a file.
Certificate createCertificate(const PublicKey &key, const CertificateOptions &opts) const
Create a new Certificate.
QString challenge() const
The challenge associated with this certificate request.
static Certificate fromPEMFile(const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
Import the certificate from a file.
PGPKey & operator=(const PGPKey &from)
Standard assignment operator.
@ OrganizationalUnit
An part of an organisation (eg a division or branch), id = "2.5.4.11".
Definition: qca_cert.h:70
CertificateInfoType(const CertificateInfoType &from)
Standard copy constructor.
CertificateAuthority(const CertificateAuthority &from)
Copy constructor.
ConstraintType(const QString &id, Section section)
Construct a new constraint.
@ UsageTimeStamping
time stamping certificate
Definition: qca_cert.h:489
CertificateInfoPair & operator=(const CertificateInfoPair &from)
Standard assignment operator.
Constraints constraints() const
The constraints that apply to this certificate.
CertificateInfoType & operator=(const CertificateInfoType &from)
Standard assignment operator.
CRLEntry & operator=(const CRLEntry &from)
Standard assignment operator.
bool isNull() const
Test if the PGP key is empty (null)
bool toFlatTextFile(const QString &fileName)
export the CertificateCollection to a plain text file
CertificateRequest & operator=(const CertificateRequest &from)
Standard assignment operator.
CertificateInfo info() const
Information on the subject of the certificate.
bool isValid() const
Test if the certificate options object is valid.
bool isCA() const
test if the certificate is a CA cert
Validity validate(const CertificateCollection &trusted, const CertificateCollection &untrusted, UsageMode u=UsageAny, ValidateFlags vf=ValidateAll) const
Check the validity of a certificate.
@ OCSPSigning
Certificate can be used to sign an Online Certificate Status Protocol (OCSP) assertion,...
Definition: qca_cert.h:346
CertificateRequest(const CertificateOptions &opts, const PrivateKey &key, const QString &provider=QString())
Create a certificate request based on specified options.
static CertificateRequest fromString(const QString &s, ConvertResult *result=nullptr, const QString &provider=QString())
Import the CertificateRequest from a string.
QString fingerprint() const
The key fingerpint.
QStringList policies() const
The policies that apply to this certificate request.
CertificateInfoType(CertificateInfoTypeKnown known)
Construct a new type.
X.509 certificate provider.
Definition: qcaprovider.h:1325
CRLEntry(const CRLEntry &from)
Copy constructor.
CertificateOptions(CertificateRequestFormat format=PKCS10)
Create a Certificate options set.
QString commonName() const
The common name of the subject of the certificate.
static PGPKey fromString(const QString &s, ConvertResult *result=nullptr, const QString &provider=QString())
Import the key from a string.
SignatureAlgorithm
Signature algorithm variants.
Definition: qca_publickey.h:74
Bundle of Certificates and CRLs.
Definition: qca_cert.h:1929
CertificateAuthority(const Certificate &cert, const PrivateKey &key, const QString &provider)
Create a new Certificate Authority.
QString value() const
The value of the information stored in the pair.
ConstraintType()
Standard constructor.
QStringList policies() const
list the policies on this certificate
bool toPEMFile(const QString &fileName) const
Export the Certificate into PEM format in a file.
Section
Section of the certificate that the information belongs in.
Definition: qca_cert.h:126
QCA_EXPORT QString orderedToDNString(const CertificateInfoOrdered &in)
Convert to RFC 1779 string format.
Validity validate(const CertificateCollection &trusted, const QList< CRL > &untrusted_crls=QList< CRL >(), UsageMode u=UsageAny, ValidateFlags vf=ValidateAll) const
Check the validity of a certificate chain.
Definition: qca_cert.h:1299
@ CommonName
The common name (eg person), id = "2.5.4.3".
Definition: qca_cert.h:66
static KeyBundle fromArray(const QByteArray &a, const SecureArray &passphrase=SecureArray(), ConvertResult *result=nullptr, const QString &provider=QString())
@ ValidityGood
The certificate is valid.
Definition: qca_cert.h:498
void setValidityPeriod(const QDateTime &start, const QDateTime &end)
Set the validity period for the certificate.
SignatureAlgorithm signatureAlgorithm() const
The signature algorithm used for the signature on this certificate.
@ IncorporationState
The state of incorporation (EV certificates), id = "1.3.6.1.4.1.311.60.2.1.2".
Definition: qca_cert.h:74
@ State
The state within the country, id = "2.5.4.8".
Definition: qca_cert.h:73
@ UsageTLSServer
server side of a TLS or SSL connection
Definition: qca_cert.h:485
@ IPSecEndSystem
Certificate can be used to authenticate a endpoint in IPSEC, id = "1.3.6.1.5.5.7.3....
Definition: qca_cert.h:338
int pathLimit() const
The upper bound of the number of links in the certificate chain, if any.
CRLEntry(const Certificate &c, Reason r=Unspecified)
create a CRL entry
CertificateInfoOrdered issuerInfoOrdered() const
Information on the issuer of the CRL as an ordered list (QList of CertificateInfoPair).
CertificateRequestFormat
Certificate Request Format.
Definition: qca_cert.h:54
QList< ConstraintType > Constraints
Certificate constraints type
Definition: qca_cert.h:590
void change(CSRContext *c)
PublicKey subjectPublicKey() const
The public key belonging to the issuer.
@ UsageAny
Any application, or unspecified.
Definition: qca_cert.h:484
CertificateRequest(const QString &fileName)
Create a certificate request based on the contents of a file.
CertificateInfo issuerInfo() const
Properties of the issuer of the certificate.
bool operator!=(const CertificateInfoPair &other) const
Inequality operator.
Definition: qca_cert.h:301
KeyBundle keyBundle() const
The key bundle that has been loaded.
static PGPKey fromArray(const QByteArray &a, ConvertResult *result=nullptr, const QString &provider=QString())
Import the key from an array.
QDateTime expirationDate() const
The expiration date for the key.
@ IPSecTunnel
Certificate can be used to authenticate a tunnel in IPSEC, id = "1.3.6.1.5.5.7.3.6".
Definition: qca_cert.h:340
BigInteger serialNumber() const
The serial number of the certificate that is the subject of this CRL entry.
CRLEntry()
create an empty CRL entry
void setAsCA(int pathLimit=8)
set the certificate to be a CA cert
@ EmailLegacy
PKCS#9 Email field, id = "1.2.840.113549.1.9.1".
Definition: qca_cert.h:68
QStringList issuerLocations() const
list of URI locations for issuer certificate files
A chain of related Certificates.
Definition: qca_cert.h:1226
bool operator==(const ConstraintType &other) const
Comparison operator.
QString id() const
The type as an identifier string.
@ DNS
DNS name, id = "GeneralName.dNSName".
Definition: qca_cert.h:78
bool operator<(const CertificateInfoType &other) const
Comparison operator.
@ CACompromise
certificate authority has been compromised
Definition: qca_cert.h:1610
QByteArray toDER() const
Export the Certificate into a DER format.
@ ErrorRejected
The root CA rejected the certificate purpose.
Definition: qca_cert.h:499
CRL createCRL(const QDateTime &nextUpdate) const
Create a new Certificate Revocation List (CRL)
CertificateChain()
Create an empty certificate chain.
Definition: qca_cert.h:1231
PGPKey(const PGPKey &from)
Standard copy constructor.
@ DigitalSignature
Certificate can be used to create digital signatures, id = "KeyUsage.digitalSignature"
Definition: qca_cert.h:319
QByteArray toArray(const SecureArray &passphrase, const QString &provider=QString()) const
static PGPKey fromFile(const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
Import the key from a file.
Certificate Request
Definition: qca_cert.h:1326
ConstraintTypeKnown
Known types of certificate constraints.
Definition: qca_cert.h:317
@ ServerAuth
Certificate can be used for server authentication (e.g.
Definition: qca_cert.h:330
@ Country
The country, id = "2.5.4.6".
Definition: qca_cert.h:75
QStringList crlLocations() const
list of URI locations for CRL files
static CertificateRequest fromDER(const QByteArray &a, ConvertResult *result=nullptr, const QString &provider=QString())
Import the certificate request from DER.
QList< Certificate > certificates() const
The Certificates in this collection.
QMultiMap< CertificateInfoType, QString > CertificateInfo
Certificate properties type.
Definition: qca_cert.h:535
QDateTime time() const
The time this CRL entry was created.
void change(CertContext *c)
bool operator==(const CertificateInfoPair &other) const
Comparison operator.
@ ErrorInvalidCA
The Certificate Authority is invalid.
Definition: qca_cert.h:502
int pathLimit() const
The path limit for the certificate in this Certificate Request.
QStringList policies() const
The policies that apply to this certificate.
void setPolicies(const QStringList &policies)
set the policies on the certificate
bool inKeyring() const
Test if this key is in a keyring.
@ EmailProtection
Certificate can be used to sign / encrypt email, id = "1.3.6.1.5.5.7.3.4".
Definition: qca_cert.h:336
CertificateCollection & operator+=(const CertificateCollection &other)
Add another CertificateCollection to this collection.
@ UsageEmailProtection
email (S/MIME) certificate
Definition: qca_cert.h:488
static Certificate fromDER(const QByteArray &a, ConvertResult *result=nullptr, const QString &provider=QString())
Import the certificate from DER.
X.509 certificate request provider.
Definition: qcaprovider.h:1429
Secure array of bytes.
Definition: qca_tools.h:317
QList< CRLEntry > revoked() const
a list of the revoked certificates in this CRL
Ordered certificate properties type.
Definition: qca_cert.h:548
QStringList ocspLocations() const
List of URI locations for OCSP services.
bool isNull() const
Test if the certificate is empty (null)
static bool canUseFormat(CertificateRequestFormat f, const QString &provider=QString())
Test if the certificate request can use a specified format.
QString toString() const
Export the key to a string.
void loadKeyBundleFromArray(const QByteArray &a)
Initiate an asynchronous loading of a KeyBundle from an array.
CertificateInfoType(const QString &id, Section section)
Construct a new type.
QDateTime creationDate() const
The creation date for the key.
CRLEntry(const BigInteger serial, const QDateTime &time, Reason r=Unspecified)
create a CRL entry
Public Key (X.509) certificate.
Definition: qca_cert.h:857
UsageMode
Specify the intended usage of a certificate.
Definition: qca_cert.h:483
Arbitrary precision integer.
Definition: qca_tools.h:571
void setFormat(CertificateRequestFormat f)
Specify the format for this certificate.
Certificate Revocation List
Definition: qca_cert.h:1740
@ CodeSigning
Certificate can be used to sign code, id = "1.3.6.1.5.5.7.3.3".
Definition: qca_cert.h:334
CertificateInfoPair()
Standard constructor.
@ ErrorSelfSigned
The certificate is self-signed, and is not found in the list of trusted certificates.
Definition: qca_cert.h:504
CertificateOptions(const CertificateOptions &from)
Standard copy constructor.
CertificateInfoOrdered subjectInfoOrdered() const
Information on the subject of the certificate being requested, as an ordered list (QList of Certifica...
@ UsageCRLSigning
certificate revocation list signing certificate
Definition: qca_cert.h:490
Certificate chain and private key pair.
Definition: qca_cert.h:2176
void change(CRLContext *c)
int pathLimit() const
return the path limit on this certificate
QString challenge() const
The challenge part of the certificate.
QString primaryUserId() const
The primary user identification for the key.
QCA_EXPORT CertificateInfoOrdered orderedDNOnly(const CertificateInfoOrdered &in)
Return a new CertificateInfoOrdered that only contains the Distinguished Name (DN) types found in the...
static CertificateRequest fromPEM(const QString &s, ConvertResult *result=nullptr, const QString &provider=QString())
Import the certificate request from PEM format.
CertificateCollection(const CertificateCollection &from)
Standard copy constructor.
bool isTrusted() const
Test if the key is trusted.
void append(const CertificateCollection &other)
Add another CertificateCollection to this collection.
bool isNull() const
Test if the CRL is empty.
QStringList crlLocations() const
List of URI locations for CRL files.
void setCertificateChainAndKey(const CertificateChain &c, const PrivateKey &key)
Set the public certificate and private key.
X.509 certificate revocation list provider.
Definition: qcaprovider.h:1513
bool operator!=(const CRLEntry &other) const
Inequality operator.
Definition: qca_cert.h:1705
QStringList ocspLocations() const
list of URI locations for OCSP services
@ CRLSign
Certificate can be used to sign Certificate Revocation Lists, id = "KeyUsage.crlSign"
Definition: qca_cert.h:325
@ UsageCodeSigning
code signing certificate
Definition: qca_cert.h:487
CRL(const CRL &from)
Standard copy constructor.
@ CertificateHold
certificate is on hold
Definition: qca_cert.h:1614
bool operator<(const ConstraintType &other) const
Comparison operator.
bool operator!=(const Certificate &other) const
Inequality operator.
Definition: qca_cert.h:1176
QDateTime thisUpdate() const
the time that this CRL became (or becomes) valid
void setName(const QString &s)
Specify the name of this bundle.
const Certificate & primary() const
Return the primary (end-user) Certificate.
Definition: qca_cert.h:1249
bool operator==(const CRL &a) const
Test for equality of two Certificate Revocation Lists.
CertificateInfoPair(const CertificateInfoType &type, const QString &value)
Construct a new pair.
ConstraintTypeKnown known() const
The type as part of the ConstraintTypeKnown enumerator.
ValidateFlags
The conditions to validate for a certificate.
Definition: qca_cert.h:517
CertificateInfoType type() const
The type of information stored in the pair.
ConvertResult
Return value from a format conversion.
Definition: qca_publickey.h:119
Certificate(const CertificateOptions &opts, const PrivateKey &key, const QString &provider=QString())
Create a Certificate with specified options and a specified private key.
@ Unspecified
reason is unknown
Definition: qca_cert.h:1608
QString toPEM() const
Export the Certificate Revocation List (CRL) in PEM format.
@ ClientAuth
Certificate can be used for client authentication (e.g.
Definition: qca_cert.h:332
KeyBundle()
Create an empty KeyBundle.
Certificate(const QString &fileName)
Create a Certificate from a PEM encoded file.
CertificateInfoPair(const CertificateInfoPair &from)
Standard copy constructor.
CertificateInfo subjectInfo() const
Information on the subject of the certificate being requested.
Header file for core QCA infrastructure.
void setAsUser()
set the certificate to be a user cert (this is the default)
CertificateInfoTypeKnown
Known types of information stored in certificates.
Definition: qca_cert.h:65
KeyBundle(const KeyBundle &from)
Standard copy constructor.
QStringList issuerLocations() const
List of URI locations for issuer certificate files.
@ Organization
An organisation (eg company), id = "2.5.4.10".
Definition: qca_cert.h:69
bool isIssuerOf(const Certificate &other) const
Test if the Certificate has signed another Certificate object and is therefore the issuer.
QByteArray issuerKeyId() const
The key identifier associated with the issuer.
CertificateInfo issuerInfo() const
Information on the issuer of the CRL as a QMultiMap.
bool operator!=(const CertificateRequest &other) const
Inequality operator.
Definition: qca_cert.h:1473
int number() const
The CRL serial number.
@ TimeStamping
Certificate can be used to create a "time stamp" signature, id = "1.3.6.1.5.5.7.3....
Definition: qca_cert.h:344
CertificateCollection operator+(const CertificateCollection &other) const
Add another CertificateCollection to this collection.
void setOCSPLocations(const QStringList &locations)
set the OCSP service locations of the certificate
@ URI
Uniform Resource Identifier, id = "GeneralName.uniformResourceIdentifier".
Definition: qca_cert.h:77
PrivateKey privateKey() const
The private key part of this bundle.
bool isSelfSigned() const
Test if the Certificate is self-signed.
Constraints constraints() const
The constraints that apply to this certificate request.
@ ErrorRevoked
The certificate has been revoked.
Definition: qca_cert.h:505
Certificate constraint.
Definition: qca_cert.h:364
QDateTime notValidAfter() const
the last time the certificate is valid
ConstraintType & operator=(const ConstraintType &from)
Standard assignment operator.
ConstraintType(const ConstraintType &from)
Standard copy constructor.
@ IPSecUser
Certificate can be used to authenticate a user in IPSEC, id = "1.3.6.1.5.5.7.3.7".
Definition: qca_cert.h:342
static CRL fromPEMFile(const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
Import a PEM encoded Certificate Revocation List (CRL) from a file.
QString id() const
The type as an identifier string.
QByteArray toArray() const
Export the key to an array.
Certificate options
Definition: qca_cert.h:610
ConvertResult convertResult() const
The result of the loading process.
@ ErrorValidityUnknown
Validity is unknown.
Definition: qca_cert.h:510
bool toFile(const QString &fileName, const SecureArray &passphrase, const QString &provider=QString()) const
void setConstraints(const Constraints &constraints)
set the constraints on the certificate
@ UsageTLSClient
client side of a TLS or SSL connection
Definition: qca_cert.h:486
@ KeyUsage
Stored in the key usage section.
Definition: qca_cert.h:371
QString name() const
The name associated with this key.
CertificateChain certificateChain() const
The public certificate part of this bundle.
bool isCA() const
Test if this Certificate Request is for a Certificate Authority certificate.
QDateTime nextUpdate() const
the time that this CRL will be obsoleted
bool operator==(const CRLEntry &a) const
Test for equality of two CRL Entries.
void finished()
Signal that is emitted when the load process has completed.
CertificateInfoOrdered issuerInfoOrdered() const
Properties of the issuer of the certificate, as an ordered list (QList of CertificateInfoPair).
KeyBundle(const QString &fileName, const SecureArray &passphrase=SecureArray())
Create a KeyBundle from a PKCS12 (.p12) encoded file.
@ Locality
The locality (eg city, a shire, or part of a state), id = "2.5.4.7".
Definition: qca_cert.h:71
bool isSecret() const
Test if the PGP key is the secret key.
BigInteger serialNumber() const
The serial number of the certificate.
QString keyId() const
The Key identification for the PGP key.
Constraints constraints() const
List the constraints on this certificate.
Part of a CRL representing a single certificate.
Definition: qca_cert.h:1601
CertificateRequestFormat format() const
the format that this Certificate request is in
static CertificateCollection fromPKCS7File(const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
import a CertificateCollection from a PKCS#7 file
Pretty Good Privacy key.
Definition: qca_cert.h:2407
CRL & operator=(const CRL &from)
Standard assignment operator.
Certificate certificate() const
The Certificate belonging to the CertificateAuthority.
CertificateAuthority & operator=(const CertificateAuthority &from)
Standard assignment operator.
@ NonRepudiation
Certificate can be used for non-repudiation, id = "KeyUsage.nonRepudiation"
Definition: qca_cert.h:320
Certificate & operator=(const Certificate &from)
Standard assignment operator.
bool operator!=(const ConstraintType &other) const
Inequality operator.
Definition: qca_cert.h:469
SignatureAlgorithm signatureAlgorithm() const
The signature algorithm used for the signature on this CRL.
Header file for PublicKey and PrivateKey related classes.
Certificate(const Certificate &from)
Standard copy constructor.
Certificate signRequest(const CertificateRequest &req, const QDateTime ¬ValidAfter) const
Create a new Certificate by signing the provider CertificateRequest.
@ XMPP
XMPP address (see http://www.ietf.org/rfc/rfc3920.txt), id = "1.3.6.1.5.5.7.8.5".
Definition: qca_cert.h:80
CRL updateCRL(const CRL &crl, const QList< CRLEntry > &entries, const QDateTime &nextUpdate) const
Update the CRL to include new entries.
void setInfo(const CertificateInfo &info)
Specify information for the subject associated with the certificate.
Asynchronous private key loader.
Definition: qca_cert.h:2613
CertificateInfoOrdered infoOrdered() const
Information on the subject of the certificate, in the exact order the items will be written.
Generic public key.
Definition: qca_publickey.h:529
bool operator<(const CRLEntry &a) const
Test if one CRL entry is "less than" another.
PublicKey subjectPublicKey() const
The public key associated with the subject of the certificate.
Validity
The validity (or otherwise) of a certificate.
Definition: qca_cert.h:497
CertificateRequest()
Create an empty certificate request.
void loadPrivateKeyFromPEMFile(const QString &fileName)
Initiate an asynchronous loading of a PrivateKey from a PEM format file.
@ EncipherOnly
Certificate can only be used for encryption, id = "KeyUsage.encipherOnly"
Definition: qca_cert.h:326
PGPKey(const QString &fileName)
Create a PGP key from an encoded file.
void setInfoOrdered(const CertificateInfoOrdered &info)
Specify information for the subject associated with the certificate.
@ SPKAC
Signed Public Key and Challenge (Netscape) format.
Definition: qca_cert.h:56
CertificateCollection()
Create an empty Certificate / CRL collection.
void addCertificate(const Certificate &cert)
Append a Certificate to this collection.
@ ErrorUntrusted
The certificate is not trusted.
Definition: qca_cert.h:500
@ ErrorSignatureFailed
The signature does not match.
Definition: qca_cert.h:501
void setChallenge(const QString &s)
Specify the challenge associated with this certificate.
BigInteger serialNumber() const
The serial number for the certificate.
SignatureAlgorithm signatureAlgorithm() const
The algorithm used to make the signature on this certificate request.
Section section() const
The section the constraint is part of.
void setSerialNumber(const BigInteger &i)
Set the serial number property on this certificate.
CertificateInfo subjectInfo() const
QDateTime notValidBefore() const
The earliest date that the certificate is valid.
QString toString() const
Convert to RFC 1779 string format.
Definition: qca_cert.h:577
@ PKCS10
standard PKCS#10 format
Definition: qca_cert.h:55
CertificateChain(const Certificate &primary)
Create a certificate chain, starting at the specified certificate.
Definition: qca_cert.h:1241
Section section() const
The section the type is part of.
@ DecipherOnly
Certificate can only be used for decryption, id = "KeyUsage.decipherOnly"
Definition: qca_cert.h:327
CertificateInfoType()
Standard constructor.
@ KeyEncipherment
Certificate can be used for encrypting / decrypting keys, id = "KeyUsage.keyEncipherment"
Definition: qca_cert.h:321
QDateTime notValidAfter() const
The latest date that the certificate is valid.
static CRL fromPEM(const QString &s, ConvertResult *result=nullptr, const QString &provider=QString())
Import a PEM encoded Certificate Revocation List (CRL)
@ Superseded
certificate has been superseded
Definition: qca_cert.h:1612
static CRL fromDER(const QByteArray &a, ConvertResult *result=nullptr, const QString &provider=QString())
Import a DER encoded Certificate Revocation List (CRL)
Certificate()
Create an empty Certificate.
ConstraintType(ConstraintTypeKnown known)
Construct a new constraint.
Reason
The reason why the certificate has been revoked.
Definition: qca_cert.h:1607
void setIssuerLocations(const QStringList &locations)
set the issuer certificate locations of the certificate