From: Dr. Stephen Henson <steve@openssl.org>
Date: Thu, 18 Aug 2016 12:59:32 +0000 (+0100)
Subject: constify i2o_ECPublicKey
X-Git-Tag: OpenSSL_1_1_0~136
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60c25873699285731cf3f2f5b6e5ade739e8862a;p=openssl

constify i2o_ECPublicKey

Reviewed-by: Matt Caswell <matt@openssl.org>
---

diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
index e10deff165..e911b2b2e2 100644
--- a/crypto/ec/ec_asn1.c
+++ b/crypto/ec/ec_asn1.c
@@ -1125,7 +1125,7 @@ EC_KEY *o2i_ECPublicKey(EC_KEY **a, const unsigned char **in, long len)
     return ret;
 }
 
-int i2o_ECPublicKey(EC_KEY *a, unsigned char **out)
+int i2o_ECPublicKey(const EC_KEY *a, unsigned char **out)
 {
     size_t buf_len = 0;
     int new_buffer = 0;
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
index 4a8b832756..b6db22da8c 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -987,7 +987,7 @@ EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
  *               of bytes needed).
  *  \return 1 on success and 0 if an error occurred
  */
-int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
+int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out);
 
 /** Prints out the ec parameters on human readable form.
  *  \param  bp   BIO object to which the information is printed