diff options
author | Nils Larsch <nils@openssl.org> | 2006-02-08 19:16:33 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2006-02-08 19:16:33 +0000 |
commit | 22d1087e16cff731d27c890f84757652d98303c1 (patch) | |
tree | 5a788aea06a917bd9913bc6d14546dc8e62ed576 /crypto/ecdsa | |
parent | 9f85fcefdce92ea8746937f20f9f2fbe384c2095 (diff) |
backport recent changes from the cvs head
Diffstat (limited to 'crypto/ecdsa')
-rw-r--r-- | crypto/ecdsa/ecs_lib.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/ecdsa/ecs_lib.c b/crypto/ecdsa/ecs_lib.c index ab96a6dc9c..1fb9bc9600 100644 --- a/crypto/ecdsa/ecs_lib.c +++ b/crypto/ecdsa/ecs_lib.c @@ -206,10 +206,14 @@ int ECDSA_size(const EC_KEY *r) ASN1_INTEGER bs; BIGNUM *order=NULL; unsigned char buf[4]; - const EC_GROUP *group = EC_KEY_get0_group(r); + const EC_GROUP *group; - if (r == NULL || group == NULL) + if (r == NULL) + return 0; + group = EC_KEY_get0_group(r); + if (group == NULL) return 0; + if ((order = BN_new()) == NULL) return 0; if (!EC_GROUP_get_order(group,order,NULL)) { |