From a25a0cc2cb4d355062b3c8b6944d4e2da213facd Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 1 May 2018 19:01:28 +0000 Subject: Convert a handful of X509_*() functions to take const as in OpenSSL. tested in a bulk by sthen ok jsing --- src/lib/libcrypto/asn1/t_x509.c | 4 ++-- src/lib/libcrypto/asn1/x_algor.c | 6 +++--- src/lib/libcrypto/asn1/x_x509a.c | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/lib/libcrypto/asn1') diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c index 9ad3625653..59b308e763 100644 --- a/src/lib/libcrypto/asn1/t_x509.c +++ b/src/lib/libcrypto/asn1/t_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_x509.c,v 1.29 2018/04/25 19:58:53 tb Exp $ */ +/* $OpenBSD: t_x509.c,v 1.30 2018/05/01 19:01:27 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -321,7 +321,7 @@ X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent) } int -X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig) +X509_signature_print(BIO *bp, const X509_ALGOR *sigalg, const ASN1_STRING *sig) { int sig_nid; if (BIO_puts(bp, " Signature Algorithm: ") <= 0) diff --git a/src/lib/libcrypto/asn1/x_algor.c b/src/lib/libcrypto/asn1/x_algor.c index 27405a2bfb..2013de795d 100644 --- a/src/lib/libcrypto/asn1/x_algor.c +++ b/src/lib/libcrypto/asn1/x_algor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_algor.c,v 1.21 2015/07/24 15:09:52 jsing Exp $ */ +/* $OpenBSD: x_algor.c,v 1.22 2018/05/01 19:01:27 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -176,8 +176,8 @@ X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval) } void -X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval, - X509_ALGOR *algor) +X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype, const void **ppval, + const X509_ALGOR *algor) { if (paobj) *paobj = algor->algorithm; diff --git a/src/lib/libcrypto/asn1/x_x509a.c b/src/lib/libcrypto/asn1/x_x509a.c index 29817915b6..b0d7150b93 100644 --- a/src/lib/libcrypto/asn1/x_x509a.c +++ b/src/lib/libcrypto/asn1/x_x509a.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_x509a.c,v 1.14 2015/02/14 15:28:39 miod Exp $ */ +/* $OpenBSD: x_x509a.c,v 1.15 2018/05/01 19:01:27 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -154,7 +154,7 @@ aux_get(X509 *x) } int -X509_alias_set1(X509 *x, unsigned char *name, int len) +X509_alias_set1(X509 *x, const unsigned char *name, int len) { X509_CERT_AUX *aux; if (!name) { @@ -172,7 +172,7 @@ X509_alias_set1(X509 *x, unsigned char *name, int len) } int -X509_keyid_set1(X509 *x, unsigned char *id, int len) +X509_keyid_set1(X509 *x, const unsigned char *id, int len) { X509_CERT_AUX *aux; if (!id) { @@ -210,7 +210,7 @@ X509_keyid_get0(X509 *x, int *len) } int -X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj) +X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj) { X509_CERT_AUX *aux; ASN1_OBJECT *objtmp; @@ -232,7 +232,7 @@ err: } int -X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj) +X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj) { X509_CERT_AUX *aux; ASN1_OBJECT *objtmp; -- cgit v1.2.3-55-g6feb