File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1149,12 +1149,14 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo<Value>& args) {
11491149 // TODO(@jasnell): Should this use ThrowCryptoError?
11501150 unsigned long err = ERR_get_error (); // NOLINT(runtime/int)
11511151
1152+ #if OPENSSL_VERSION_MAJOR >= 3
11521153 if (ERR_GET_REASON (err) == ERR_R_UNSUPPORTED) {
11531154 // OpenSSL's "unsupported" error without any context is very
11541155 // common and not very helpful, so we override it:
11551156 return THROW_ERR_CRYPTO_UNSUPPORTED_OPERATION (
11561157 env, " Unsupported PKCS12 PFX data" );
11571158 }
1159+ #endif
11581160
11591161 const char * str = ERR_reason_error_string (err);
11601162 str = str != nullptr ? str : " Unknown error" ;
Original file line number Diff line number Diff line change 22const common = require ( '../common' ) ;
33if ( ! common . hasCrypto )
44 common . skip ( 'missing crypto' ) ;
5+ if ( ! common . hasOpenSSL3 )
6+ common . skip ( 'OpenSSL legacy failures are only testable with OpenSSL 3+' ) ;
7+
58const fixtures = require ( '../common/fixtures' ) ;
69
710const {
You can’t perform that action at this time.
0 commit comments