From 28aa72f4849ce62ed7fdc5254e200c223026b872 Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 24 Aug 2018 20:26:03 +0000 Subject: [PATCH] Add const to EVP_PKCS82PKEY(). tested in a bulk by sthen ok jsing --- lib/libcrypto/evp/evp_pkey.c | 4 ++-- lib/libcrypto/x509/x509.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libcrypto/evp/evp_pkey.c b/lib/libcrypto/evp/evp_pkey.c index 68948f5fa6d..9ff544b84af 100644 --- a/lib/libcrypto/evp/evp_pkey.c +++ b/lib/libcrypto/evp/evp_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_pkey.c,v 1.22 2018/08/24 20:17:33 tb Exp $ */ +/* $OpenBSD: evp_pkey.c,v 1.23 2018/08/24 20:26:03 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -67,7 +67,7 @@ /* Extract a private key from a PKCS8 structure */ EVP_PKEY * -EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8) +EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8) { EVP_PKEY *pkey = NULL; const ASN1_OBJECT *algoid; diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index ab1f9b46b18..c66dfa6a48f 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.73 2018/08/24 20:17:33 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.74 2018/08/24 20:26:03 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1287,7 +1287,7 @@ PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO **a, const unsi int i2d_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO *a, unsigned char **out); extern const ASN1_ITEM PKCS8_PRIV_KEY_INFO_it; -EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8); +EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8); PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey); int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj, int version, -- 2.20.1