Qt Cryptographic Architecture
|
Go to the documentation of this file.
46 #ifndef DOXYGEN_NO_PROVIDER_API
96 Q_DECLARE_INTERFACE(
QCAPlugin,
"com.affinix.qca.Plugin/1.0")
377 unsigned int keyLength,
379 unsigned int *iterationCount) = 0;
1798 virtual QString
id()
const = 0;
1946 virtual QString
name(
int id)
const = 0;
2250 virtual void setup(
bool serverMode,
const QString &hostName,
bool compress) = 0;
2373 virtual void update(
const QByteArray &from_net,
const QByteArray &from_app) = 0;
2573 virtual void setup(
const QString &service,
const QString &host,
const HostPort *local,
const HostPort *remote,
const QString &ext_id,
int ext_ssf) = 0;
2602 virtual void startClient(
const QStringList &mechlist,
bool allowClientSendFirst) = 0;
2619 virtual void startServer(
const QString &realm,
bool disableServerSendLast) = 0;
2672 virtual void update(
const QByteArray &from_net,
const QByteArray &from_app) = 0;
2887 virtual void update(
const QByteArray &in) = 0;
virtual void setupSign(const SecureMessageKeyList &keys, SecureMessage::SignMode m, bool bundleSigner, bool smime)=0
Configure a new signing operation.
virtual void startServer(const QString &realm, bool disableServerSendLast)=0
Begins the session in server mode, starting with the authentication.
virtual PKey::Type type() const =0
Returns the type of public key.
@ AuthCheck
Client login can be inspected (server only)
Definition: qcaprovider.h:2536
A discrete logarithm group.
Definition: qca_publickey.h:171
virtual QString name() const =0
Returns the name of this entry.
virtual ConvertResult publicFromDER(const QByteArray &a)
Read DER-formatted input and convert it into a public key.
virtual bool isAvailable() const
Returns true if the private key of this entry is present for use.
QByteArray sig
The signature data.
Definition: qcaprovider.h:1170
X.509 certificate revocation list properties.
Definition: qcaprovider.h:1219
virtual SASL::Params clientParams() const =0
Returns the needed/optional client parameters.
HKDF provider.
Definition: qcaprovider.h:393
virtual AuthTag tag() const =0
Returns the authentication tag for this cipher.
virtual CertContext * createCertificate(const PKeyContext &pub, const CertificateOptions &opts) const =0
Issue a certificate based on a public key and options, and return the certificate.
Direction
Direction settings for symmetric algorithms.
Definition: qca_core.h:141
virtual bool isNull() const =0
Returns true if there is a result to obtain.
virtual void setUntrustedCertificates(const CertificateCollection &untrusted)
Set the untrusted certificates and CRLs for this secure message system, to be used for validation.
MessageContext(Provider *p, const QString &type)
Standard constructor.
Definition: qcaprovider.h:2825
virtual bool compare(const CSRContext *other) const =0
Returns true if this certificate request is equal to another certificate request, otherwise false.
QString challenge
The SPKAC challenge value.
Definition: qcaprovider.h:1196
X.509 certificate and certificate request provider base.
Definition: qcaprovider.h:1015
CertificateInfoOrdered subject
The subject information.
Definition: qcaprovider.h:1102
Key derivation function provider.
Definition: qcaprovider.h:345
void finished()
Emitted when an asynchronous operation completes on this key.
virtual Validity validate(const QList< CertContext * > &trusted, const QList< CertContext * > &untrusted, const QList< CRLContext * > &crls, UsageMode u, ValidateFlags vf) const =0
Validate this certificate.
virtual void reset()=0
Reset the object to its initial state.
CertificateInfoOrdered issuer
The issuer information.
Definition: qcaprovider.h:1109
virtual void setCertificate(const CertificateChain &cert, const PrivateKey &key)=0
Set the local certificate.
virtual QList< int > keyStores()=0
Returns a list of integer context ids, each representing a keystore instance.
Algorithm provider.
Definition: qca_core.h:753
QList< CRLEntry > revoked
The revoked entries.
Definition: qcaprovider.h:1244
virtual void setup(const QString &service, const QString &host, const HostPort *local, const HostPort *remote, const QString &ext_id, int ext_ssf)=0
Configure a new session.
Discrete logarithm provider.
Definition: qcaprovider.h:427
virtual KeyBundle keyBundle() const
If this entry is of type KeyStoreEntry::TypeKeyBundle, this function returns the KeyBundle of the ent...
virtual int blockSize() const =0
Returns the block size for this cipher.
virtual void start()=0
Begins the session, starting with the handshake.
QDateTime end
The time the certificate expires.
Definition: qcaprovider.h:1097
virtual QStringList supportedMACTypes() const
The mac algorithms supported by the provider.
virtual CertContext * signRequest(const CSRContext &req, const QDateTime ¬ValidAfter) const =0
Issue a certificate based on a certificate request, and return the certificate.
virtual QList< CertificateInfoOrdered > issuerList() const =0
Returns the issuer list sent by the server (client mode only)
virtual bool isPrivate() const =0
Returns true if this is a private key, otherwise false.
virtual bool importKey(const PKeyBase *key)=0
Attempt to import a key from another provider.
quint16 port
The port.
Definition: qcaprovider.h:2525
Parameter flags for the SASL authentication.
Definition: qca_securelayer.h:907
KeyLength anyKeyLength() const
Returns a KeyLength that supports any length.
Definition: qcaprovider.h:324
virtual bool decrypt(const SecureArray &in, SecureArray *out, EncryptionAlgorithm alg)
Decrypt data.
virtual ConvertResult privateFromPEM(const QString &s, const SecureArray &passphrase)
Read PEM-formatted input and convert it into a private key.
Extended provider information.
Definition: qcaprovider.h:111
virtual void createPrivate(const DLGroup &domain, bool block)=0
Generate a Diffie-Hellman private key.
OpenPGP key provider.
Definition: qcaprovider.h:1720
SecureMessage provider.
Definition: qcaprovider.h:2804
Error
Errors for secure messages.
Definition: qca_securemessage.h:356
virtual bool ensureAccess()
Attempt to ensure the private key of this entry is usable and accessible, potentially prompting the u...
SignatureFormat
Signature formats (DSA only)
Definition: qca_publickey.h:92
DHContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:797
virtual KeyStoreEntryContext * entry(int id, const QString &entryId)
Returns a single entry in the store, if the entry id is already known.
QStringList policies
The policies.
Definition: qcaprovider.h:1119
virtual void fetchGroup(DLGroupSet set, bool block)=0
Attempt to create P, Q, and G values from the specified group set.
CAContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:1540
virtual ConvertResult fromPKCS12(const QByteArray &in, const SecureArray &passphrase, QString *name, QList< CertContext * > *chain, PKeyContext **priv) const =0
Read PKCS#12 DER input and convert it into a set of output items.
virtual void setup(bool serverMode, const QString &hostName, bool compress)=0
Configure a new session.
virtual bool removeEntry(int id, const QString &entryId)
Remove an entry from the store.
QDateTime expirationDate
The time the key expires.
Definition: qcaprovider.h:1687
virtual void update(const QByteArray &in)=0
Provide input to the message operation.
virtual void setup(Direction dir, const SymmetricKey &key, const InitializationVector &iv, const AuthTag &tag)=0
Set up the object for encrypt/decrypt.
virtual bool createSelfSigned(const CertificateOptions &opts, const PKeyContext &priv)=0
Create a self-signed certificate based on the given options and private key.
virtual Result result() const =0
Returns the result code of an operation.
virtual QByteArray signature() const =0
Returns the signature, in the case of a detached signature operation.
virtual int maxSSF() const =0
Returns the maximum SSF supported by this provider.
virtual bool endVerify(const QByteArray &sig)
Complete a verify operation, and return true if successful.
SMSContext(Provider *p, const QString &type)
Standard constructor.
Definition: qcaprovider.h:2998
virtual bool compare(const CertContext *other) const =0
Returns true if this certificate is equal to another certificate, otherwise false.
Generic private key.
Definition: qca_publickey.h:827
KeyStoreEntryContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:1786
KDFContext(Provider *p, const QString &type)
Standard constructor.
Definition: qcaprovider.h:354
InfoContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:119
virtual QString mech() const =0
Returns the mechanism selected.
virtual QByteArray stepData() const =0
Returns an authentication payload for to be transmitted over the network.
PGPKeyContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:1728
X.509 certificate collection provider.
Definition: qcaprovider.h:1484
virtual int encoded() const =0
Returns the number of bytes of plaintext data that is encoded inside of to_net()
virtual ConvertResult fromDER(const QByteArray &a)=0
Read DER-formatted input and convert it into this object.
virtual QStringList supportedHashTypes() const
The hash algorithms supported by the provider.
virtual QString hashName() const =0
Returns the name of the hash used to generate the signature, in the case of a signature operation.
QCA - the Qt Cryptographic Architecture.
Definition: qca_basic.h:41
virtual QStringList supportedCipherTypes() const
The cipher algorithms supported by the provider.
virtual void startVerify(SignatureAlgorithm alg, SignatureFormat format)
Begin a verify operation.
virtual bool compare(const CRLContext *other) const =0
Returns true if this CRL is equal to another CRL, otherwise false.
OpenPGP key properties.
Definition: qcaprovider.h:1661
virtual bool success() const =0
Returns true if the operation was successful.
virtual QList< KeyStoreEntryContext * > entryList(int id)=0
Returns the entries of the store, or an empty list if the integer context id is invalid.
DLGroupContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:435
virtual bool waitForResultsReady(int msecs)=0
Waits for a startClient(), startServer(), serverFirstStep(), nextStep(), tryAgain(),...
virtual const CertContextProps * props() const =0
Returns a pointer to the properties of this certificate request.
virtual bool finished() const =0
Returns true if the operation has finished, otherwise false.
virtual bool isReadOnly(int id) const
Returns true if the store is read-only.
virtual bool certificateRequested() const =0
Returns true if the peer is requesting a certificate.
@ Params
Parameters are needed to complete authentication.
Definition: qcaprovider.h:2535
virtual QByteArray toBinary() const =0
Convert the key to binary format, and return the value.
Header file for SecureLayer and its subclasses.
virtual void setup(const CertContext &cert, const PKeyContext &priv)=0
Prepare the object for usage.
Version
Version of TLS or SSL.
Definition: qca_securelayer.h:306
TLSSessionContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:2129
virtual SASL::AuthCondition authCondition() const =0
Returns the reason for failure, if the authentication was not successful.
virtual DLGroup domain() const =0
Returns the public domain component of this DSA key.
virtual bool canCompress() const =0
Returns true if the provider supports compression.
Container for keys for symmetric encryption algorithms.
Definition: qca_core.h:1252
void busyStart()
Emit this when the provider is busy looking for keystores.
void busyEnd()
Emit this to leave the busy state.
Type
The type of entry in the KeyStore.
Definition: qca_keystore.h:147
Provider plugin base class.
Definition: qcaprovider.h:83
virtual Validity validate_chain(const QList< CertContext * > &chain, const QList< CertContext * > &trusted, const QList< CRLContext * > &crls, UsageMode u, ValidateFlags vf) const =0
Validate a certificate chain.
QStringList crlLocations
A list of URIs for CRLs.
Definition: qcaprovider.h:1126
Header file for PGP key and X.509 certificate related classes.
void dtlsTimeout()
Emit this to force the application to call update(), even with empty arguments.
virtual QList< PKey::Type > supportedIOTypes() const =0
Returns a list of public key types that can be serialized and deserialized into DER and PEM format.
virtual QByteArray to_app()=0
Returns data that is decoded from the network and should be processed by the application.
virtual QString writeEntry(int id, const CRL &crl)
Write a CRL to the store.
virtual SessionInfo sessionInfo() const =0
Returns information about the active TLS session.
X.509 certificate provider.
Definition: qcaprovider.h:1275
virtual QByteArray read()=0
Extract output from the message operation.
TLS::Version version
The TLS protocol version being used for this connection.
Definition: qcaprovider.h:2166
virtual bool update(const SecureArray &in, SecureArray *out)=0
Process a chunk of data.
Internal context class used for the plugin.
KeyStoreEntry provider.
Definition: qcaprovider.h:1778
virtual void setClientParams(const QString *user, const QString *authzid, const SecureArray *pass, const QString *realm)=0
Set some of the client parameters (pass 0 to not set a field)
virtual Validity peerCertificateValidity() const =0
Returns the QCA::Validity of the peer certificate.
virtual void setTrustedCertificates(const CertificateCollection &trusted)=0
Set the list of trusted certificates.
virtual CRL crl() const
If this entry is of type KeyStoreEntry::TypeCRL, this function returns the CRL of the entry.
virtual QString storeId(int id) const =0
Returns the string id of the store, or an empty string if the integer context id is invalid.
CertContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:1283
SignatureAlgorithm sigalgo
The signature algorithm used by the issuer to sign the CRL.
Definition: qcaprovider.h:1254
QByteArray issuerId
The issuer id.
Definition: qcaprovider.h:1189
SignatureAlgorithm
Signature algorithm variants.
Definition: qca_publickey.h:74
Bundle of Certificates and CRLs.
Definition: qca_cert.h:1891
Container for initialisation vectors and nonces.
Definition: qca_core.h:1298
virtual bool isIssuerOf(const CertContext *other) const =0
Returns true if this certificate is an issuer of another certificate, otherwise false.
virtual void setConstraints(SASL::AuthFlags f, int minSSF, int maxSSF)=0
Set the constraints of the session using SSF values.
virtual int ssf() const =0
Returns the SSF of the active SASL session.
MACContext(Provider *p, const QString &type)
Standard constructor.
Definition: qcaprovider.h:292
virtual QString storeName() const =0
Returns the name of the store that contains this entry.
PKCS12Context(Provider *p)
Standard constructor.
Definition: qcaprovider.h:1617
bool isCA
True if the certificate is a CA or the certificate request is requesting to be a CA,...
Definition: qcaprovider.h:1153
Cipher provider.
Definition: qcaprovider.h:217
QString fingerprint
The hex fingerprint of the key.
Definition: qcaprovider.h:1694
Random provider.
Definition: qcaprovider.h:148
virtual KeyStoreEntry::Type type() const =0
Returns the entry type.
virtual QCA::Provider * createProvider()=0
Returns a newly allocated Provider instance.
virtual QByteArray to_net()=0
Returns data that should be sent across the network (for the security layer)
virtual ConvertResult fromPEM(const QString &s)=0
Read PEM-formatted input and convert it into this object.
bool isSecret
True if this key is a secret key, otherwise false.
Definition: qcaprovider.h:1677
virtual void update(const MemoryRegion &a)=0
Process a chunk of data.
CertificateRequestFormat
Certificate Request Format.
Definition: qca_cert.h:55
QList< ConstraintType > Constraints
Certificate constraints type
Definition: qca_cert.h:582
TLS "session" provider.
Definition: qcaprovider.h:2121
virtual void startSign(SignatureAlgorithm alg, SignatureFormat format)
Begin a signing operation.
virtual PGPKey pgpPublicKey() const
If this entry is of type KeyStoreEntry::TypePGPPublicKey or KeyStoreEntry::TypePGPSecretKey,...
virtual const PGPKeyContextProps * props() const =0
Returns a pointer to the properties of this key.
@ Success
Operation completed.
Definition: qcaprovider.h:2198
virtual SymmetricKey deriveKey(const PKeyBase &theirs)
Compute a symmetric key based on this private key and some other public key.
virtual bool canSignMultiple() const =0
Returns true if the provider supports multiple signers for signature creation or signature verificati...
Result
Result of a TLS operation.
Definition: qcaprovider.h:2197
CipherContext(Provider *p, const QString &type)
Standard constructor.
Definition: qcaprovider.h:229
virtual const CertContextProps * props() const =0
Returns a pointer to the properties of this certificate.
virtual int written()=0
Returns the number of input bytes accepted since the last call to update()
@ Decrypt
Decrypt (or Decrypt and Verify) operation.
Definition: qcaprovider.h:2813
EncryptionAlgorithm
Encryption algorithms.
Definition: qca_publickey.h:55
virtual bool haveClientInit() const =0
Returns true if the client has initialization data.
void storeUpdated(int id)
Indicates that the entry list of a keystore has changed (entries added, removed, or modified)
virtual bool canExport() const =0
Returns true if the components of this key are accessible and whether it can be serialized into an ou...
virtual QString storeId() const =0
Returns the id of the store that contains this entry.
virtual SecureArray nextBytes(int size)=0
Return an array of random bytes.
TLS provider.
Definition: qcaprovider.h:2143
Header file for secure message (PGP, CMS) classes.
RSAContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:644
X.509 certificate authority provider.
Definition: qcaprovider.h:1532
virtual Certificate certificate() const
If this entry is of type KeyStoreEntry::TypeCertificate, this function returns the Certificate of the...
QByteArray sig
The signature data of the CRL.
Definition: qcaprovider.h:1249
bool isCompressed
True if the TLS connection is compressed, otherwise false.
Definition: qcaprovider.h:2161
RSA provider.
Definition: qcaprovider.h:636
A chain of related Certificates.
Definition: qca_cert.h:1208
CRLContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:1457
virtual QString serialize() const =0
Serialize the information about this entry.
virtual bool canSetHostName() const =0
Returns true if the provider supports server name indication.
virtual BigInteger e() const =0
Returns the public E component of this RSA key.
virtual SecureMessage::Type type() const =0
The type of secure message (e.g.
virtual void shutdown()=0
Sets the session to the shutdown state.
Operation
The type of operation being performed.
Definition: qcaprovider.h:2811
virtual void update(const QByteArray &from_net, const QByteArray &from_app)=0
Performs one iteration of the TLS session processing.
virtual void setPrivateKeys(const QList< SecureMessageKey > &keys)
Set the private keys for this secure message system, to be used for decryption.
virtual void createPrivate(const BigInteger &n, const BigInteger &e, const BigInteger &p, const BigInteger &q, const BigInteger &d)=0
Create an RSA private key based on the five components.
int pathLimit
The path limit.
Definition: qcaprovider.h:1165
virtual QString privateToPEM(const SecureArray &passphrase, PBEAlgorithm pbe) const
Convert a private key to PEM format, and return the value.
virtual CRLContext * createCRL(const QDateTime &nextUpdate) const =0
Create a new CRL and return it.
TLSSessionContext * id
Pointer to the id of this TLS session, for use with resuming.
Definition: qcaprovider.h:2190
QStringList userIds
List of user id strings for the key, the first one being the primary user id.
Definition: qcaprovider.h:1672
virtual void setSessionId(const TLSSessionContext &id)=0
Set the TLS session id, for session resuming.
@ Encrypt
Encrypt operation.
Definition: qcaprovider.h:2812
void resultsReady()
Emit this when a start() or update() operation has completed.
virtual void createPrivate(const DLGroup &domain, const BigInteger &y, const BigInteger &x)=0
Create a DSA private key based on its numeric components.
virtual QString writeEntry(int id, const Certificate &cert)
Write a Certificate to the store.
virtual void setUpdatesEnabled(bool enabled)
Enables or disables update events.
virtual QByteArray to_app()=0
Returns data that is decoded from the network and should be processed by the application.
Diffie-Hellman provider.
Definition: qcaprovider.h:789
KeyStoreListContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:1891
Format
Formats for secure messages.
Definition: qca_securemessage.h:347
virtual int maximumEncryptSize(EncryptionAlgorithm alg) const
Returns the maximum number of bytes that can be encrypted by this key.
@ Sign
Sign operation.
Definition: qcaprovider.h:2814
virtual QByteArray unprocessed()=0
Returns any unprocessed network input data.
virtual void setup(const SymmetricKey &key)=0
Set up the object for hashing.
virtual QByteArray toPKCS12(const QString &name, const QList< const CertContext * > &chain, const PKeyContext &priv, const SecureArray &passphrase) const =0
Create PKCS#12 DER output based on a set of input items.
CertificateRequestFormat format
The format used for the certificate request.
Definition: qcaprovider.h:1203
X.509 certificate request provider.
Definition: qcaprovider.h:1368
@ Error
Operation failed.
Definition: qcaprovider.h:2534
virtual KeyStoreEntryContext * entryPassive(const QString &serialized)
Returns a single entry, created from the serialization string of a previous entry (using KeyStoreEntr...
Secure array of bytes.
Definition: qca_tools.h:317
virtual QList< PKey::Type > supportedTypes() const =0
Returns a list of supported public key types.
Ordered certificate properties type.
Definition: qca_cert.h:540
virtual DLGroup domain() const =0
Returns the public domain component of this Diffie-Hellman key.
virtual SymmetricKey makeKey(const SecureArray &secret, const InitializationVector &salt, const InitializationVector &info, unsigned int keyLength)=0
Create a key and return it.
virtual BigInteger y() const =0
Returns the public Y component of this Diffie-Hellman key.
virtual void update(const QByteArray &from_net, const QByteArray &from_app)=0
Performs one iteration of the SASL security layer processing.
bool inKeyring
True if this key is in a keyring (and thus usable), otherwise false.
Definition: qcaprovider.h:1700
Hash provider.
Definition: qcaprovider.h:177
SecureMessageSystem provider.
Definition: qcaprovider.h:2989
virtual QByteArray toPKCS7(const QList< CertContext * > &certs, const QList< CRLContext * > &crls) const =0
Create PKCS#7 DER output based on the input certificates and CRLs.
Public Key (X.509) certificate.
Definition: qca_cert.h:849
RandomContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:156
virtual void setMTU(int size)
Set the maximum transmission unit size.
UsageMode
Specify the intended usage of a certificate.
Definition: qca_cert.h:476
Arbitrary precision integer.
Definition: qca_tools.h:571
virtual QString writeEntry(int id, const KeyBundle &kb)
Write a KeyBundle to the store.
virtual QString authzid() const =0
Returns the authzid attempting to authorize (server mode only)
virtual void setConstraints(const QStringList &cipherSuiteList)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
Certificate Revocation List
Definition: qca_cert.h:1703
SASL provider.
Definition: qcaprovider.h:2502
virtual bool serverHelloReceived() const =0
Returns true if the TLS server hello has been received.
virtual bool isNull() const =0
Returns true if this object is not valid.
Result
Result of a SASL operation.
Definition: qcaprovider.h:2532
Public key implementation provider base.
Definition: qcaprovider.h:492
Certificate chain and private key pair.
Definition: qca_cert.h:2136
HKDFContext(Provider *p, const QString &type)
Standard constructor.
Definition: qcaprovider.h:402
Type
The type of secure message.
Definition: qca_securemessage.h:328
HashContext(Provider *p, const QString &type)
Standard constructor.
Definition: qcaprovider.h:186
Type
Types of public key cryptography keys supported by QCA.
Definition: qca_publickey.h:255
int cipherMaxBits
The maximum bit size possible of the cipher used for this connection.
Definition: qcaprovider.h:2184
QDateTime start
The time the certificate becomes valid (often the time of create)
Definition: qcaprovider.h:1090
virtual BigInteger x() const =0
Returns the private X component of this Diffie-Hellman key.
int cipherBits
The bit size of the cipher used for this connection.
Definition: qcaprovider.h:2178
virtual void setupVerify(const QByteArray &detachedSig)=0
Configure a new verify operation.
virtual void update(const MemoryRegion &in)
Process the plaintext input data for either signing or verifying, whichever operation is active.
virtual QStringList mechlist() const =0
Returns the mechanism list (server mode only)
virtual bool waitForResultsReady(int msecs)=0
Waits for a start() or update() operation to complete.
virtual ConvertResult publicFromPEM(const QString &s)
Read PEM-formatted input and convert it into a public key.
virtual void getResult(BigInteger *p, BigInteger *q, BigInteger *g) const =0
Obtain the result of the operation.
virtual CertContext * certificate() const =0
Returns a copy of the CA's certificate.
virtual SecureMessage::Error errorCode() const =0
Returns the reason for failure, if the operation was not successful.
TLSContext(Provider *p, const QString &type)
Standard constructor.
Definition: qcaprovider.h:2209
virtual bool createRequest(const CertificateOptions &opts, const PKeyContext &priv)=0
Create a certificate request based on the given options and private key.
virtual BigInteger x() const =0
Returns the private X component of this DSA key.
Convenience class to hold an IP address and an associated port.
Definition: qcaprovider.h:2515
virtual QString name(int id) const =0
Returns the friendly name of the store, or an empty string if the integer context id is invalid.
X.509 certificate revocation list provider.
Definition: qcaprovider.h:1449
virtual BigInteger y() const =0
Returns the public Y component of this DSA key.
virtual void createPrivate(int bits, int exp, bool block)=0
Generate an RSA private key.
virtual void setConstraints(int minSSF, int maxSSF)=0
Set the constraints of the session using SSF values.
QDateTime creationDate
The time the key was created.
Definition: qcaprovider.h:1682
virtual void start(SecureMessage::Format f, Operation op)=0
Begins the secure message operation.
virtual KeyStore::Type type(int id) const =0
Returns the type of the specified store, or -1 if the integer context id is invalid.
virtual ConvertResult fromSPKAC(const QString &s)=0
Read Netscape SPKAC input and convert it into a certificate request.
virtual CertificateChain peerCertificateChain() const =0
Returns the peer certificate chain.
ValidateFlags
The conditions to validate for a certificate.
Definition: qca_cert.h:509
virtual QByteArray endSign()
Complete a signing operation, and return the signature value.
virtual KeyLength keyLength() const =0
Returns the KeyLength for this cipher.
virtual bool eof() const =0
Returns true if the peer has closed the stream.
virtual void createPublic(const BigInteger &n, const BigInteger &e)=0
Create an RSA public key based on the two public components.
Message authentication code provider.
Definition: qcaprovider.h:284
bool isSelfSigned
True if the certificate is self-signed.
Definition: qcaprovider.h:1160
ConvertResult
Return value from a format conversion.
Definition: qca_publickey.h:118
virtual PGPKey pgpSecretKey() const
If this entry is of type KeyStoreEntry::TypePGPSecretKey, this function returns the secret PGPKey of ...
SignatureAlgorithm sigalgo
The signature algorithm used to create the signature.
Definition: qcaprovider.h:1175
virtual QStringList supportedCipherSuites(const TLS::Version &version) const =0
Returns a list of supported cipher suites for the specified SSL/TLS version.
Information about an active TLS connection.
Definition: qcaprovider.h:2156
virtual void convertToPublic()=0
If the key is a private key, this function will convert it into a public key (all private key data in...
PBEAlgorithm
Password-based encryption.
Definition: qca_publickey.h:102
virtual void setIssuerList(const QList< CertificateInfoOrdered > &issuerList)=0
Set the list of acceptable issuers.
virtual SecureMessageSignatureList signers() const =0
Returns a list of signatures, in the case of a verify or decrypt and verify operation.
virtual void createPrivate(const DLGroup &domain, const BigInteger &y, const BigInteger &x)=0
Create a Diffie-Hellman private key based on its numeric components.
virtual SymmetricKey makeKey(const SecureArray &secret, const InitializationVector &salt, unsigned int keyLength, int msecInterval, unsigned int *iterationCount)=0
Create a key and return it.
Header file for core QCA infrastructure.
KeyStore provider.
Definition: qcaprovider.h:1883
AuthCondition
Possible authentication error states.
Definition: qca_securelayer.h:849
virtual SecureArray encrypt(const SecureArray &in, EncryptionAlgorithm alg)
Encrypt data.
SASLContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:2545
virtual void clear()=0
Reset the object to its initial state.
virtual BigInteger p() const =0
Returns the private P component of this RSA key.
virtual QString diagnosticText() const
Returns any diagnostic text for the operation, potentially useful to show the user in the event the o...
Constraints constraints
The constraints.
Definition: qcaprovider.h:1114
virtual QByteArray to_net()=0
Returns data that should be sent across the network.
virtual BigInteger d() const =0
Returns the private D component of this RSA key.
X.509 certificate or certificate request properties.
Definition: qcaprovider.h:1076
Header file for classes for cryptographic primitives (basic operations).
virtual const CRLContextProps * props() const =0
Returns a pointer to the properties of this CRL.
virtual PKeyContext * subjectPublicKey() const =0
Returns a copy of this certificate request's public key.
CertCollectionContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:1492
QByteArray subjectId
The subject id.
Definition: qcaprovider.h:1182
Array of bytes that may be optionally secured.
Definition: qca_tools.h:91
virtual void nextStep(const QByteArray &from_net)=0
Perform another step of the SASL authentication.
AuthFlags
Authentication requirement flag values.
Definition: qca_securelayer.h:868
virtual PKeyContext * subjectPublicKey() const =0
Returns a copy of this certificate's public key.
QStringList ocspLocations
A list of URIs for OCSP services.
Definition: qcaprovider.h:1140
virtual void createPublic(const DLGroup &domain, const BigInteger &y)=0
Create a DSA public key based on its numeric components.
QString keyId
The key id.
Definition: qcaprovider.h:1666
Type
The type of keystore.
Definition: qca_keystore.h:424
virtual SecureArray privateToDER(const SecureArray &passphrase, PBEAlgorithm pbe) const
Convert a private key to DER format, and return the value.
Certificate options
Definition: qca_cert.h:602
virtual MessageContext * createMessage()=0
Create a new message object for this system.
void finished()
Emitted when the fetchGroup() operation completes in non-blocking mode.
virtual QByteArray publicToDER() const
Convert a public key to DER format, and return the value.
virtual void update(const MemoryRegion &in)=0
Process a chunk of data.
QDateTime thisUpdate
The time this CRL was created.
Definition: qcaprovider.h:1234
virtual KeyLength keyLength() const =0
Returns the KeyLength for this MAC algorithm.
CSRContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:1376
int version
The X.509 certificate version, usually 3.
Definition: qcaprovider.h:1083
virtual void reset()=0
Reset the object to its initial state.
virtual QString writeEntry(int id, const PGPKey &key)
Write a PGPKey to the store.
virtual void setKey(PKeyBase *key)=0
Sets the key for this object.
virtual ~QCAPlugin()
Destructs the object.
Definition: qcaprovider.h:88
virtual const PKeyBase * key() const =0
Returns the key held by this object, or 0 if there is no key.
virtual ConvertResult privateFromDER(const SecureArray &a, const SecureArray &passphrase)
Read DER-formatted input and convert it into a private key.
virtual QList< PBEAlgorithm > supportedPBEAlgorithms() const =0
Returns a list of password-based encryption algorithms that are supported for private key serializati...
virtual ConvertResult fromPKCS7(const QByteArray &a, QList< CertContext * > *certs, QList< CRLContext * > *crls) const =0
Read PKCS#7 DER input and convert it into a list of certificates and CRLs.
virtual BigInteger q() const =0
Returns the private Q component of this RSA key.
CertificateInfoOrdered issuer
The issuer information of the CRL.
Definition: qcaprovider.h:1224
virtual QString toAscii() const =0
Convert the key to ascii-armored format, and return the value.
virtual QString publicToPEM() const
Convert a public key to PEM format, and return the value.
Pretty Good Privacy key.
Definition: qca_cert.h:2361
bool isTrusted
True if this key is trusted (e.g.
Definition: qcaprovider.h:1706
virtual QString id() const =0
Returns the entry id.
Header file for PublicKey and PrivateKey related classes.
Container for authentication tag.
Definition: qca_core.h:1335
QStringList issuerLocations
A list of URIs for issuer certificates.
Definition: qcaprovider.h:1133
Base class to use for primitive provider contexts.
Definition: qca_core.h:998
virtual QString toSPKAC() const =0
Convert this certificate request to Netscape SPKAC format, and return the value.
virtual QString username() const =0
Returns the username attempting to authenticate (server mode only)
virtual void reset()=0
Reset the object to its initial state.
QString addr
The IP address.
Definition: qcaprovider.h:2520
PKCS#12 provider.
Definition: qcaprovider.h:1609
virtual int bits() const =0
Returns the number of bits in the key.
virtual void end()=0
Indicates the end of input.
PKeyContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:873
Validity
The validity (or otherwise) of a certificate.
Definition: qca_cert.h:490
void resultsReady()
Emit this when a startClient(), startServer(), serverFirstStep(), nextStep(), tryAgain(),...
Simple container for acceptable key lengths.
Definition: qca_core.h:701
QByteArray issuerId
The issuer id.
Definition: qcaprovider.h:1259
virtual bool clientHelloReceived() const =0
Returns true if the TLS client hello has been received.
void updated()
Emitted when there is data to read, if input data has been accepted, or if the operation has finished...
DSA provider.
Definition: qcaprovider.h:719
virtual bool canUseFormat(CertificateRequestFormat f) const =0
Returns true if the provider of this object supports the specified format, otherwise false.
DSAContext(Provider *p)
Standard constructor.
Definition: qcaprovider.h:727
PKeyBase(Provider *p, const QString &type)
Standard constructor.
virtual void createPublic(const DLGroup &domain, const BigInteger &y)=0
Create a Diffie-Hellman public key based on its numeric components.
BigInteger serial
The certificate serial number.
Definition: qcaprovider.h:1147
virtual QByteArray toDER() const =0
Convert this object to DER format, and return the value.
virtual QString hostName() const =0
Returns the host name sent by the client using server name indication (server mode only)
void updated()
Indicates the list of keystores has changed, and that QCA should call keyStores() to obtain the lates...
void diagnosticText(const QString &str)
Emitted when there is diagnostic text to report.
virtual QList< DLGroupSet > supportedGroupSets() const =0
The DLGroupSets supported by this object.
Header file for classes that provide and manage keys.
virtual BigInteger n() const =0
Returns the public N component of this RSA key.
virtual PKeyBase * key()=0
Returns the key held by this object, or 0 if there is no key.
virtual CRLContext * updateCRL(const CRLContext &crl, const QList< CRLEntry > &entries, const QDateTime &nextUpdate) const =0
Update an existing CRL, by examining an old one and creating a new one based on it.
virtual void createPrivate(const DLGroup &domain, bool block)=0
Generate a DSA private key.
virtual QString toPEM() const =0
Convert this object to PEM format, and return the value.
virtual void startClient(const QStringList &mechlist, bool allowClientSendFirst)=0
Begins the session in client mode, starting with the authentication.
virtual int encoded() const =0
Returns the number of bytes of plaintext data that is encoded inside of to_net()
int number
The CRL number, which increases at each update.
Definition: qcaprovider.h:1229
virtual SymmetricKey makeKey(const SecureArray &secret, const InitializationVector &salt, unsigned int keyLength, unsigned int iterationCount)=0
Create a key and return it.
virtual Result result() const =0
Returns the result code of an operation.
QDateTime nextUpdate
The time this CRL expires, and the next CRL should be fetched.
Definition: qcaprovider.h:1239
QString cipherSuite
The cipher suite being used for this connection.
Definition: qcaprovider.h:2173
@ Error
Operation failed.
Definition: qcaprovider.h:2199
@ Verify
Verify operation.
Definition: qcaprovider.h:2815
virtual QStringList realmlist() const =0
Returns the realm list (client mode only)
virtual void setupEncrypt(const SecureMessageKeyList &keys)=0
Configure a new encrypting operation.
@ Success
Operation completed.
Definition: qcaprovider.h:2533
virtual void setTrustedCertificates(const CertificateCollection &trusted)
Set the trusted certificates and for this secure message system, to be used for validation.
virtual ConvertResult fromAscii(const QString &s)=0
Read ascii-armored input and convert it into a key.
virtual void start()
Starts the keystore provider.
virtual QList< KeyStoreEntry::Type > entryTypes(int id) const =0
Returns the types supported by the store, or an empty list if the integer context id is invalid.
SignMode
The type of message signature.
Definition: qca_securemessage.h:337
Public key container provider.
Definition: qcaprovider.h:865
virtual void tryAgain()=0
Attempt the most recent operation again.
virtual bool waitForFinished(int msecs)=0
Waits for the secure message operation to complete.
virtual ConvertResult fromBinary(const QByteArray &a)=0
Read binary input and convert it into a key.
DLGroupSet
Well known discrete logarithm group sets.
Definition: qca_publickey.h:134
virtual void serverFirstStep(const QString &mech, const QByteArray *clientInit)=0
Finishes server startup.
CertBase(Provider *p, const QString &type)
Standard constructor.
Definition: qcaprovider.h:1024