diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2006-04-10 11:16:11 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2006-04-10 11:16:11 +0000 |
commit | 716630c0eb8546e53f1e229f2abcd867c5d46576 (patch) | |
tree | 41301818bc4426e3257b3441d1fc7e3ac35f7c99 /crypto/evp/pmeth_lib.c | |
parent | 4f59b6587f1c660dfe61c368ede1c4e34e03164d (diff) |
Change operation values so they can be used as a mask.
Fix rsa_pkey_method.
Diffstat (limited to 'crypto/evp/pmeth_lib.c')
-rw-r--r-- | crypto/evp/pmeth_lib.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index a76e88b805..26a55048ca 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -156,7 +156,7 @@ int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, return -1; } - if ((optype != -1) && (ctx->operation != optype)) + if ((optype != -1) && !(ctx->operation & optype)) { EVPerr(EVP_F_EVP_PKEY_CTX_CTRL, EVP_R_INVALID_OPERATION); return -1; @@ -187,8 +187,7 @@ int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, EVPerr(EVP_F_EVP_PKEY_CTX_CTRL, EVP_R_INVALID_DIGEST); return 0; } - return EVP_PKEY_CTX_ctrl(ctx, -1, -1, EVP_PKEY_CTRL_MD, - 0, (void *)md); + return EVP_PKEY_CTX_set_signature_md(ctx, md); } return ctx->pmeth->ctrl_str(ctx, name, value); } |