EVP_PKEY_CTRL_CIPHER can be used with encrypt/decrypt with GOST
authorTomas Mraz <tomas@openssl.org>
Fri, 26 Mar 2021 16:48:31 +0000 (17:48 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 1 Apr 2021 12:39:53 +0000 (14:39 +0200)
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14703)

crypto/evp/ctrl_params_translate.c

index 995e37a4e8c93b7a1bbb426351ff380e3f3a0049..4863b81db9aca160e064e157fc1114b1e799ab6f 100644 (file)
@@ -2188,7 +2188,7 @@ static const struct translation_st evp_pkey_ctx_translations[] = {
       EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES, "maxmem_bytes", NULL,
       OSSL_KDF_PARAM_SCRYPT_MAXMEM, OSSL_PARAM_UNSIGNED_INTEGER, NULL },
 
-    { SET, -1, -1, EVP_PKEY_OP_KEYGEN,
+    { SET, -1, -1, EVP_PKEY_OP_KEYGEN | EVP_PKEY_OP_TYPE_CRYPT,
       EVP_PKEY_CTRL_CIPHER, NULL, NULL,
       OSSL_PKEY_PARAM_CIPHER, OSSL_PARAM_UTF8_STRING, fix_cipher },
     { SET, -1, -1, EVP_PKEY_OP_KEYGEN,