summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_asn1.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-02-28 17:47:06 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-03-01 22:04:25 +0000
commit77470e989cf3c502ee00eb060b197d0241f33a22 (patch)
treee5c4b0f9b5f59a4080f7234ab143109ca2aa6a39 /crypto/ec/ec_asn1.c
parent7d054e5ab2aeaead14c0c19b808d62221020b0e1 (diff)
Replace overrides.
Instead of overriding a default operation move default operation to a separate function which is then explicitly included in any EC_METHOD that uses it. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/ec/ec_asn1.c')
-rw-r--r--crypto/ec/ec_asn1.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
index 4e02e5a7a1..b2ae8927a3 100644
--- a/crypto/ec/ec_asn1.c
+++ b/crypto/ec/ec_asn1.c
@@ -1044,13 +1044,9 @@ EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len)
goto err;
}
} else {
- if (ret->group->meth->keygenpub != NULL) {
- if (ret->group->meth->keygenpub(ret) == 0)
+ if (ret->group->meth->keygenpub == NULL
+ || ret->group->meth->keygenpub(ret) == 0)
goto err;
- } else if (!EC_POINT_mul(ret->group, ret->pub_key, ret->priv_key, NULL,
- NULL, NULL)) {
- goto err;
- }
/* Remember the original private-key-only encoding. */
ret->enc_flag |= EC_PKEY_NO_PUBKEY;
}