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 <agl@google.com>
diff --git a/crypto/ec/ec.c b/crypto/ec/ec.c
index 34e6d90..931d4a4 100644
--- a/crypto/ec/ec.c
+++ b/crypto/ec/ec.c
@@ -247,7 +247,6 @@
   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 @@
   }
 
   dest->curve_name = src->curve_name;
-  dest->asn1_form = src->asn1_form;
 
   return dest->meth->group_copy(dest, src);
 }
@@ -540,11 +538,6 @@
   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 2ae33b2..09944aa 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -295,9 +295,6 @@
 
 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 5c3be55..da116c4 100644
--- a/crypto/ec/internal.h
+++ b/crypto/ec/internal.h
@@ -199,7 +199,6 @@
   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 630e57b..7b50caa 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -146,11 +146,6 @@
  * 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. */