#include <PKIFCryptoPPCredential.h>
TSP-enforcing: No
Definition at line 33 of file PKIFCryptoPPCredential.h.
Public Member Functions | |
CPKIFCryptoPPCredential () | |
virtual | ~CPKIFCryptoPPCredential () |
virtual void | SetPassword (unsigned char *password, int len) |
CPKIFCertificatePtr | GetCertificate () const |
CPKIFKeyMaterialPtr | GetPublicKey () const |
void | SetCertificate (CPKIFCertificatePtr &) |
void | SetPrivateKey (CPKIFBufferPtr &) |
void | SetAlgorithm (CPKIFAlgorithm *) |
CPKIFAlgorithm * | GetAlgorithm () |
Friends | |
class | CPKIFCryptoPP |
CPKIFCryptoPPCredential::CPKIFCryptoPPCredential | ( | ) |
Interface: Subsystem
This function creates CPKIFCryptoPPCredential objects.
Definition at line 45 of file PKIFCryptoPPCredential.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_CRYPTO_CRYPTOPPCRED.
CPKIFCryptoPPCredential::~CPKIFCryptoPPCredential | ( | void | ) | [virtual] |
Interface: Subsystem
This function destroys CPKIFCryptoPPCredential objects. This function overwrites the memory associated with with private keys via PKIFZero.
Definition at line 59 of file PKIFCryptoPPCredential.cpp.
References LOG_STRING_DEBUG, PKIFZero(), and TOOLKIT_CRYPTO_CRYPTOPPCRED.
void CPKIFCryptoPPCredential::SetPassword | ( | unsigned char * | password, | |
int | len | |||
) | [virtual] |
Interface: Subsystem
This function is used to specify a password that can be used to access the associated credential.
Credential-level passwords are not implemented for NSS. (They don't make sense for NSS)
CPKIFCryptoException(COMMON_NOT_IMPLEMENTED) |
password | [in] Pointer to a buffer containing a password |
len | [in] Integer indicating the length of the password stored in the buffer passed via the password parameter |
Implements CPKIFCredential.
Definition at line 88 of file PKIFCryptoPPCredential.cpp.
References COMMON_NOT_IMPLEMENTED, LOG_STRING_DEBUG, RAISE_CRYPTO_EXCEPTION, and TOOLKIT_CRYPTO_CRYPTOPPCRED.
CPKIFCertificatePtr CPKIFCryptoPPCredential::GetCertificate | ( | ) | const [virtual] |
Interface: Subsystem
This function returns a smart pointer to a CPKIFCertificate object containing the public key certificate that corresponds with the key material associated with the credential object. If the credential object is empty or no public key certificate is available, NULL is returned.
Implements CPKIFCredential.
Definition at line 110 of file PKIFCryptoPPCredential.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_CRYPTO_CRYPTOPPCRED.
CPKIFKeyMaterialPtr CPKIFCryptoPPCredential::GetPublicKey | ( | ) | const [virtual] |
Interface: External
This function returns a smart pointer to a CPKIFKeyMaterial object containing the associated public key.
The base class implementation relies on the GetCertificate() function and simply extracts the public key from the certificate; subclasses are not obligated to maintain this behavior.
Reimplemented from CPKIFCredential.
Definition at line 116 of file PKIFCryptoPPCredential.cpp.
References CPKIFAlgorithm::AsymkeyAlg(), PKIFCRYPTO::DSS, PKIFCRYPTO::ECC, CPKIFCredential::GetPublicKey(), PKIF_CRYPTOPP_RAW_IMPORT_FAILED, RAISE_CRYPTO_EXCEPTION, PKIFCRYPTO::RSA, and TOOLKIT_CRYPTO_CRYPTOPPCRED.
void CPKIFCryptoPPCredential::SetCertificate | ( | CPKIFCertificatePtr & | cert | ) |
Interface: Subsystem
This function associates a certificate with the credential
Definition at line 221 of file PKIFCryptoPPCredential.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_CRYPTO_CRYPTOPPCRED.
void CPKIFCryptoPPCredential::SetPrivateKey | ( | CPKIFBufferPtr & | key | ) |
Interface: Subsystem
This function sets the credential's private key.
key | [in] buffer containing a DER-encoded PKCS#8 private key structure. Crypto++ expects this structure to be decrypted already. |
Definition at line 233 of file PKIFCryptoPPCredential.cpp.
Referenced by CPKIFCryptoPP::SecretAgree().
void CPKIFCryptoPPCredential::SetAlgorithm | ( | CPKIFAlgorithm * | alg | ) |
Interface: Subsystem
Store information about the key's algorithm
alg | [in] pointer to a CPKIFAlgorithm instance describing the asymmetric key owned by this credential |
Definition at line 248 of file PKIFCryptoPPCredential.cpp.
Referenced by CPKIFCryptoPP::SecretAgree().
CPKIFAlgorithm * CPKIFCryptoPPCredential::GetAlgorithm | ( | ) |
Interface: Subsystem
Retrieve information about the key's algorithm
Definition at line 262 of file PKIFCryptoPPCredential.cpp.
Referenced by CPKIFCryptoPP::Sign().
friend class CPKIFCryptoPP [friend] |
Definition at line 35 of file PKIFCryptoPPCredential.h.