Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix ValidateDSAParameters when fips is enabled #29407

Closed
wants to merge 1 commit into from

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Sep 2, 2019

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

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.
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. labels Sep 2, 2019
@nodejs-github-bot
Copy link
Collaborator

@danbev
Copy link
Contributor Author

danbev commented Sep 3, 2019

Re-run of failing node-test-commit-windows-fanned (✔️)
Re-run of failing node-test-commit-freebsd (✔️)

@danbev danbev added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 3, 2019
danbev added a commit that referenced this pull request Sep 5, 2019
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.

PR-URL: #29407
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@danbev
Copy link
Contributor Author

danbev commented Sep 5, 2019

Landed in 17d87d5.

@danbev danbev closed this Sep 5, 2019
targos pushed a commit that referenced this pull request Sep 20, 2019
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.

PR-URL: #29407
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR BridgeAR mentioned this pull request Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants