Fix no-des
authorMatt Caswell <matt@openssl.org>
Wed, 28 Aug 2019 15:00:01 +0000 (16:00 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 29 Aug 2019 10:04:04 +0000 (11:04 +0100)
Don't refer to cipher functions in the providers that have been compiled
out.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9719)

providers/default/defltprov.c
providers/fips/fipsprov.c

index 2498d068df839b757cf61a38793d6b932b3fed1f..c481171a789378e8c16e0111a431a3906f57f8c2 100644 (file)
@@ -173,6 +173,7 @@ static const OSSL_ALGORITHM deflt_ciphers[] = {
     { "CAMELLIA-192-CTR", "default=yes", camellia192ctr_functions },
     { "CAMELLIA-128-CTR", "default=yes", camellia128ctr_functions },
 #endif /* OPENSSL_NO_CAMELLIA */
+#ifndef OPENSSL_NO_DES
     { "DES-EDE3", "default=yes", tdes_ede3_ecb_functions },
     { "DES-EDE3-CBC", "default=yes", tdes_ede3_cbc_functions },
     { "DES-EDE3-OFB", "default=yes", tdes_ede3_ofb_functions },
@@ -185,6 +186,7 @@ static const OSSL_ALGORITHM deflt_ciphers[] = {
     { "DES-EDE-CFB", "default=yes", tdes_ede2_cfb_functions },
     { "DESX-CBC", "default=yes", tdes_desx_cbc_functions },
     { "id-smime-alg-CMS3DESwrap", "default=yes", tdes_wrap_cbc_functions },
+#endif /* OPENSSL_NO_DES */
     { NULL, NULL, NULL }
 };
 
index 8e68a6c8437a370b015dec4354a918ae174a841d..9a7193bb4f4010cb02df6d87f59d62e90fdc8d9e 100644 (file)
@@ -324,8 +324,10 @@ static const OSSL_ALGORITHM fips_ciphers[] = {
     { "id-aes256-CCM", "fips=yes", aes256ccm_functions },
     { "id-aes192-CCM", "fips=yes", aes192ccm_functions },
     { "id-aes128-CCM", "fips=yes", aes128ccm_functions },
+#ifndef OPENSSL_NO_DES
     { "DES-EDE3", "fips=yes", tdes_ede3_ecb_functions },
     { "DES-EDE3-CBC", "fips=yes", tdes_ede3_cbc_functions },
+#endif  /* OPENSSL_NO_DES */
     { NULL, NULL, NULL }
 };