diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2006-04-09 19:17:25 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2006-04-09 19:17:25 +0000 |
commit | b2a97be7f4d61221f3fff3872d067851602b7aa4 (patch) | |
tree | d02b0aaa9e0438ddc690e41b60685fbfc94eed6d /crypto/evp/pmeth_lib.c | |
parent | 6471c9f4787d64c2942ea75073374d86f5aa6517 (diff) |
Support for digest signing and X931 in rsa_pkey_meth.
Diffstat (limited to 'crypto/evp/pmeth_lib.c')
-rw-r--r-- | crypto/evp/pmeth_lib.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index 7c36395696..a705901c70 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -179,5 +179,16 @@ int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, EVPerr(EVP_F_EVP_PKEY_CTX_CTRL, EVP_R_COMMAND_NOT_SUPPORTED); return -2; } + if (!strcmp(name, "digest")) + { + const EVP_MD *md; + if (!value || !(md = EVP_get_digestbyname(value))) + { + 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_NID, + EVP_MD_type(md), NULL); + } return ctx->pmeth->ctrl_str(ctx, name, value); } |