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/evp | |
| 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/evp')
| -rw-r--r-- | src/lib/libcrypto/evp/evp.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 3b3d6a07ea..b49fc61380 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp.h,v 1.76 2019/08/11 14:11:28 jsing Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.77 2019/09/09 18:06:25 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -1085,9 +1085,13 @@ void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, | |||
| 1085 | #define EVP_PKEY_OP_TYPE_GEN \ | 1085 | #define EVP_PKEY_OP_TYPE_GEN \ |
| 1086 | (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN) | 1086 | (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN) |
| 1087 | 1087 | ||
| 1088 | #define EVP_PKEY_CTX_set_signature_md(ctx, md) \ | 1088 | #define EVP_PKEY_CTX_set_signature_md(ctx, md) \ |
| 1089 | EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ | 1089 | EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ |
| 1090 | EVP_PKEY_CTRL_MD, 0, (void *)md) | 1090 | EVP_PKEY_CTRL_MD, 0, (void *)md) |
| 1091 | |||
| 1092 | #define EVP_PKEY_CTX_get_signature_md(ctx, pmd) \ | ||
| 1093 | EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ | ||
| 1094 | EVP_PKEY_CTRL_GET_MD, 0, (void *)(pmd)) | ||
| 1091 | 1095 | ||
| 1092 | #define EVP_PKEY_CTRL_MD 1 | 1096 | #define EVP_PKEY_CTRL_MD 1 |
| 1093 | #define EVP_PKEY_CTRL_PEER_KEY 2 | 1097 | #define EVP_PKEY_CTRL_PEER_KEY 2 |
| @@ -1110,6 +1114,8 @@ void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, | |||
| 1110 | 1114 | ||
| 1111 | #define EVP_PKEY_CTRL_CIPHER 12 | 1115 | #define EVP_PKEY_CTRL_CIPHER 12 |
| 1112 | 1116 | ||
| 1117 | #define EVP_PKEY_CTRL_GET_MD 13 | ||
| 1118 | |||
| 1113 | #define EVP_PKEY_ALG_CTRL 0x1000 | 1119 | #define EVP_PKEY_ALG_CTRL 0x1000 |
| 1114 | 1120 | ||
| 1115 | 1121 | ||
