summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2019-01-25 20:56:45 +0100
committerDavid Benjamin <davidben@google.com>2019-01-30 17:04:47 +0100
commita97faad76a1be22eadd6c1a39972ad5e095d9e80 (patch)
tree0c83ed55937c8c60594e3853c49f26c7e37559ec /crypto
parentComplain if -twopass is used incorrectly (diff)
downloadopenssl-a97faad76a1be22eadd6c1a39972ad5e095d9e80.tar.xz
openssl-a97faad76a1be22eadd6c1a39972ad5e095d9e80.zip
Document and add macros for additional DSA options
EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS and EVP_PKEY_CTRL_DSA_PARAMGEN_MD are only exposed from EVP_PKEY_CTX_ctrl, which means callers must write more error-prone code (see also issue #1319). Add the missing wrapper macros and document them. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8093)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/dsa/dsa_pmeth.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/dsa/dsa_pmeth.c b/crypto/dsa/dsa_pmeth.c
index 848b673d00..0786fc2751 100644
--- a/crypto/dsa/dsa_pmeth.c
+++ b/crypto/dsa/dsa_pmeth.c
@@ -174,9 +174,7 @@ static int pkey_dsa_ctrl_str(EVP_PKEY_CTX *ctx,
}
if (strcmp(type, "dsa_paramgen_q_bits") == 0) {
int qbits = atoi(value);
- return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN,
- EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS, qbits,
- NULL);
+ return EVP_PKEY_CTX_set_dsa_paramgen_q_bits(ctx, qbits);
}
if (strcmp(type, "dsa_paramgen_md") == 0) {
const EVP_MD *md = EVP_get_digestbyname(value);
@@ -185,9 +183,7 @@ static int pkey_dsa_ctrl_str(EVP_PKEY_CTX *ctx,
DSAerr(DSA_F_PKEY_DSA_CTRL_STR, DSA_R_INVALID_DIGEST_TYPE);
return 0;
}
- return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN,
- EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0,
- (void *)md);
+ return EVP_PKEY_CTX_set_dsa_paramgen_md(ctx, md);
}
return -2;
}