Qt Cryptographic Architecture
|
#include <QtCrypto>
Public Member Functions | |
CertificateChain () | |
CertificateChain (const Certificate &primary) | |
CertificateChain | complete (const QList< Certificate > &issuers=QList< Certificate >(), Validity *result=0) const |
const Certificate & | primary () const |
Validity | validate (const CertificateCollection &trusted, const QList< CRL > &untrusted_crls=QList< CRL >(), UsageMode u=UsageAny, ValidateFlags vf=ValidateAll) const |
A chain of related Certificates.
CertificateChain is a list (a QList) of certificates that are related by the signature from one to another. If Certificate C signs Certificate B, and Certificate B signs Certificate A, then C, B and A form a chain.
The normal use of a CertificateChain is from a end-user Certificate (called the primary, equivalent to QList::first()) through some intermediate Certificates to some other Certificate (QList::last()), which might be a root Certificate Authority, but does not need to be.
You can build up the chain using normal QList operations, such as QList::append().
|
inline |
Create an empty certificate chain.
Referenced by complete().
|
inline |
Create a certificate chain, starting at the specified certificate.
primary | the end-user certificate that forms one end of the chain |
|
inline |
Return the primary (end-user) Certificate.
|
inline |
Check the validity of a certificate chain.
trusted | a collection of trusted certificates |
untrusted_crls | a list of additional CRLs, not necessarily trusted |
u | the use required for the primary certificate |
vf | the conditions to validate |
References QCA::ErrorValidityUnknown.
|
inline |
Complete a certificate chain for the primary certificate, using the rest of the certificates in the chain object, as well as those in issuers, as possible issuers in the chain.
If there are issuers missing, then the chain might be incomplete (at the worst case, if no issuers exist for the primary certificate, then the resulting chain will consist of just the primary certificate). Use the result argument to find out if there was a problem during completion. A result of ValidityGood means the chain was completed successfully.
The newly constructed CertificateChain is returned.
If the certificate chain is empty, then this will return an empty CertificateChain object.
issuers | a pool of issuers to draw from as necessary |
result | the result of the completion operation |
References CertificateChain().