1 #ifndef LIBCRYPTO_COMPAT_H     2 #define LIBCRYPTO_COMPAT_H     4 #include <openssl/opensslv.h>     5 #if OPENSSL_VERSION_NUMBER < 0x10100000L     7 #include <openssl/rsa.h>     8 #include <openssl/dsa.h>     9 #include <openssl/ecdsa.h>    10 #include <openssl/dh.h>    11 #include <openssl/evp.h>    12 #include <openssl/hmac.h>    14 int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
    15 int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
    16 int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
    17 void RSA_get0_key(
const RSA *r, 
const BIGNUM **n, 
const BIGNUM **e, 
const BIGNUM **d);
    18 void RSA_get0_factors(
const RSA *r, 
const BIGNUM **p, 
const BIGNUM **q);
    19 void RSA_get0_crt_params(
const RSA *r, 
const BIGNUM **dmp1, 
const BIGNUM **dmq1, 
const BIGNUM **iqmp);
    21 void DSA_get0_pqg(
const DSA *d, 
const BIGNUM **p, 
const BIGNUM **q, 
const BIGNUM **g);
    22 int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
    23 void DSA_get0_key(
const DSA *d, 
const BIGNUM **pub_key, 
const BIGNUM **priv_key);
    24 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key);
    26 void DSA_SIG_get0(
const DSA_SIG *sig, 
const BIGNUM **pr, 
const BIGNUM **ps);
    27 int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
    29 void ECDSA_SIG_get0(
const ECDSA_SIG *sig, 
const BIGNUM **pr, 
const BIGNUM **ps);
    30 int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
    32 int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
    33 EVP_MD_CTX *EVP_MD_CTX_new(
void);
    34 void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
    36 HMAC_CTX *HMAC_CTX_new(
void);
    37 int HMAC_CTX_reset(HMAC_CTX *ctx);
    38 void HMAC_CTX_free(HMAC_CTX *ctx);