Commit 3c159fc1 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

check EC public key isn't point at infinity

parent 6056afd2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -305,6 +305,12 @@ int EC_KEY_check_key(const EC_KEY *eckey)
		return 0;
		}

	if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key))
		{
		ECerr(EC_F_EC_KEY_CHECK_KEY, EC_R_POINT_AT_INFINITY);
		goto err;
		}

	if ((ctx = BN_CTX_new()) == NULL)
		goto err;
	if ((point = EC_POINT_new(eckey->group)) == NULL)