Skip to content

Commit

Permalink
apacheGH-38378: [C++][Parquet] Don't initialize OpenSSL explicitly wi…
Browse files Browse the repository at this point in the history
…th OpenSSL 1.1
  • Loading branch information
kou committed Oct 20, 2023
1 parent 4bbd48d commit d7be15c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/src/parquet/encryption/openssl_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
namespace parquet::encryption::openssl {

void EnsureInitialized() {
// OpenSSL 1.1 doesn't provide OPENSSL_INIT_ENGINE_ALL_BUILTIN.
#ifdef OPENSSL_INIT_ENGINE_ALL_BUILTIN
// Initialize ciphers and random engines
if (!OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN | OPENSSL_INIT_ADD_ALL_CIPHERS,
NULL)) {
throw ParquetException("OpenSSL initialization failed");
}
#endif
}

} // namespace parquet::encryption::openssl

0 comments on commit d7be15c

Please sign in to comment.