diff options
author | tb <> | 2023-04-13 15:00:24 +0000 |
---|---|---|
committer | tb <> | 2023-04-13 15:00:24 +0000 |
commit | 1f54371dd7e7019c23e6227ddb7b0eef5ff0468c (patch) | |
tree | c77c650b80a2a5715e9d9f734b2d0a9c4b3a9ff7 /src/lib/libcrypto/ecdsa/ecs_vrf.c | |
parent | 15b6ca969589a3b9b2069bb0b796c42e2f146fc4 (diff) | |
download | openbsd-1f54371dd7e7019c23e6227ddb7b0eef5ff0468c.tar.gz openbsd-1f54371dd7e7019c23e6227ddb7b0eef5ff0468c.tar.bz2 openbsd-1f54371dd7e7019c23e6227ddb7b0eef5ff0468c.zip |
Fold ECDSA sign and verify mess into ecs_ossl.c
discussed with jsing
Diffstat (limited to 'src/lib/libcrypto/ecdsa/ecs_vrf.c')
-rw-r--r-- | src/lib/libcrypto/ecdsa/ecs_vrf.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecs_vrf.c b/src/lib/libcrypto/ecdsa/ecs_vrf.c index 4be4c89d80..bfb2a253ed 100644 --- a/src/lib/libcrypto/ecdsa/ecs_vrf.c +++ b/src/lib/libcrypto/ecdsa/ecs_vrf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecs_vrf.c,v 1.10 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: ecs_vrf.c,v 1.11 2023/04/13 15:00:24 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project | 3 | * Written by Nils Larsch for the OpenSSL project |
4 | */ | 4 | */ |
@@ -73,28 +73,9 @@ | |||
73 | * 0: incorrect signature | 73 | * 0: incorrect signature |
74 | * -1: error | 74 | * -1: error |
75 | */ | 75 | */ |
76 | int | ||
77 | ECDSA_do_verify(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, | ||
78 | EC_KEY *eckey) | ||
79 | { | ||
80 | if (eckey->meth->verify_sig != NULL) | ||
81 | return eckey->meth->verify_sig(dgst, dgst_len, sig, eckey); | ||
82 | ECDSAerror(EVP_R_METHOD_NOT_SUPPORTED); | ||
83 | return 0; | ||
84 | } | ||
85 | 76 | ||
86 | /* returns | 77 | /* returns |
87 | * 1: correct signature | 78 | * 1: correct signature |
88 | * 0: incorrect signature | 79 | * 0: incorrect signature |
89 | * -1: error | 80 | * -1: error |
90 | */ | 81 | */ |
91 | int | ||
92 | ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, | ||
93 | const unsigned char *sigbuf, int sig_len, EC_KEY *eckey) | ||
94 | { | ||
95 | if (eckey->meth->verify != NULL) | ||
96 | return eckey->meth->verify(type, dgst, dgst_len, | ||
97 | sigbuf, sig_len, eckey); | ||
98 | ECDSAerror(EVP_R_METHOD_NOT_SUPPORTED); | ||
99 | return 0; | ||
100 | } | ||