diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-14 03:54:16 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-14 03:54:16 -0500 |
commit | ffa54887cef6a8e36b2d63e7e9139ac11863a525 (patch) | |
tree | a36d7ade29b74464af1f87e61e8cbc05441dd64b /tdecore/tdehw/tdecryptographiccarddevice.h | |
parent | 4238dc9cea6c543abf993d3a28af564f1c8dea0c (diff) | |
download | tdelibs-ffa54887cef6a8e36b2d63e7e9139ac11863a525.tar.gz tdelibs-ffa54887cef6a8e36b2d63e7e9139ac11863a525.zip |
Add additional cryptographic card functions to tdehwlib
Fix FTBFS on old distributions
Diffstat (limited to 'tdecore/tdehw/tdecryptographiccarddevice.h')
-rw-r--r-- | tdecore/tdehw/tdecryptographiccarddevice.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdecryptographiccarddevice.h b/tdecore/tdehw/tdecryptographiccarddevice.h index fd0364fd8..c9de6091b 100644 --- a/tdecore/tdehw/tdecryptographiccarddevice.h +++ b/tdecore/tdehw/tdecryptographiccarddevice.h @@ -82,6 +82,16 @@ class TDECORE_EXPORT TDECryptographicCardDevice : public TDEGenericDevice */ X509CertificatePtrList cardX509Certificates(); + /** + * Create a new random key and encrypt with the public key + * contained in the given certificate. + * @param plaintext Generated (decrypted) random key + * @param ciphertext Encrypted key + * @param certificate X509 certificate containing the public key to use + * @return 0 on success, -1 on general failure, -2 on encryption failure + */ + static int createNewSecretRSAKeyFromCertificate(TQByteArray &plaintext, TQByteArray &ciphertext, X509* certificate); + public slots: void cardStatusChanged(TQString status, TQString atr); |