-/* $OpenBSD: a_strnid.c,v 1.29 2023/12/16 12:56:20 tb Exp $ */
+/* $OpenBSD: a_strnid.c,v 1.30 2024/03/02 08:50:47 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in, int inlen,
int inform, int nid)
{
- ASN1_STRING_TABLE *tbl;
+ const ASN1_STRING_TABLE *tbl;
ASN1_STRING *str = NULL;
unsigned long mask;
int ret;
#define N_STRING_TABLE_ENTRIES (sizeof(tbl_standard) / sizeof(tbl_standard[0]))
-/* XXX - const */
-ASN1_STRING_TABLE *
+const ASN1_STRING_TABLE *
ASN1_STRING_TABLE_get(int nid)
{
size_t i;
for (i = 0; i < N_STRING_TABLE_ENTRIES; i++) {
const ASN1_STRING_TABLE *entry = &tbl_standard[i];
if (entry->nid == nid)
- return (ASN1_STRING_TABLE *)entry;
+ return entry;
}
return NULL;
-/* $OpenBSD: asn1.h,v 1.83 2024/02/18 16:28:38 tb Exp $ */
+/* $OpenBSD: asn1.h,v 1.84 2024/03/02 08:50:47 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
const unsigned char *in, int inlen, int inform, int nid);
-ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
+const ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
void ASN1_STRING_TABLE_cleanup(void);