|
|
@ -10,6 +10,7 @@ |
|
|
|
#include <openssl/ecdsa.h> |
|
|
|
#include <openssl/ecdsa.h> |
|
|
|
#include <openssl/rsa.h> |
|
|
|
#include <openssl/rsa.h> |
|
|
|
#include <openssl/sha.h> |
|
|
|
#include <openssl/sha.h> |
|
|
|
|
|
|
|
#include <openssl/evp.h> |
|
|
|
#include <openssl/rand.h> |
|
|
|
#include <openssl/rand.h> |
|
|
|
|
|
|
|
|
|
|
|
#include "Base.h" |
|
|
|
#include "Base.h" |
|
|
@ -281,6 +282,8 @@ namespace crypto |
|
|
|
|
|
|
|
|
|
|
|
void InitCrypto (bool precomputation); |
|
|
|
void InitCrypto (bool precomputation); |
|
|
|
void TerminateCrypto (); |
|
|
|
void TerminateCrypto (); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// take care about openssl version
|
|
|
|
// take care about openssl version
|
|
|
|
#include <openssl/opensslv.h> |
|
|
|
#include <openssl/opensslv.h> |
|
|
@ -318,9 +321,10 @@ inline int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) |
|
|
|
inline void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) |
|
|
|
inline void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) |
|
|
|
{ *pub_key = dh->pub_key; *priv_key = dh->priv_key; } |
|
|
|
{ *pub_key = dh->pub_key; *priv_key = dh->priv_key; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline int EVP_PKEY_base_id(const EVP_PKEY *pkey) |
|
|
|
|
|
|
|
{ return EVP_PKEY_type(pkey->type); } |
|
|
|
|
|
|
|
inline RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey) |
|
|
|
|
|
|
|
{ return pkey->pkey.rsa; } |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|