Skip to content

src: fix ValidateDSAParameters when fips is enabled

Rodrigo Muino Tomonari requested to merge github/fork/danbev/crypto_fips into master

Currently, the following compilation errors are generated when configuring --openssl-is-fips:

../src/node_crypto.cc: In function ‘bool
node::crypto::ValidateDSAParameters(EVP_PKEY*)’:
../src/node_crypto.cc:4886:55: error: ‘pkey’ was not declared in this
scope
   if (FIPS_mode() && EVP_PKEY_DSA == EVP_PKEY_base_id(pkey.get())) {
                                                       ^~~~
../src/node_crypto.cc:4886:55: note: suggested alternative: ‘key’
   if (FIPS_mode() && EVP_PKEY_DSA == EVP_PKEY_base_id(pkey.get())) {
                                                       ^~~~
                                                       key
../src/node_crypto.cc:4898:35: error: expected ‘;’ before ‘}’ token
            (L == 3072 && N == 256)
                                   ^
                                   ;
   }

This commit fixes the errors, and after this compilation is successful.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading