diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-11-17 20:25:51 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-11-17 20:25:51 +0000 |
commit | a06c795f5a00d90ce8025ebb20c0c3e324360784 (patch) | |
tree | 98b31f9da1261900b7e6164ee326eada60fe2173 | |
parent | bd960879979e0bdbd31cb04109ce27bf56e2c9e5 (diff) |
Make the ECDSA_SIG bowels public. This matches RSA_SIG and DSA_SIG, and we
expect a good use for this knowledge in the tree in the near future.
Contributed by Vincent Gross, thanks!
-rw-r--r-- | lib/libssl/src/crypto/ecdsa/ecdsa.h | 33 | ||||
-rw-r--r-- | lib/libssl/src/crypto/ecdsa/ecs_locl.h | 27 |
2 files changed, 30 insertions, 30 deletions
diff --git a/lib/libssl/src/crypto/ecdsa/ecdsa.h b/lib/libssl/src/crypto/ecdsa/ecdsa.h index a29e5f6f6b8..ad716c24a55 100644 --- a/lib/libssl/src/crypto/ecdsa/ecdsa.h +++ b/lib/libssl/src/crypto/ecdsa/ecdsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ecdsa.h,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ +/* $OpenBSD: ecdsa.h,v 1.3 2014/11/17 20:25:50 miod Exp $ */ /** * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions * \author Written by Nils Larsch for the OpenSSL project @@ -75,11 +75,36 @@ extern "C" { #endif -typedef struct ECDSA_SIG_st - { +typedef struct ECDSA_SIG_st ECDSA_SIG; + +struct ecdsa_method { + const char *name; + ECDSA_SIG *(*ecdsa_do_sign)(const unsigned char *dgst, int dgst_len, + const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey); + int (*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, + BIGNUM **r); + int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, + const ECDSA_SIG *sig, EC_KEY *eckey); +#if 0 + int (*init)(EC_KEY *eckey); + int (*finish)(EC_KEY *eckey); +#endif + int flags; + char *app_data; +}; + +/* If this flag is set the ECDSA method is FIPS compliant and can be used + * in FIPS mode. This is set in the validated module method. If an + * application sets this flag in its own methods it is its responsibility + * to ensure the result is compliant. + */ + +#define ECDSA_FLAG_FIPS_METHOD 0x1 + +struct ECDSA_SIG_st { BIGNUM *r; BIGNUM *s; - } ECDSA_SIG; +}; /** Allocates and initialize a ECDSA_SIG structure * \return pointer to a ECDSA_SIG structure or NULL if an error occurred diff --git a/lib/libssl/src/crypto/ecdsa/ecs_locl.h b/lib/libssl/src/crypto/ecdsa/ecs_locl.h index ceae6a27849..e47f6794ac7 100644 --- a/lib/libssl/src/crypto/ecdsa/ecs_locl.h +++ b/lib/libssl/src/crypto/ecdsa/ecs_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ecs_locl.h,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ +/* $OpenBSD: ecs_locl.h,v 1.3 2014/11/17 20:25:50 miod Exp $ */ /* * Written by Nils Larsch for the OpenSSL project */ @@ -65,31 +65,6 @@ extern "C" { #endif -struct ecdsa_method - { - const char *name; - ECDSA_SIG *(*ecdsa_do_sign)(const unsigned char *dgst, int dgst_len, - const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey); - int (*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, - BIGNUM **r); - int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, - const ECDSA_SIG *sig, EC_KEY *eckey); -#if 0 - int (*init)(EC_KEY *eckey); - int (*finish)(EC_KEY *eckey); -#endif - int flags; - char *app_data; - }; - -/* If this flag is set the ECDSA method is FIPS compliant and can be used - * in FIPS mode. This is set in the validated module method. If an - * application sets this flag in its own methods it is its responsibility - * to ensure the result is compliant. - */ - -#define ECDSA_FLAG_FIPS_METHOD 0x1 - typedef struct ecdsa_data_st { /* EC_KEY_METH_DATA part */ int (*init)(EC_KEY *); |