From: tb Date: Sat, 31 Aug 2024 10:14:17 +0000 (+0000) Subject: Make X509_VAL opaque X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=030e5ab143550594758a972380fdff0265609950;p=openbsd Make X509_VAL opaque Nothing needs to reach into this structure, which is part of certificates. So hide its innards. ok beck jsing --- diff --git a/lib/libcrypto/asn1/x_val.c b/lib/libcrypto/asn1/x_val.c index 486304e42b0..08501f17e0d 100644 --- a/lib/libcrypto/asn1/x_val.c +++ b/lib/libcrypto/asn1/x_val.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_val.c,v 1.15 2024/07/08 14:48:49 beck Exp $ */ +/* $OpenBSD: x_val.c,v 1.16 2024/08/31 10:14:17 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,6 +61,8 @@ #include #include +#include "x509_local.h" + static const ASN1_TEMPLATE X509_VAL_seq_tt[] = { { .offset = offsetof(X509_VAL, notBefore), diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index 3ab35d3d919..6fcd59a8521 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.114 2024/08/31 10:12:23 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.115 2024/08/31 10:14:17 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -122,10 +122,7 @@ struct X509_algor_st { typedef STACK_OF(X509_ALGOR) X509_ALGORS; -typedef struct X509_val_st { - ASN1_TIME *notBefore; - ASN1_TIME *notAfter; -} X509_VAL; +typedef struct X509_val_st X509_VAL; typedef struct X509_sig_st X509_SIG; diff --git a/lib/libcrypto/x509/x509_local.h b/lib/libcrypto/x509/x509_local.h index 0f0d5c1de5f..a7d7940d438 100644 --- a/lib/libcrypto/x509/x509_local.h +++ b/lib/libcrypto/x509/x509_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_local.h,v 1.29 2024/08/31 10:12:23 tb Exp $ */ +/* $OpenBSD: x509_local.h,v 1.30 2024/08/31 10:14:17 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2013. */ @@ -80,6 +80,11 @@ __BEGIN_HIDDEN_DECLS int X509_check_trust(X509 *x, int id, int flags); +struct X509_val_st { + ASN1_TIME *notBefore; + ASN1_TIME *notAfter; +} /* X509_VAL */; + struct X509_pubkey_st { X509_ALGOR *algor; ASN1_BIT_STRING *public_key;