summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecdsa_sign.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-12-09 13:10:36 +0000
committerDr. Stephen Henson <steve@openssl.org>2015-12-09 22:09:20 +0000
commit91e7bcc26494f1c0060964c90db2660a9e23e37a (patch)
tree2201cdb7c27b546d70109af59618d97254670a51 /crypto/ec/ecdsa_sign.c
parent7bb75a5d08fad1cebd8cfc153c92d1f0c9ff03a0 (diff)
Use NULL comparison
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/ec/ecdsa_sign.c')
-rw-r--r--crypto/ec/ecdsa_sign.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/ec/ecdsa_sign.c b/crypto/ec/ecdsa_sign.c
index aeccda74a2..ebef4a14d5 100644
--- a/crypto/ec/ecdsa_sign.c
+++ b/crypto/ec/ecdsa_sign.c
@@ -70,7 +70,7 @@ ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dlen,
const BIGNUM *kinv, const BIGNUM *rp,
EC_KEY *eckey)
{
- if (eckey->meth->sign_sig)
+ if (eckey->meth->sign_sig != NULL)
return eckey->meth->sign_sig(dgst, dlen, kinv, rp, eckey);
ECerr(EC_F_ECDSA_DO_SIGN_EX, EC_R_OPERATION_NOT_SUPPORTED);
return NULL;
@@ -86,7 +86,7 @@ int ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen,
unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv,
const BIGNUM *r, EC_KEY *eckey)
{
- if (eckey->meth->sign)
+ if (eckey->meth->sign != NULL)
return eckey->meth->sign(type, dgst, dlen, sig, siglen, kinv, r, eckey);
ECerr(EC_F_ECDSA_SIGN_EX, EC_R_OPERATION_NOT_SUPPORTED);
return 0;
@@ -95,7 +95,7 @@ int ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen,
int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
BIGNUM **rp)
{
- if (eckey->meth->sign_setup)
+ if (eckey->meth->sign_setup != NULL)
return eckey->meth->sign_setup(eckey, ctx_in, kinvp, rp);
ECerr(EC_F_ECDSA_SIGN_SETUP, EC_R_OPERATION_NOT_SUPPORTED);
return 0;