diff --git a/src/api/environment.cc b/src/api/environment.cc index 0774e810746619..8b0b610393b829 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -1,4 +1,7 @@ #include +#if HAVE_OPENSSL +#include "crypto/crypto_util.h" +#endif // HAVE_OPENSSL #include "env_properties.h" #include "node.h" #include "node_builtins.h" @@ -1004,6 +1007,11 @@ void DefaultProcessExitHandlerInternal(Environment* env, ExitCode exit_code) { // in node_v8_platform-inl.h uv_library_shutdown(); DisposePlatform(); + +#if HAVE_OPENSSL + crypto::CleanupCachedRootCertificates(); +#endif // HAVE_OPENSSL + Exit(exit_code); }