aboutsummaryrefslogtreecommitdiff
path: root/providers/implementations/exchange
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-11-16 12:42:18 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-12-02 12:15:05 +1000
commit89cccbea51fa52a1e4784a9ece35d96e4dcbfd30 (patch)
tree89cb59183ed18f1e5dd5cb86fed810b04cce466e /providers/implementations/exchange
parent8018352457cf9c98ce59f1e591fcd69f2153b649 (diff)
downloadopenssl-89cccbea51fa52a1e4784a9ece35d96e4dcbfd30.zip
openssl-89cccbea51fa52a1e4784a9ece35d96e4dcbfd30.tar.gz
openssl-89cccbea51fa52a1e4784a9ece35d96e4dcbfd30.tar.bz2
Add EVP_KDF-X942 to the fips module
The X942 KDF had been modified so that it supports all optional fields - not just the fields used by CMS. As there are 2 types of KDF for X942 - this has been made a bit clearer by adding an X942KDF-ASN1 alias. X942KDF-CONCAT has also been added as an alias of X963KDF. This work was instigated as a result of the ACVP tests optionally being able to use keybits for the supp_pubinfo field. Setting the parameter OSSL_KDF_PARAM_X942_USE_KEYBITS to 0 allows this to be disabled. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13418)
Diffstat (limited to 'providers/implementations/exchange')
-rw-r--r--providers/implementations/exchange/dh_exch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/providers/implementations/exchange/dh_exch.c b/providers/implementations/exchange/dh_exch.c
index 3eeac98..d8689f5 100644
--- a/providers/implementations/exchange/dh_exch.c
+++ b/providers/implementations/exchange/dh_exch.c
@@ -297,7 +297,7 @@ static int dh_set_ctx_params(void *vpdhctx, const OSSL_PARAM params[])
if (name[0] == '\0')
pdhctx->kdf_type = PROV_DH_KDF_NONE;
- else if (strcmp(name, OSSL_KDF_NAME_X942KDF) == 0)
+ else if (strcmp(name, OSSL_KDF_NAME_X942KDF_ASN1) == 0)
pdhctx->kdf_type = PROV_DH_KDF_X9_42_ASN1;
else
return 0;
@@ -421,7 +421,7 @@ static int dh_get_ctx_params(void *vpdhctx, OSSL_PARAM params[])
kdf_type = "";
break;
case PROV_DH_KDF_X9_42_ASN1:
- kdf_type = OSSL_KDF_NAME_X942KDF;
+ kdf_type = OSSL_KDF_NAME_X942KDF_ASN1;
break;
default:
return 0;