File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4338,18 +4338,19 @@ struct CipherCallbackContext {
43384338 void operator ()(const char * name) { cb (name); }
43394339};
43404340
4341- #if OPENSSL_WITH_AES_SIV || OPENSSL_WITH_AES_GCM_SIV
4342- constexpr const char * kProviderOnlyCiphers [] = {
43434341#if OPENSSL_WITH_AES_SIV
4342+ constexpr const char * kProviderOnlyAesSivCiphers [] = {
43444343 " aes-128-siv" ,
43454344 " aes-192-siv" ,
43464345 " aes-256-siv" ,
4346+ };
43474347#endif
4348+
43484349#if OPENSSL_WITH_AES_GCM_SIV
4350+ constexpr const char * kProviderOnlyAesGcmSivCiphers [] = {
43494351 " aes-128-gcm-siv" ,
43504352 " aes-192-gcm-siv" ,
43514353 " aes-256-gcm-siv" ,
4352- #endif
43534354};
43544355#endif
43554356
@@ -4420,11 +4421,21 @@ void Cipher::ForEach(Cipher::CipherNameCallback callback) {
44204421#endif
44214422 &context);
44224423#if OPENSSL_WITH_AES_SIV || OPENSSL_WITH_AES_GCM_SIV
4423- for (const char * name : kProviderOnlyCiphers ) {
4424+ auto maybe_push_provider_only_cipher = [&] (const char * name) {
44244425 EVP_CIPHER* cipher = EVP_CIPHER_fetch (nullptr , name, nullptr );
4425- if (cipher == nullptr ) continue ;
4426+ if (cipher == nullptr ) return ;
44264427 EVP_CIPHER_free (cipher);
44274428 context.cb (name);
4429+ };
4430+ #endif
4431+ #if OPENSSL_WITH_AES_SIV
4432+ for (const char * name : kProviderOnlyAesSivCiphers ) {
4433+ maybe_push_provider_only_cipher (name);
4434+ }
4435+ #endif
4436+ #if OPENSSL_WITH_AES_GCM_SIV
4437+ for (const char * name : kProviderOnlyAesGcmSivCiphers ) {
4438+ maybe_push_provider_only_cipher (name);
44284439 }
44294440#endif
44304441#endif
You can’t perform that action at this time.
0 commit comments