From e291757a662a927b1dc5d071129acaeb430d31e9 Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 18 Nov 2021 16:00:15 +0000 Subject: [PATCH] Prevent future internal use of ASN1_CTX and ASN1_const_CTX by wrapping them inside #ifndef LIBRESSL_INTERNAL. suggested by jsing --- lib/libcrypto/asn1/asn1.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libcrypto/asn1/asn1.h b/lib/libcrypto/asn1/asn1.h index 815256a30d5..445d2efca70 100644 --- a/lib/libcrypto/asn1/asn1.h +++ b/lib/libcrypto/asn1/asn1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1.h,v 1.56 2021/11/01 08:14:36 tb Exp $ */ +/* $OpenBSD: asn1.h,v 1.57 2021/11/18 16:00:15 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -162,6 +162,7 @@ DECLARE_STACK_OF(X509_ALGOR) #define DECLARE_ASN1_SET_OF(type) /* filled in by mkstack.pl */ #define IMPLEMENT_ASN1_SET_OF(type) /* nothing, no longer needed */ +#ifndef LIBRESSL_INTERNAL /* We MUST make sure that, except for constness, asn1_ctx_st and asn1_const_ctx are exactly the same. Fortunately, as soon as the old ASN1 parsing macros are gone, we can throw this away @@ -193,6 +194,7 @@ typedef struct asn1_const_ctx_st { const unsigned char **pp;/* variable */ int line; /* used in error processing */ } ASN1_const_CTX; +#endif /* These are used internally in the ASN1_OBJECT to keep track of * whether the names and data need to be free()ed */ -- 2.20.1