| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5854abc commit 7e07cce
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,17 @@ | |||
| 12 | 12 | ||
| 13 | 13 | #include <cstdio> | |
| 14 | 14 | ||
| 15 | + // EVP_PKEY_CTX_set_dsa_paramgen_q_bits was added in OpenSSL 1.1.1e. | ||
| 16 | + #if OPENSSL_VERSION_NUMBER < 0x1010105fL | ||
| 17 | + #define EVP_PKEY_CTX_set_dsa_paramgen_q_bits(ctx, qbits) \ | ||
| 18 | + EVP_PKEY_CTX_ctrl((ctx), \ | ||
| 19 | + EVP_PKEY_DSA, \ | ||
| 20 | + EVP_PKEY_OP_PARAMGEN, \ | ||
| 21 | + EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS, \ | ||
| 22 | + (qbits), \ | ||
| 23 | + nullptr) | ||
| 24 | + #endif | ||
| 25 | + | ||
| 15 | 26 | namespace node { | |
| 16 | 27 | ||
| 17 | 28 | using v8::FunctionCallbackInfo; | |
@@ -39,13 +50,8 @@ EVPKeyCtxPointer DsaKeyGenTraits::Setup(DsaKeyPairGenConfig* params) { | |||
| 39 | 50 | } | |
| 40 | 51 | ||
| 41 | 52 | if (params->params.divisor_bits != -1) { | |
| 42 | - if (EVP_PKEY_CTX_ctrl( | ||
| 43 | - param_ctx.get(), | ||
| 44 | - EVP_PKEY_DSA, | ||
| 45 | - EVP_PKEY_OP_PARAMGEN, | ||
| 46 | - EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS, | ||
| 47 | - params->params.divisor_bits, | ||
| 48 | - nullptr) <= 0) { | ||
| 53 | + if (EVP_PKEY_CTX_set_dsa_paramgen_q_bits( | ||
| 54 | + param_ctx.get(), params->params.divisor_bits) <= 0) { | ||
| 49 | 55 | return EVPKeyCtxPointer(); | |
| 50 | 56 | } | |
| 51 | 57 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments