aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ec
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-08-17 00:21:55 +0100
committerDr. Stephen Henson <steve@openssl.org>2016-08-17 12:01:29 +0100
commit245c6bc33b1481052f347f316cec16888aa1be85 (patch)
tree9ffe8102e9e1891fb5820cecc07203f54c7fddb9 /crypto/ec
parentac4e257747075958d37665f327bdf685dd2478ab (diff)
downloadopenssl-245c6bc33b1481052f347f316cec16888aa1be85.tar.gz
Constify private key decode.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec_ameth.c4
-rw-r--r--crypto/ec/ecx_meth.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c
index 4baadfb617..a899932ee1 100644
--- a/crypto/ec/ec_ameth.c
+++ b/crypto/ec/ec_ameth.c
@@ -179,13 +179,13 @@ static int eckey_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
return -2;
}
-static int eckey_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8)
+static int eckey_priv_decode(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8)
{
const unsigned char *p = NULL;
const void *pval;
int ptype, pklen;
EC_KEY *eckey = NULL;
- X509_ALGOR *palg;
+ const X509_ALGOR *palg;
if (!PKCS8_pkey_get0(NULL, &p, &pklen, &palg, p8))
return 0;
diff --git a/crypto/ec/ecx_meth.c b/crypto/ec/ecx_meth.c
index f7179511dd..06e3911340 100644
--- a/crypto/ec/ecx_meth.c
+++ b/crypto/ec/ecx_meth.c
@@ -32,7 +32,7 @@ typedef enum {
} ecx_key_op_t;
/* Setup EVP_PKEY using public, private or generation */
-static int ecx_key_op(EVP_PKEY *pkey, X509_ALGOR *palg,
+static int ecx_key_op(EVP_PKEY *pkey, const X509_ALGOR *palg,
const unsigned char *p, int plen, ecx_key_op_t op)
{
X25519_KEY *xkey;
@@ -135,12 +135,12 @@ static int ecx_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
return !CRYPTO_memcmp(akey->pubkey, bkey->pubkey, X25519_KEYLEN);
}
-static int ecx_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8)
+static int ecx_priv_decode(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8)
{
const unsigned char *p;
int plen;
ASN1_OCTET_STRING *oct = NULL;
- X509_ALGOR *palg;
+ const X509_ALGOR *palg;
int rv;
if (!PKCS8_pkey_get0(NULL, &p, &plen, &palg, p8))