We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48b65f7 commit 468e3e9Copy full SHA for 468e3e9
src/crypto/crypto_context.cc
@@ -1149,12 +1149,14 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo<Value>& args) {
1149
// TODO(@jasnell): Should this use ThrowCryptoError?
1150
unsigned long err = ERR_get_error(); // NOLINT(runtime/int)
1151
1152
+#if OPENSSL_VERSION_MAJOR >= 3
1153
if (ERR_GET_REASON(err) == ERR_R_UNSUPPORTED) {
1154
// OpenSSL's "unsupported" error without any context is very
1155
// common and not very helpful, so we override it:
1156
return THROW_ERR_CRYPTO_UNSUPPORTED_OPERATION(
1157
env, "Unsupported PKCS12 PFX data");
1158
}
1159
+#endif
1160
1161
const char* str = ERR_reason_error_string(err);
1162
str = str != nullptr ? str : "Unknown error";
0 commit comments