diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-10-27 19:18:59 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-12-09 22:09:19 +0000 |
commit | 6e73d12e766b81c91d255b1d5db8b110f5559544 (patch) | |
tree | 731dc171e1fa0de3d12374ae596ec6fa3b7047e7 /crypto/ec/ecdsa_sign.c | |
parent | 6a774a662569a5f8231b815dd3487f4b1b7bcf07 (diff) | |
download | openssl-6e73d12e766b81c91d255b1d5db8b110f5559544.zip openssl-6e73d12e766b81c91d255b1d5db8b110f5559544.tar.gz openssl-6e73d12e766b81c91d255b1d5db8b110f5559544.tar.bz2 |
return errors for unsupported operations
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/ec/ecdsa_sign.c')
-rw-r--r-- | crypto/ec/ecdsa_sign.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/ec/ecdsa_sign.c b/crypto/ec/ecdsa_sign.c index 5a45454..f3c6d78 100644 --- a/crypto/ec/ecdsa_sign.c +++ b/crypto/ec/ecdsa_sign.c @@ -53,12 +53,13 @@ * */ -# include <openssl/ec.h> +#include <openssl/ec.h> #include "ec_lcl.h" #ifndef OPENSSL_NO_ENGINE # include <openssl/engine.h> #endif #include <openssl/rand.h> +#include <openssl/err.h> ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) { @@ -71,6 +72,7 @@ ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dlen, { if (eckey->meth->sign_sig) return eckey->meth->sign_sig(dgst, dlen, kinv, rp, eckey); + ECerr(EC_F_ECDSA_DO_SIGN_EX, EC_R_OPERATION_NOT_SUPPORTED); return NULL; } @@ -101,5 +103,6 @@ int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, { if (eckey->meth->sign_setup) return eckey->meth->sign_setup(eckey, ctx_in, kinvp, rp); + ECerr(EC_F_ECDSA_SIGN_SETUP, EC_R_OPERATION_NOT_SUPPORTED); return 0; } |