diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-01-13 13:39:08 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-01-13 13:39:08 +0100 |
commit | 00abb1f201cbe1e40c2eef30819be115d3d04d10 (patch) | |
tree | 7eb36871dd7af02db7d2f59482644a56bc79d7bb /thirdparty/openssl/crypto/dh | |
parent | de0b31edd5b36b8c8016b7ca50c1823f2efbfa74 (diff) |
openssl: Update to pristine 1.0.2n (security update)
Diffstat (limited to 'thirdparty/openssl/crypto/dh')
-rw-r--r-- | thirdparty/openssl/crypto/dh/dh_kdf.c | 4 | ||||
-rw-r--r-- | thirdparty/openssl/crypto/dh/dh_pmeth.c | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/thirdparty/openssl/crypto/dh/dh_kdf.c b/thirdparty/openssl/crypto/dh/dh_kdf.c index a882cb286e..8947a08731 100644 --- a/thirdparty/openssl/crypto/dh/dh_kdf.c +++ b/thirdparty/openssl/crypto/dh/dh_kdf.c @@ -51,6 +51,9 @@ * ==================================================================== */ +#include <e_os.h> + +#ifndef OPENSSL_NO_CMS #include <string.h> #include <openssl/dh.h> #include <openssl/evp.h> @@ -185,3 +188,4 @@ int DH_KDF_X9_42(unsigned char *out, size_t outlen, EVP_MD_CTX_cleanup(&mctx); return rv; } +#endif diff --git a/thirdparty/openssl/crypto/dh/dh_pmeth.c b/thirdparty/openssl/crypto/dh/dh_pmeth.c index b58e3fa86f..6452482c87 100644 --- a/thirdparty/openssl/crypto/dh/dh_pmeth.c +++ b/thirdparty/openssl/crypto/dh/dh_pmeth.c @@ -207,7 +207,11 @@ static int pkey_dh_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) case EVP_PKEY_CTRL_DH_KDF_TYPE: if (p1 == -2) return dctx->kdf_type; +#ifdef OPENSSL_NO_CMS + if (p1 != EVP_PKEY_DH_KDF_NONE) +#else if (p1 != EVP_PKEY_DH_KDF_NONE && p1 != EVP_PKEY_DH_KDF_X9_42) +#endif return -2; dctx->kdf_type = p1; return 1; @@ -448,7 +452,9 @@ static int pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key, return ret; *keylen = ret; return 1; - } else if (dctx->kdf_type == EVP_PKEY_DH_KDF_X9_42) { + } +#ifndef OPENSSL_NO_CMS + else if (dctx->kdf_type == EVP_PKEY_DH_KDF_X9_42) { unsigned char *Z = NULL; size_t Zlen = 0; if (!dctx->kdf_outlen || !dctx->kdf_oid) @@ -479,6 +485,7 @@ static int pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key, } return ret; } +#endif return 1; } |