openssl/crypto/dh
Richard Levitte ec061bf8ff Make DH_check_pub_key() and DH_generate_key() safer yet
We already check for an excessively large P in DH_generate_key(), but not in
DH_check_pub_key(), and none of them check for an excessively large Q.

This change adds all the missing excessive size checks of P and Q.

It's to be noted that behaviours surrounding excessively sized P and Q
differ.  DH_check() raises an error on the excessively sized P, but only
sets a flag for the excessively sized Q.  This behaviour is mimicked in
DH_check_pub_key().

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22453)
2023-11-06 07:55:01 +00:00
..
build.info EVP_PKEY & DH: Make DH EVP_PKEY_CTX parameter ctrls / setters more available 2020-12-16 11:55:39 +01:00
dh_ameth.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
dh_asn1.c Update copyright year 2021-03-11 13:27:36 +00:00
dh_backend.c Copyright year updates 2023-09-07 09:59:15 +01:00
dh_check.c Make DH_check_pub_key() and DH_generate_key() safer yet 2023-11-06 07:55:01 +00:00
dh_depr.c Update copyright year 2020-04-23 13:55:52 +01:00
dh_err.c Make DH_check_pub_key() and DH_generate_key() safer yet 2023-11-06 07:55:01 +00:00
dh_gen.c Use libctx when generating DH parameters 2022-11-11 11:59:23 +01:00
dh_group_params.c Use as small dh key size as possible to support the security 2022-07-18 08:06:17 +01:00
dh_kdf.c Remove duplicated #include headers 2022-05-04 13:46:10 +10:00
dh_key.c Make DH_check_pub_key() and DH_generate_key() safer yet 2023-11-06 07:55:01 +00:00
dh_lib.c Don't (re-)initialize the FFC_PARAMs in dh_init and dsa_init 2023-10-04 12:22:04 +02:00
dh_local.h Rename OPENSSL_CTX prefix to OSSL_LIB_CTX 2020-10-15 11:59:53 +01:00
dh_meth.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
dh_pmeth.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
dh_prn.c Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call 2020-11-13 09:35:02 +01:00
dh_rfc5114.c Update copyright year 2021-03-11 13:27:36 +00:00