diff options
author | Matt Caswell <matt@openssl.org> | 2020-02-06 15:30:24 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-02-07 23:27:23 +0000 |
commit | 92dcfb796f51aa64d0ff34a5c9dbabf49f432c6f (patch) | |
tree | 0be13f7d06c32f0712c05aaa436e0dc86be80be9 /include/internal/ffc.h | |
parent | ad5b71be73f0450a9eb51c8b845796fe4183601f (diff) | |
download | openssl-new-92dcfb796f51aa64d0ff34a5c9dbabf49f432c6f.tar.gz |
Fix no-dh
Don't use DH specific macros that might need to be used in a no-dh build.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/11030)
Diffstat (limited to 'include/internal/ffc.h')
-rw-r--r-- | include/internal/ffc.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/internal/ffc.h b/include/internal/ffc.h index 75df3a1ffd..67282fd807 100644 --- a/include/internal/ffc.h +++ b/include/internal/ffc.h @@ -33,13 +33,18 @@ # define FFC_PARAMS_VALIDATE_G 0x02 # define FFC_PARAMS_VALIDATE_ALL (FFC_PARAMS_VALIDATE_PQ | FFC_PARAMS_VALIDATE_G) -# define FFC_CHECK_P_NOT_PRIME DH_CHECK_P_NOT_PRIME -# define FFC_CHECK_P_NOT_SAFE_PRIME DH_CHECK_P_NOT_SAFE_PRIME -# define FFC_CHECK_UNKNOWN_GENERATOR DH_UNABLE_TO_CHECK_GENERATOR -# define FFC_CHECK_NOT_SUITABLE_GENERATOR DH_NOT_SUITABLE_GENERATOR -# define FFC_CHECK_Q_NOT_PRIME DH_CHECK_Q_NOT_PRIME -# define FFC_CHECK_INVALID_Q_VALUE DH_CHECK_INVALID_Q_VALUE -# define FFC_CHECK_INVALID_J_VALUE DH_CHECK_INVALID_J_VALUE +/* + * NB: These values must align with the equivalently named macros in + * openssl/dh.h. We cannot use those macros here in case DH has been disabled. + */ +# define FFC_CHECK_P_NOT_PRIME 0x00001 +# define FFC_CHECK_P_NOT_SAFE_PRIME 0x00002 +# define FFC_CHECK_UNKNOWN_GENERATOR 0x00004 +# define FFC_CHECK_NOT_SUITABLE_GENERATOR 0x00008 +# define FFC_CHECK_Q_NOT_PRIME 0x00010 +# define FFC_CHECK_INVALID_Q_VALUE 0x00020 +# define FFC_CHECK_INVALID_J_VALUE 0x00040 + # define FFC_CHECK_BAD_LN_PAIR 0x00080 # define FFC_CHECK_INVALID_SEED_SIZE 0x00100 # define FFC_CHECK_MISSING_SEED_OR_COUNTER 0x00200 |