diff options
author | tb <> | 2019-01-19 01:07:00 +0000 |
---|---|---|
committer | tb <> | 2019-01-19 01:07:00 +0000 |
commit | dc38b357c3a6e0db4a7172af29148961b86b0724 (patch) | |
tree | f28042e7a3c924e4bf846d6cded984e02699177d /src/lib/libcrypto/ecdsa/ecdsa.h | |
parent | f11f1c0f8ad579cfb88a2559e3efe0e0367cec85 (diff) | |
download | openbsd-dc38b357c3a6e0db4a7172af29148961b86b0724.tar.gz openbsd-dc38b357c3a6e0db4a7172af29148961b86b0724.tar.bz2 openbsd-dc38b357c3a6e0db4a7172af29148961b86b0724.zip |
Partial port of EC_KEY_METHOD from OpenSSL 1.1.
This commit adds init/free, support for signing, setting and
getting the method, engine support as well as extra data.
from markus
Diffstat (limited to 'src/lib/libcrypto/ecdsa/ecdsa.h')
-rw-r--r-- | src/lib/libcrypto/ecdsa/ecdsa.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecdsa.h b/src/lib/libcrypto/ecdsa/ecdsa.h index 9c53230a88..12d6677ce3 100644 --- a/src/lib/libcrypto/ecdsa/ecdsa.h +++ b/src/lib/libcrypto/ecdsa/ecdsa.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecdsa.h,v 1.5 2018/03/17 15:24:44 tb Exp $ */ | 1 | /* $OpenBSD: ecdsa.h,v 1.6 2019/01/19 01:07:00 tb Exp $ */ |
2 | /** | 2 | /** |
3 | * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions | 3 | * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions |
4 | * \author Written by Nils Larsch for the OpenSSL project | 4 | * \author Written by Nils Larsch for the OpenSSL project |
@@ -269,6 +269,26 @@ int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg); | |||
269 | void *ECDSA_get_ex_data(EC_KEY *d, int idx); | 269 | void *ECDSA_get_ex_data(EC_KEY *d, int idx); |
270 | 270 | ||
271 | 271 | ||
272 | /* XXX should be in ec.h, but needs ECDSA_SIG */ | ||
273 | void EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth, | ||
274 | int (*sign)(int type, const unsigned char *dgst, | ||
275 | int dlen, unsigned char *sig, unsigned int *siglen, | ||
276 | const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey), | ||
277 | int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, | ||
278 | BIGNUM **kinvp, BIGNUM **rp), | ||
279 | ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, | ||
280 | int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, | ||
281 | EC_KEY *eckey)); | ||
282 | void EC_KEY_METHOD_get_sign(EC_KEY_METHOD *meth, | ||
283 | int (**psign)(int type, const unsigned char *dgst, | ||
284 | int dlen, unsigned char *sig, unsigned int *siglen, | ||
285 | const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey), | ||
286 | int (**psign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, | ||
287 | BIGNUM **kinvp, BIGNUM **rp), | ||
288 | ECDSA_SIG *(**psign_sig)(const unsigned char *dgst, | ||
289 | int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, | ||
290 | EC_KEY *eckey)); | ||
291 | |||
272 | /* BEGIN ERROR CODES */ | 292 | /* BEGIN ERROR CODES */ |
273 | /* The following lines are auto generated by the script mkerr.pl. Any changes | 293 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
274 | * made after this point may be overwritten when the script is next run. | 294 | * made after this point may be overwritten when the script is next run. |