Fixed a bug preventing pkeyutl from accessing keys directly on the token via engine_pkcs11
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
75fdee0482
commit
d65a8d0b7e
1 changed files with 7 additions and 2 deletions
|
@ -419,8 +419,13 @@ static EVP_PKEY_CTX *init_ctx(int *pkeysize,
|
|||
if (!pkey)
|
||||
goto end;
|
||||
|
||||
ctx = EVP_PKEY_CTX_new(pkey, e);
|
||||
|
||||
if ((keyform == FORMAT_ENGINE) && (strncmp(ENGINE_get_name(e),"pkcs11 engine", strlen("pkcs11 engine"))==0)) {
|
||||
fprintf(stderr, "engine name = \"%s\"\n", ENGINE_get_name(e));
|
||||
ctx = EVP_PKEY_CTX_new(pkey, NULL);
|
||||
} else {
|
||||
ctx = EVP_PKEY_CTX_new(pkey, e);
|
||||
}
|
||||
|
||||
EVP_PKEY_free(pkey);
|
||||
|
||||
if (!ctx)
|
||||
|
|
Loading…
Reference in a new issue