summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1
diff options
context:
space:
mode:
authortb <>2018-05-01 19:01:28 +0000
committertb <>2018-05-01 19:01:28 +0000
commita25a0cc2cb4d355062b3c8b6944d4e2da213facd (patch)
treee9d6db4dc429199f91cfda5cd0905819d2440282 /src/lib/libcrypto/asn1
parent9b39dce8f6a1410a06e212d7ed7364d9dc7e3f13 (diff)
downloadopenbsd-a25a0cc2cb4d355062b3c8b6944d4e2da213facd.tar.gz
openbsd-a25a0cc2cb4d355062b3c8b6944d4e2da213facd.tar.bz2
openbsd-a25a0cc2cb4d355062b3c8b6944d4e2da213facd.zip
Convert a handful of X509_*() functions to take const as in OpenSSL.
tested in a bulk by sthen ok jsing
Diffstat (limited to 'src/lib/libcrypto/asn1')
-rw-r--r--src/lib/libcrypto/asn1/t_x509.c4
-rw-r--r--src/lib/libcrypto/asn1/x_algor.c6
-rw-r--r--src/lib/libcrypto/asn1/x_x509a.c10
3 files changed, 10 insertions, 10 deletions
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 @@
1/* $OpenBSD: t_x509.c,v 1.29 2018/04/25 19:58:53 tb Exp $ */ 1/* $OpenBSD: t_x509.c,v 1.30 2018/05/01 19:01:27 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -321,7 +321,7 @@ X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent)
321} 321}
322 322
323int 323int
324X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig) 324X509_signature_print(BIO *bp, const X509_ALGOR *sigalg, const ASN1_STRING *sig)
325{ 325{
326 int sig_nid; 326 int sig_nid;
327 if (BIO_puts(bp, " Signature Algorithm: ") <= 0) 327 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 @@
1/* $OpenBSD: x_algor.c,v 1.21 2015/07/24 15:09:52 jsing Exp $ */ 1/* $OpenBSD: x_algor.c,v 1.22 2018/05/01 19:01:27 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -176,8 +176,8 @@ X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval)
176} 176}
177 177
178void 178void
179X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval, 179X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype, const void **ppval,
180 X509_ALGOR *algor) 180 const X509_ALGOR *algor)
181{ 181{
182 if (paobj) 182 if (paobj)
183 *paobj = algor->algorithm; 183 *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 @@
1/* $OpenBSD: x_x509a.c,v 1.14 2015/02/14 15:28:39 miod Exp $ */ 1/* $OpenBSD: x_x509a.c,v 1.15 2018/05/01 19:01:27 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -154,7 +154,7 @@ aux_get(X509 *x)
154} 154}
155 155
156int 156int
157X509_alias_set1(X509 *x, unsigned char *name, int len) 157X509_alias_set1(X509 *x, const unsigned char *name, int len)
158{ 158{
159 X509_CERT_AUX *aux; 159 X509_CERT_AUX *aux;
160 if (!name) { 160 if (!name) {
@@ -172,7 +172,7 @@ X509_alias_set1(X509 *x, unsigned char *name, int len)
172} 172}
173 173
174int 174int
175X509_keyid_set1(X509 *x, unsigned char *id, int len) 175X509_keyid_set1(X509 *x, const unsigned char *id, int len)
176{ 176{
177 X509_CERT_AUX *aux; 177 X509_CERT_AUX *aux;
178 if (!id) { 178 if (!id) {
@@ -210,7 +210,7 @@ X509_keyid_get0(X509 *x, int *len)
210} 210}
211 211
212int 212int
213X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj) 213X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj)
214{ 214{
215 X509_CERT_AUX *aux; 215 X509_CERT_AUX *aux;
216 ASN1_OBJECT *objtmp; 216 ASN1_OBJECT *objtmp;
@@ -232,7 +232,7 @@ err:
232} 232}
233 233
234int 234int
235X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj) 235X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj)
236{ 236{
237 X509_CERT_AUX *aux; 237 X509_CERT_AUX *aux;
238 ASN1_OBJECT *objtmp; 238 ASN1_OBJECT *objtmp;