diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-08-11 10:15:28 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2020-08-17 23:40:20 +1000 |
commit | 38145fba0a5f6163743f007dd6c9ba1a1e07e4f4 (patch) | |
tree | af3b5a8ae3d4e004bc6452a1ad3cc3ae96bb2941 /include | |
parent | 6c4e2e52d87d61a6df3ddf5f67c7207387585d6c (diff) |
Fix DSA/DH so that legacy keys can still be generated by the default provider
Fixes #12589
The 'type' parameter needed to be propagated to the ffc params during keygen,
so that the simple validation of params done during keygen can handle legacy keys for the default provider.
The fips provider ignores this change and only allows fips186-4 approved sizes.
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/12623)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/ffc.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/internal/ffc.h b/include/internal/ffc.h index b352b8d345..3a4dcc9dcb 100644 --- a/include/internal/ffc.h +++ b/include/internal/ffc.h @@ -39,10 +39,11 @@ #define FFC_PARAM_RET_STATUS_UNVERIFIABLE_G 2 /* Validation flags */ -# define FFC_PARAM_FLAG_VALIDATE_PQ 0x01 -# define FFC_PARAM_FLAG_VALIDATE_G 0x02 +# define FFC_PARAM_FLAG_VALIDATE_PQ 0x01 +# define FFC_PARAM_FLAG_VALIDATE_G 0x02 # define FFC_PARAM_FLAG_VALIDATE_ALL \ (FFC_PARAM_FLAG_VALIDATE_PQ | FFC_PARAM_FLAG_VALIDATE_G) +#define FFC_PARAM_FLAG_VALIDATE_LEGACY 0x04 /* * NB: These values must align with the equivalently named macros in @@ -124,6 +125,7 @@ void ffc_params_set_gindex(FFC_PARAMS *params, int index); void ffc_params_set_pcounter(FFC_PARAMS *params, int index); void ffc_params_set_h(FFC_PARAMS *params, int index); void ffc_params_set_flags(FFC_PARAMS *params, unsigned int flags); +void ffc_params_enable_flags(FFC_PARAMS *params, unsigned int flags, int enable); int ffc_set_digest(FFC_PARAMS *params, const char *alg, const char *props); int ffc_params_set_validate_params(FFC_PARAMS *params, |