133 #ifndef OPENTXS_CORE_CRYPTO_OTASYMMETRICKEY_OPENSSLPRIVDP_HPP
134 #define OPENTXS_CORE_CRYPTO_OTASYMMETRICKEY_OPENSSLPRIVDP_HPP
139 #include <openssl/pem.h>
140 #include <openssl/evp.h>
141 #include <openssl/x509v3.h>
143 int32_t
mkcert(X509** x509p, EVP_PKEY** pkeyp, int32_t bits, int32_t serial,
150 class OTPasswordData;
196 EVP_PKEY* InstantiateKey(
const OTPasswordData* pPWData =
nullptr);
197 EVP_PKEY* InstantiatePublicKey(
const OTPasswordData* pPWData =
nullptr);
198 EVP_PKEY* InstantiatePrivateKey(
const OTPasswordData* pPWData =
nullptr);
201 EXPORT
const EVP_PKEY* GetKey(
const OTPasswordData* pPWData =
nullptr);
203 void SetKeyAsCopyOf(EVP_PKEY& theKey,
bool bIsPrivateKey =
false,
208 EVP_PKEY* GetKeyLowLevel()
const;
210 X509* GetX509()
const
214 void SetX509(X509* x509);
219 #endif // OPENTXS_CORE_CRYPTO_OTASYMMETRICKEY_OPENSSLPRIVDP_HPP
static bool ArmorPrivateKey(EVP_PKEY &theKey, OTASCIIArmor &ascKey, Timer &theTimer, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr)
static bool ArmorPublicKey(EVP_PKEY &theKey, OTASCIIArmor &ascKey)
static EVP_PKEY * CopyPublicKey(EVP_PKEY &theKey, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr)
OTAsymmetricKey_OpenSSLPrivdp()
static EVP_PKEY * CopyPrivateKey(EVP_PKEY &theKey, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr)
int32_t mkcert(X509 **x509p, EVP_PKEY **pkeyp, int32_t bits, int32_t serial, int32_t days)
OTAsymmetricKey_OpenSSL * backlink