From 8038c0f82c48b5e93d4c22d4bba6bfdd2c514b5b Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 18 May 2018 17:53:09 +0000 Subject: Add const qualifiers to the 'obj' and 'bytes' arguments of X509_NAME_ENTRY_create_by_NID(3), X509_NAME_ENTRY_create_by_OBJ(3), and X509_NAME_ENTRY_set_object(3). tested in a bulk build by sthen ok jsing --- src/lib/libcrypto/x509/x509.h | 10 +++++----- src/lib/libcrypto/x509/x509name.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index 1ddf276a93..44585c943f 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.51 2018/05/18 16:55:58 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.52 2018/05/18 17:53:09 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1112,14 +1112,14 @@ int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, const char *field, int type, const unsigned char *bytes, int len); X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, - int type,unsigned char *bytes, int len); + int type, const unsigned char *bytes, int len); int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, const unsigned char *bytes, int len, int loc, int set); X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, - ASN1_OBJECT *obj, int type,const unsigned char *bytes, - int len); + const ASN1_OBJECT *obj, int type, + const unsigned char *bytes, int len); int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, - ASN1_OBJECT *obj); + const ASN1_OBJECT *obj); int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, const unsigned char *bytes, int len); ASN1_OBJECT * X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne); diff --git a/src/lib/libcrypto/x509/x509name.c b/src/lib/libcrypto/x509/x509name.c index 3912ca039e..678b073a39 100644 --- a/src/lib/libcrypto/x509/x509name.c +++ b/src/lib/libcrypto/x509/x509name.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509name.c,v 1.17 2018/05/01 19:01:28 tb Exp $ */ +/* $OpenBSD: x509name.c,v 1.18 2018/05/18 17:53:09 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -308,7 +308,7 @@ X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, X509_NAME_ENTRY * X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type, - unsigned char *bytes, int len) + const unsigned char *bytes, int len) { ASN1_OBJECT *obj; X509_NAME_ENTRY *nentry; @@ -324,8 +324,8 @@ X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type, } X509_NAME_ENTRY * -X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, ASN1_OBJECT *obj, int type, - const unsigned char *bytes, int len) +X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, const ASN1_OBJECT *obj, + int type, const unsigned char *bytes, int len) { X509_NAME_ENTRY *ret; @@ -351,7 +351,7 @@ err: } int -X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj) +X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj) { if ((ne == NULL) || (obj == NULL)) { X509error(ERR_R_PASSED_NULL_PARAMETER); -- cgit v1.2.3-55-g6feb