version 1.37, 2019/01/21 00:47:34 |
version 1.38, 2019/01/21 02:01:03 |
|
|
} |
} |
|
|
#ifdef HAVE_DLOPEN |
#ifdef HAVE_DLOPEN |
|
static RSA_METHOD *rsa_method; |
|
static int rsa_idx = 0; |
|
static EC_KEY_METHOD *ec_key_method; |
|
static int ec_key_idx = 0; |
|
|
/* release a wrapped object */ |
/* release a wrapped object */ |
static void |
static void |
pkcs11_k11_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, |
pkcs11_k11_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, |
|
|
CK_RV rv; |
CK_RV rv; |
int rval = -1; |
int rval = -1; |
|
|
if ((k11 = RSA_get_ex_data(rsa, 0)) == NULL) { |
if ((k11 = RSA_get_ex_data(rsa, rsa_idx)) == NULL) { |
error("RSA_get_ex_data failed for rsa %p", rsa); |
error("RSA_get_ex_data failed for rsa %p", rsa); |
return (-1); |
return (-1); |
} |
} |
|
|
return (-1); |
return (-1); |
} |
} |
|
|
static RSA_METHOD *rsa_method; |
|
static int rsa_idx = 0; |
|
|
|
static int |
static int |
pkcs11_rsa_start_wrapper(void) |
pkcs11_rsa_start_wrapper(void) |
{ |
{ |
|
|
u_char *sig; |
u_char *sig; |
BIGNUM *r = NULL, *s = NULL; |
BIGNUM *r = NULL, *s = NULL; |
|
|
if ((k11 = EC_KEY_get_ex_data(ec, 0)) == NULL) { |
if ((k11 = EC_KEY_get_ex_data(ec, ec_key_idx)) == NULL) { |
ossl_error("EC_KEY_get_key_method_data failed for ec"); |
ossl_error("EC_KEY_get_key_method_data failed for ec"); |
return (NULL); |
return (NULL); |
} |
} |
|
|
|
|
return (ret); |
return (ret); |
} |
} |
|
|
static EC_KEY_METHOD *ec_key_method; |
|
static int ec_key_idx = 0; |
|
|
|
static int |
static int |
pkcs11_ecdsa_start_wrapper(void) |
pkcs11_ecdsa_start_wrapper(void) |