diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2017-04-25 21:34:58 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2017-05-30 21:38:20 +0200 |
commit | 684c41c83fdae24b44cdd7af9e71da505d803145 (patch) | |
tree | 43935eea27fd7ed14c5ca4d60cab6ad284610731 /crypto/ec/ecx_meth.c | |
parent | make errors (diff) | |
download | openssl-684c41c83fdae24b44cdd7af9e71da505d803145.tar.xz openssl-684c41c83fdae24b44cdd7af9e71da505d803145.zip |
Add custom sig_info_set for ED25519
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3503)
Diffstat (limited to 'crypto/ec/ecx_meth.c')
-rw-r--r-- | crypto/ec/ecx_meth.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crypto/ec/ecx_meth.c b/crypto/ec/ecx_meth.c index b9046b3b87..715fe06911 100644 --- a/crypto/ec/ecx_meth.c +++ b/crypto/ec/ecx_meth.c @@ -371,6 +371,14 @@ static int ecd_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, return 3; } +static int ecd_sig_info_set(X509_SIG_INFO *siginf, const X509_ALGOR *alg, + const ASN1_STRING *sig) +{ + X509_SIG_INFO_set(siginf, NID_undef, NID_ED25519, X25519_SECURITY_BITS, + X509_SIG_INFO_TLS); + return 1; +} + const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = { NID_ED25519, NID_ED25519, @@ -400,7 +408,8 @@ const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = { NULL, NULL, ecd_item_verify, - ecd_item_sign + ecd_item_sign, + ecd_sig_info_set }; static int pkey_ecx_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) |