diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2019-07-09 09:33:18 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2019-07-09 09:33:18 +1000 |
commit | 1aec7716c1c5fccf605a46252a46ea468e684454 (patch) | |
tree | f8b2cce477100f92a3daac1ab72f607d0023c44e /test/evp_test.c | |
parent | 9fd6f7d1cd2a3c8e2bc69dcb8bde8406eb6c2623 (diff) |
Add X9.42 KDF.
Move the KDF code for CMS DH key agreement into an EVP_KDF object.
There are 2 specifications for X9.42 KDF. This implementation uses DER for
otherinfo which embeds the KDF loop counter inside the DER object.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8898)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r-- | test/evp_test.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test/evp_test.c b/test/evp_test.c index b70b4ea600..0489bbe093 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -1965,7 +1965,14 @@ static int kdf_test_init(EVP_TEST *t, const char *name) t->skip = 1; return 1; } -#endif +#endif /* OPENSSL_NO_SCRYPT */ + +#ifdef OPENSSL_NO_CMS + if (strcmp(name, "X942KDF") == 0) { + t->skip = 1; + return 1; + } +#endif /* OPENSSL_NO_CMS */ kdf = EVP_get_kdfbyname(name); if (kdf == NULL) @@ -2097,7 +2104,14 @@ static int pkey_kdf_test_init(EVP_TEST *t, const char *name) t->skip = 1; return 1; } -#endif +#endif /* OPENSSL_NO_SCRYPT */ + +#ifdef OPENSSL_NO_CMS + if (strcmp(name, "X942KDF") == 0) { + t->skip = 1; + return 1; + } +#endif /* OPENSSL_NO_CMS */ if (kdf_nid == NID_undef) kdf_nid = OBJ_ln2nid(name); |