From 3547688ee0b4c65df2c163d046b1d51c5309ceb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Molland?= Date: Mon, 8 Dec 2014 17:02:16 +0100 Subject: [PATCH] Remove EC_GROUP_set_point_conversion_form All serialization functions take point format as input, and asn1_form is never used. Change-Id: Ib1ede692e815ac0c929e3b589c3a5869adb0dc8b Reviewed-on: https://boringssl-review.googlesource.com/2511 Reviewed-by: Adam Langley --- crypto/ec/ec.c | 7 ------- crypto/ec/ec_key.c | 3 --- crypto/ec/internal.h | 1 - include/openssl/ec.h | 5 ----- 4 files changed, 16 deletions(-) diff --git a/crypto/ec/ec.c b/crypto/ec/ec.c index 34e6d90f..931d4a4e 100644 --- a/crypto/ec/ec.c +++ b/crypto/ec/ec.c @@ -247,7 +247,6 @@ EC_GROUP *ec_group_new(const EC_METHOD *meth) { ret->meth = meth; BN_init(&ret->order); BN_init(&ret->cofactor); - ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED; if (!meth->group_init(ret)) { OPENSSL_free(ret); @@ -457,7 +456,6 @@ int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) { } dest->curve_name = src->curve_name; - dest->asn1_form = src->asn1_form; return dest->meth->group_copy(dest, src); } @@ -540,11 +538,6 @@ int EC_GROUP_get_degree(const EC_GROUP *group) { return group->meth->group_get_degree(group); } -void EC_GROUP_set_point_conversion_form(EC_GROUP *group, - point_conversion_form_t form) { - group->asn1_form = form; -} - int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) { if (group->meth->mul == 0) { /* use default */ diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index 2ae33b2b..09944aad 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -295,9 +295,6 @@ point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key) { void EC_KEY_set_conv_form(EC_KEY *key, point_conversion_form_t cform) { key->conv_form = cform; - if (key->group != NULL) { - EC_GROUP_set_point_conversion_form(key->group, cform); - } } int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx) { diff --git a/crypto/ec/internal.h b/crypto/ec/internal.h index 5c3be55c..da116c4c 100644 --- a/crypto/ec/internal.h +++ b/crypto/ec/internal.h @@ -199,7 +199,6 @@ struct ec_group_st { BIGNUM order, cofactor; int curve_name; /* optional NID for named curve */ - point_conversion_form_t asn1_form; struct ec_pre_comp_st *pre_comp; diff --git a/include/openssl/ec.h b/include/openssl/ec.h index 630e57b2..7b50caac 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -146,11 +146,6 @@ OPENSSL_EXPORT int EC_GROUP_get_curve_name(const EC_GROUP *group); * element of the field underlying |group|. */ OPENSSL_EXPORT int EC_GROUP_get_degree(const EC_GROUP *group); -/* EC_GROUP_set_point_conversion_form sets the form that serialised points will - * take as one of the |POINT_CONVERSION_*| values. */ -OPENSSL_EXPORT void EC_GROUP_set_point_conversion_form( - EC_GROUP *group, point_conversion_form_t form); - /* EC_GROUP_precompute_mult precomputes multiplies of the generator in order to * speed up operations that involve calculating generator multiples. It returns * one on sucess and zero otherwise. If |ctx| is not NULL, it may be used. */