diff options
| author | jsing <> | 2019-09-09 18:06:26 +0000 |
|---|---|---|
| committer | jsing <> | 2019-09-09 18:06:26 +0000 |
| commit | 18a2a567e136745ffdad4c3346ee0b435f927909 (patch) | |
| tree | a865a7b163451c6d2c4ef5b36642f1deb36a91b9 /src/lib/libcrypto/rsa | |
| parent | c146bc97665a82b9895f2ad378d2f00bb0978c03 (diff) | |
| download | openbsd-18a2a567e136745ffdad4c3346ee0b435f927909.tar.gz openbsd-18a2a567e136745ffdad4c3346ee0b435f927909.tar.bz2 openbsd-18a2a567e136745ffdad4c3346ee0b435f927909.zip | |
Provide EVP_PKEY_CTX_get_signature_md() macro and implement the
EVP_PKEY_CTRL_GET_MD control for DSA, EC and RSA.
This is used by the upcoming RSA CMS code.
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libcrypto/rsa')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_pmeth.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_pmeth.c b/src/lib/libcrypto/rsa/rsa_pmeth.c index ea6401b3da..d0cc50cd9f 100644 --- a/src/lib/libcrypto/rsa/rsa_pmeth.c +++ b/src/lib/libcrypto/rsa/rsa_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_pmeth.c,v 1.21 2018/09/05 00:55:33 djm Exp $ */ | 1 | /* $OpenBSD: rsa_pmeth.c,v 1.22 2019/09/09 18:06:26 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -423,6 +423,10 @@ bad_pad: | |||
| 423 | rctx->md = p2; | 423 | rctx->md = p2; |
| 424 | return 1; | 424 | return 1; |
| 425 | 425 | ||
| 426 | case EVP_PKEY_CTRL_GET_MD: | ||
| 427 | *(const EVP_MD **)p2 = rctx->md; | ||
| 428 | return 1; | ||
| 429 | |||
| 426 | case EVP_PKEY_CTRL_RSA_MGF1_MD: | 430 | case EVP_PKEY_CTRL_RSA_MGF1_MD: |
| 427 | case EVP_PKEY_CTRL_GET_RSA_MGF1_MD: | 431 | case EVP_PKEY_CTRL_GET_RSA_MGF1_MD: |
| 428 | if (rctx->pad_mode != RSA_PKCS1_PSS_PADDING) { | 432 | if (rctx->pad_mode != RSA_PKCS1_PSS_PADDING) { |
