summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorkenjiro <>2026-07-31 00:50:52 +0000
committerkenjiro <>2026-07-31 00:50:52 +0000
commite1b703522865e8996212ffc767bc616d3a7bc7b0 (patch)
tree04d3ad9ad4f09bcdb811daf80f2774e6d828e985 /src/lib
parent3d5c26fca686ebb3960c3fa26ceab85b5a95c559 (diff)
downloadopenbsd-e1b703522865e8996212ffc767bc616d3a7bc7b0.tar.gz
openbsd-e1b703522865e8996212ffc767bc616d3a7bc7b0.tar.bz2
openbsd-e1b703522865e8996212ffc767bc616d3a7bc7b0.zip
Add missing internal header includes
Include the relevant internal headers in implementation files that define internal functions. Also make asn1_local.h and pkcs12_local.h self-contained by including their corresponding public headers. ok tb beck
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/aes/aes.c3
-rw-r--r--src/lib/libcrypto/asn1/a_int.c3
-rw-r--r--src/lib/libcrypto/asn1/a_time_posix.c3
-rw-r--r--src/lib/libcrypto/asn1/a_time_tm.c3
-rw-r--r--src/lib/libcrypto/asn1/asn1_lib.c3
-rw-r--r--src/lib/libcrypto/asn1/asn1_local.h4
-rw-r--r--src/lib/libcrypto/asn1/asn1_types.c4
-rw-r--r--src/lib/libcrypto/asn1/bio_asn1.c3
-rw-r--r--src/lib/libcrypto/asn1/tasn_typ.c4
-rw-r--r--src/lib/libcrypto/asn1/tasn_utl.c3
-rw-r--r--src/lib/libcrypto/bn/bn_const.c4
-rw-r--r--src/lib/libcrypto/conf/conf_mod.c3
-rw-r--r--src/lib/libcrypto/ct/ct_x509v3.c3
-rw-r--r--src/lib/libcrypto/ec/ec_ameth.c3
-rw-r--r--src/lib/libcrypto/err/err.c5
-rw-r--r--src/lib/libcrypto/pkcs12/p12_decr.c3
-rw-r--r--src/lib/libcrypto/pkcs12/pkcs12_local.h4
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_doit.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_x931.c3
-rw-r--r--src/lib/libcrypto/x509/x509_ia5.c3
-rw-r--r--src/lib/libcrypto/x509/x509_info.c3
-rw-r--r--src/lib/libcrypto/x509/x509_int.c4
-rw-r--r--src/lib/libcrypto/x509/x509_ocsp.c3
-rw-r--r--src/lib/libcrypto/x509/x509_pku.c4
-rw-r--r--src/lib/libcrypto/x509/x509_utl.c3
25 files changed, 60 insertions, 25 deletions
diff --git a/src/lib/libcrypto/aes/aes.c b/src/lib/libcrypto/aes/aes.c
index 9cffe6b7cd..027cb84064 100644
--- a/src/lib/libcrypto/aes/aes.c
+++ b/src/lib/libcrypto/aes/aes.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: aes.c,v 1.17 2025/09/15 07:36:12 tb Exp $ */ 1/* $OpenBSD: aes.c,v 1.18 2026/07/31 00:50:52 kenjiro Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2002-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2002-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -55,6 +55,7 @@
55#include <openssl/crypto.h> 55#include <openssl/crypto.h>
56#include <openssl/modes.h> 56#include <openssl/modes.h>
57 57
58#include "aes_local.h"
58#include "crypto_arch.h" 59#include "crypto_arch.h"
59#include "crypto_internal.h" 60#include "crypto_internal.h"
60#include "modes_local.h" 61#include "modes_local.h"
diff --git a/src/lib/libcrypto/asn1/a_int.c b/src/lib/libcrypto/asn1/a_int.c
index f171e330f6..5d05c2022c 100644
--- a/src/lib/libcrypto/asn1/a_int.c
+++ b/src/lib/libcrypto/asn1/a_int.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_int.c,v 1.49 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: a_int.c,v 1.50 2026/07/31 00:50:52 kenjiro 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 *
@@ -65,6 +65,7 @@
65#include <openssl/bn.h> 65#include <openssl/bn.h>
66#include <openssl/buffer.h> 66#include <openssl/buffer.h>
67 67
68#include "asn1_local.h"
68#include "bytestring.h" 69#include "bytestring.h"
69#include "err_local.h" 70#include "err_local.h"
70 71
diff --git a/src/lib/libcrypto/asn1/a_time_posix.c b/src/lib/libcrypto/asn1/a_time_posix.c
index d4439b4701..da21ae7cbc 100644
--- a/src/lib/libcrypto/asn1/a_time_posix.c
+++ b/src/lib/libcrypto/asn1/a_time_posix.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_time_posix.c,v 1.5 2024/02/18 16:28:38 tb Exp $ */ 1/* $OpenBSD: a_time_posix.c,v 1.6 2026/07/31 00:50:52 kenjiro Exp $ */
2/* 2/*
3 * Copyright (c) 2022, Google Inc. 3 * Copyright (c) 2022, Google Inc.
4 * Copyright (c) 2022, Bob Beck <beck@obtuse.com> 4 * Copyright (c) 2022, Bob Beck <beck@obtuse.com>
@@ -30,6 +30,7 @@
30#include <openssl/asn1.h> 30#include <openssl/asn1.h>
31#include <openssl/posix_time.h> 31#include <openssl/posix_time.h>
32 32
33#include "asn1_local.h"
33#include "crypto_internal.h" 34#include "crypto_internal.h"
34 35
35#define SECS_PER_HOUR (int64_t)(60 * 60) 36#define SECS_PER_HOUR (int64_t)(60 * 60)
diff --git a/src/lib/libcrypto/asn1/a_time_tm.c b/src/lib/libcrypto/asn1/a_time_tm.c
index dd2893167f..b5210641a6 100644
--- a/src/lib/libcrypto/asn1/a_time_tm.c
+++ b/src/lib/libcrypto/asn1/a_time_tm.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_time_tm.c,v 1.43 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: a_time_tm.c,v 1.44 2026/07/31 00:50:52 kenjiro Exp $ */
2/* 2/*
3 * Copyright (c) 2015 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2015 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -26,6 +26,7 @@
26#include "asn1_local.h" 26#include "asn1_local.h"
27#include "bytestring.h" 27#include "bytestring.h"
28#include "err_local.h" 28#include "err_local.h"
29#include "x509_internal.h"
29 30
30#define RFC5280 0 31#define RFC5280 0
31#define GENTIME_LENGTH 15 32#define GENTIME_LENGTH 15
diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c
index ac8da0e61d..6d65dc9d68 100644
--- a/src/lib/libcrypto/asn1/asn1_lib.c
+++ b/src/lib/libcrypto/asn1/asn1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_lib.c,v 1.54 2022/05/05 19:18:56 jsing Exp $ */ 1/* $OpenBSD: asn1_lib.c,v 1.55 2026/07/31 00:50:52 kenjiro Exp $ */
2/* 2/*
3 * Copyright (c) 2021 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2021 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -18,6 +18,7 @@
18#include <limits.h> 18#include <limits.h>
19#include <stdlib.h> 19#include <stdlib.h>
20 20
21#include "asn1_local.h"
21#include "bytestring.h" 22#include "bytestring.h"
22 23
23int 24int
diff --git a/src/lib/libcrypto/asn1/asn1_local.h b/src/lib/libcrypto/asn1/asn1_local.h
index d61cfaa7b9..723c6574df 100644
--- a/src/lib/libcrypto/asn1/asn1_local.h
+++ b/src/lib/libcrypto/asn1/asn1_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_local.h,v 1.11 2025/11/26 10:19:57 tb Exp $ */ 1/* $OpenBSD: asn1_local.h,v 1.12 2026/07/31 00:50:52 kenjiro 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 2006. 3 * project 2006.
4 */ 4 */
@@ -59,6 +59,8 @@
59#ifndef HEADER_ASN1_LOCAL_H 59#ifndef HEADER_ASN1_LOCAL_H
60#define HEADER_ASN1_LOCAL_H 60#define HEADER_ASN1_LOCAL_H
61 61
62#include <openssl/asn1.h>
63
62#include "bytestring.h" 64#include "bytestring.h"
63 65
64__BEGIN_HIDDEN_DECLS 66__BEGIN_HIDDEN_DECLS
diff --git a/src/lib/libcrypto/asn1/asn1_types.c b/src/lib/libcrypto/asn1/asn1_types.c
index 5f9644a718..712c2297fb 100644
--- a/src/lib/libcrypto/asn1/asn1_types.c
+++ b/src/lib/libcrypto/asn1/asn1_types.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_types.c,v 1.3 2023/07/05 21:23:36 beck Exp $ */ 1/* $OpenBSD: asn1_types.c,v 1.4 2026/07/31 00:50:52 kenjiro Exp $ */
2/* 2/*
3 * Copyright (c) 2021 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2021 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -19,6 +19,8 @@
19 19
20#include <openssl/asn1.h> 20#include <openssl/asn1.h>
21 21
22#include "asn1_local.h"
23
22#define ASN1_ENCODING_CONSTRUCTED_ONLY 1 24#define ASN1_ENCODING_CONSTRUCTED_ONLY 1
23#define ASN1_ENCODING_PRIMITIVE_ONLY 2 25#define ASN1_ENCODING_PRIMITIVE_ONLY 2
24 26
diff --git a/src/lib/libcrypto/asn1/bio_asn1.c b/src/lib/libcrypto/asn1/bio_asn1.c
index b9f54cd4ef..acd0f4f146 100644
--- a/src/lib/libcrypto/asn1/bio_asn1.c
+++ b/src/lib/libcrypto/asn1/bio_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_asn1.c,v 1.23 2023/07/28 09:58:30 tb Exp $ */ 1/* $OpenBSD: bio_asn1.c,v 1.24 2026/07/31 00:50:52 kenjiro 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. 3 * project.
4 */ 4 */
@@ -67,6 +67,7 @@
67#include <openssl/bio.h> 67#include <openssl/bio.h>
68#include <openssl/asn1.h> 68#include <openssl/asn1.h>
69 69
70#include "asn1_local.h"
70#include "bio_local.h" 71#include "bio_local.h"
71 72
72#define BIO_C_SET_PREFIX 149 73#define BIO_C_SET_PREFIX 149
diff --git a/src/lib/libcrypto/asn1/tasn_typ.c b/src/lib/libcrypto/asn1/tasn_typ.c
index 64faad7240..a30a06918d 100644
--- a/src/lib/libcrypto/asn1/tasn_typ.c
+++ b/src/lib/libcrypto/asn1/tasn_typ.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_typ.c,v 1.21 2025/08/22 14:07:34 tb Exp $ */ 1/* $OpenBSD: tasn_typ.c,v 1.22 2026/07/31 00:50:52 kenjiro 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 */
@@ -59,6 +59,8 @@
59#include <openssl/asn1.h> 59#include <openssl/asn1.h>
60#include <openssl/asn1t.h> 60#include <openssl/asn1t.h>
61 61
62#include "asn1_local.h"
63
62/* Declarations for string types */ 64/* Declarations for string types */
63 65
64const ASN1_ITEM ASN1_NULL_it = { 66const ASN1_ITEM ASN1_NULL_it = {
diff --git a/src/lib/libcrypto/asn1/tasn_utl.c b/src/lib/libcrypto/asn1/tasn_utl.c
index 178a364c89..69b2187357 100644
--- a/src/lib/libcrypto/asn1/tasn_utl.c
+++ b/src/lib/libcrypto/asn1/tasn_utl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_utl.c,v 1.19 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: tasn_utl.c,v 1.20 2026/07/31 00:50:52 kenjiro 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 */
@@ -64,6 +64,7 @@
64#include <openssl/asn1t.h> 64#include <openssl/asn1t.h>
65#include <openssl/objects.h> 65#include <openssl/objects.h>
66 66
67#include "asn1_local.h"
67#include "bytestring.h" 68#include "bytestring.h"
68#include "err_local.h" 69#include "err_local.h"
69 70
diff --git a/src/lib/libcrypto/bn/bn_const.c b/src/lib/libcrypto/bn/bn_const.c
index 389e95ca15..746e1f269a 100644
--- a/src/lib/libcrypto/bn/bn_const.c
+++ b/src/lib/libcrypto/bn/bn_const.c
@@ -1,8 +1,10 @@
1/* $OpenBSD: bn_const.c,v 1.9 2026/01/23 08:29:04 tb Exp $ */ 1/* $OpenBSD: bn_const.c,v 1.10 2026/07/31 00:50:52 kenjiro Exp $ */
2/* Insert boilerplate */ 2/* Insert boilerplate */
3 3
4#include <openssl/bn.h> 4#include <openssl/bn.h>
5 5
6#include "bn_local.h"
7
6/* 8/*
7 * "First Oakley Default Group" from RFC2409, section 6.1. 9 * "First Oakley Default Group" from RFC2409, section 6.1.
8 * 10 *
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c
index 6e697cc478..f90cf0f729 100644
--- a/src/lib/libcrypto/conf/conf_mod.c
+++ b/src/lib/libcrypto/conf/conf_mod.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_mod.c,v 1.41 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: conf_mod.c,v 1.42 2026/07/31 00:50:52 kenjiro Exp $ */
2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -65,6 +65,7 @@
65#include <openssl/crypto.h> 65#include <openssl/crypto.h>
66#include <openssl/x509.h> 66#include <openssl/x509.h>
67 67
68#include "conf_local.h"
68#include "err_local.h" 69#include "err_local.h"
69 70
70/* This structure contains data about supported modules. */ 71/* This structure contains data about supported modules. */
diff --git a/src/lib/libcrypto/ct/ct_x509v3.c b/src/lib/libcrypto/ct/ct_x509v3.c
index b14ffc9532..c4cf9b823d 100644
--- a/src/lib/libcrypto/ct/ct_x509v3.c
+++ b/src/lib/libcrypto/ct/ct_x509v3.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ct_x509v3.c,v 1.7 2024/07/13 15:08:58 tb Exp $ */ 1/* $OpenBSD: ct_x509v3.c,v 1.8 2026/07/31 00:50:52 kenjiro Exp $ */
2/* 2/*
3 * Written by Rob Stradling (rob@comodo.com) and Stephen Henson 3 * Written by Rob Stradling (rob@comodo.com) and Stephen Henson
4 * (steve@openssl.org) for the OpenSSL project 2014. 4 * (steve@openssl.org) for the OpenSSL project 2014.
@@ -64,6 +64,7 @@
64#include <string.h> 64#include <string.h>
65 65
66#include "ct_local.h" 66#include "ct_local.h"
67#include "x509_local.h"
67 68
68static char * 69static char *
69i2s_poison(const X509V3_EXT_METHOD *method, void *val) 70i2s_poison(const X509V3_EXT_METHOD *method, void *val)
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c
index ddc8adea1e..d1654d4041 100644
--- a/src/lib/libcrypto/ec/ec_ameth.c
+++ b/src/lib/libcrypto/ec/ec_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_ameth.c,v 1.74 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: ec_ameth.c,v 1.75 2026/07/31 00:50:52 kenjiro 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 2006. 3 * project 2006.
4 */ 4 */
@@ -73,6 +73,7 @@
73 73
74#include "asn1_local.h" 74#include "asn1_local.h"
75#include "bn_local.h" 75#include "bn_local.h"
76#include "ec_local.h"
76#include "err_local.h" 77#include "err_local.h"
77#include "evp_local.h" 78#include "evp_local.h"
78#include "x509_local.h" 79#include "x509_local.h"
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c
index a60769fc2a..5bfdf66aee 100644
--- a/src/lib/libcrypto/err/err.c
+++ b/src/lib/libcrypto/err/err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err.c,v 1.78 2025/06/10 08:53:37 tb Exp $ */ 1/* $OpenBSD: err.c,v 1.79 2026/07/31 00:50:52 kenjiro 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 *
@@ -122,6 +122,9 @@
122#include <openssl/err.h> 122#include <openssl/err.h>
123#include <openssl/lhash.h> 123#include <openssl/lhash.h>
124 124
125#include "constant_time.h"
126#include "err_local.h"
127
125DECLARE_LHASH_OF(ERR_STRING_DATA); 128DECLARE_LHASH_OF(ERR_STRING_DATA);
126DECLARE_LHASH_OF(ERR_STATE); 129DECLARE_LHASH_OF(ERR_STATE);
127 130
diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c
index 3090781eba..b4d8c4e7f8 100644
--- a/src/lib/libcrypto/pkcs12/p12_decr.c
+++ b/src/lib/libcrypto/pkcs12/p12_decr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_decr.c,v 1.28 2026/01/27 14:03:01 tb Exp $ */ 1/* $OpenBSD: p12_decr.c,v 1.29 2026/07/31 00:50:52 kenjiro 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 */
@@ -63,6 +63,7 @@
63 63
64#include "err_local.h" 64#include "err_local.h"
65#include "evp_local.h" 65#include "evp_local.h"
66#include "pkcs12_local.h"
66 67
67/* Encrypt/Decrypt a buffer based on password and algor, result in a 68/* Encrypt/Decrypt a buffer based on password and algor, result in a
68 * malloc'ed buffer 69 * malloc'ed buffer
diff --git a/src/lib/libcrypto/pkcs12/pkcs12_local.h b/src/lib/libcrypto/pkcs12/pkcs12_local.h
index 4a3ce4b3f0..b076784d89 100644
--- a/src/lib/libcrypto/pkcs12/pkcs12_local.h
+++ b/src/lib/libcrypto/pkcs12/pkcs12_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs12_local.h,v 1.6 2025/03/09 15:45:52 tb Exp $ */ 1/* $OpenBSD: pkcs12_local.h,v 1.7 2026/07/31 00:50:52 kenjiro 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 */
@@ -59,6 +59,8 @@
59#ifndef HEADER_PKCS12_LOCAL_H 59#ifndef HEADER_PKCS12_LOCAL_H
60#define HEADER_PKCS12_LOCAL_H 60#define HEADER_PKCS12_LOCAL_H
61 61
62#include <openssl/pkcs12.h>
63
62__BEGIN_HIDDEN_DECLS 64__BEGIN_HIDDEN_DECLS
63 65
64struct PKCS12_MAC_DATA_st { 66struct PKCS12_MAC_DATA_st {
diff --git a/src/lib/libcrypto/pkcs7/pk7_doit.c b/src/lib/libcrypto/pkcs7/pk7_doit.c
index c191329b56..0377c33cde 100644
--- a/src/lib/libcrypto/pkcs7/pk7_doit.c
+++ b/src/lib/libcrypto/pkcs7/pk7_doit.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pk7_doit.c,v 1.68 2026/04/26 04:19:11 tb Exp $ */ 1/* $OpenBSD: pk7_doit.c,v 1.69 2026/07/31 00:50:52 kenjiro 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 *
@@ -66,6 +66,8 @@
66 66
67#include "err_local.h" 67#include "err_local.h"
68#include "evp_local.h" 68#include "evp_local.h"
69/* XXX - for PKCS7_get_octet_string(), which belongs in pkcs7_local.h. */
70#include "pkcs12_local.h"
69#include "x509_local.h" 71#include "x509_local.h"
70 72
71static int 73static int
diff --git a/src/lib/libcrypto/rsa/rsa_x931.c b/src/lib/libcrypto/rsa/rsa_x931.c
index 8a0190d7fe..c4b4179f7b 100644
--- a/src/lib/libcrypto/rsa/rsa_x931.c
+++ b/src/lib/libcrypto/rsa/rsa_x931.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_x931.c,v 1.13 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: rsa_x931.c,v 1.14 2026/07/31 00:50:52 kenjiro 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 2005. 3 * project 2005.
4 */ 4 */
@@ -64,6 +64,7 @@
64#include <openssl/rsa.h> 64#include <openssl/rsa.h>
65 65
66#include "err_local.h" 66#include "err_local.h"
67#include "rsa_local.h"
67 68
68int 69int
69RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *from, 70RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *from,
diff --git a/src/lib/libcrypto/x509/x509_ia5.c b/src/lib/libcrypto/x509/x509_ia5.c
index b8886c6cb8..712ce5c702 100644
--- a/src/lib/libcrypto/x509/x509_ia5.c
+++ b/src/lib/libcrypto/x509/x509_ia5.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_ia5.c,v 1.3 2025/05/10 05:54:39 tb Exp $ */ 1/* $OpenBSD: x509_ia5.c,v 1.4 2026/07/31 00:50:52 kenjiro 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 */
@@ -64,6 +64,7 @@
64#include <openssl/x509v3.h> 64#include <openssl/x509v3.h>
65 65
66#include "err_local.h" 66#include "err_local.h"
67#include "x509_local.h"
67 68
68static char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5); 69static char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5);
69static ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method, 70static ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method,
diff --git a/src/lib/libcrypto/x509/x509_info.c b/src/lib/libcrypto/x509/x509_info.c
index c91642a02e..4b2ee10d28 100644
--- a/src/lib/libcrypto/x509/x509_info.c
+++ b/src/lib/libcrypto/x509/x509_info.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_info.c,v 1.6 2025/05/10 05:54:39 tb Exp $ */ 1/* $OpenBSD: x509_info.c,v 1.7 2026/07/31 00:50:52 kenjiro 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 */
@@ -65,6 +65,7 @@
65#include <openssl/x509v3.h> 65#include <openssl/x509v3.h>
66 66
67#include "err_local.h" 67#include "err_local.h"
68#include "x509_local.h"
68 69
69static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS( 70static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(
70 X509V3_EXT_METHOD *method, AUTHORITY_INFO_ACCESS *ainfo, 71 X509V3_EXT_METHOD *method, AUTHORITY_INFO_ACCESS *ainfo,
diff --git a/src/lib/libcrypto/x509/x509_int.c b/src/lib/libcrypto/x509/x509_int.c
index 2236bfe4c4..76979f79b0 100644
--- a/src/lib/libcrypto/x509/x509_int.c
+++ b/src/lib/libcrypto/x509/x509_int.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_int.c,v 1.2 2024/07/13 15:08:58 tb Exp $ */ 1/* $OpenBSD: x509_int.c,v 1.3 2026/07/31 00:50:52 kenjiro 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 */
@@ -60,6 +60,8 @@
60 60
61#include <openssl/x509v3.h> 61#include <openssl/x509v3.h>
62 62
63#include "x509_local.h"
64
63static const X509V3_EXT_METHOD x509v3_ext_crl_number = { 65static const X509V3_EXT_METHOD x509v3_ext_crl_number = {
64 .ext_nid = NID_crl_number, 66 .ext_nid = NID_crl_number,
65 .ext_flags = 0, 67 .ext_flags = 0,
diff --git a/src/lib/libcrypto/x509/x509_ocsp.c b/src/lib/libcrypto/x509/x509_ocsp.c
index d0a0d49890..54a04ea8fa 100644
--- a/src/lib/libcrypto/x509/x509_ocsp.c
+++ b/src/lib/libcrypto/x509/x509_ocsp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_ocsp.c,v 1.5 2025/05/10 05:54:39 tb Exp $ */ 1/* $OpenBSD: x509_ocsp.c,v 1.6 2026/07/31 00:50:52 kenjiro 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 */
@@ -70,6 +70,7 @@
70 70
71#include "err_local.h" 71#include "err_local.h"
72#include "ocsp_local.h" 72#include "ocsp_local.h"
73#include "x509_local.h"
73 74
74/* OCSP extensions and a couple of CRL entry extensions 75/* OCSP extensions and a couple of CRL entry extensions
75 */ 76 */
diff --git a/src/lib/libcrypto/x509/x509_pku.c b/src/lib/libcrypto/x509/x509_pku.c
index 6753f0f733..75cf5e6763 100644
--- a/src/lib/libcrypto/x509/x509_pku.c
+++ b/src/lib/libcrypto/x509/x509_pku.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_pku.c,v 1.5 2024/07/13 15:08:58 tb Exp $ */ 1/* $OpenBSD: x509_pku.c,v 1.6 2026/07/31 00:50:52 kenjiro 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 */
@@ -62,6 +62,8 @@
62#include <openssl/asn1t.h> 62#include <openssl/asn1t.h>
63#include <openssl/x509v3.h> 63#include <openssl/x509v3.h>
64 64
65#include "x509_local.h"
66
65static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, 67static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
66 PKEY_USAGE_PERIOD *usage, BIO *out, int indent); 68 PKEY_USAGE_PERIOD *usage, BIO *out, int indent);
67 69
diff --git a/src/lib/libcrypto/x509/x509_utl.c b/src/lib/libcrypto/x509/x509_utl.c
index 2e60834edf..20c58dd8c5 100644
--- a/src/lib/libcrypto/x509/x509_utl.c
+++ b/src/lib/libcrypto/x509/x509_utl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_utl.c,v 1.28 2026/01/12 22:08:34 tb Exp $ */ 1/* $OpenBSD: x509_utl.c,v 1.29 2026/07/31 00:50:52 kenjiro 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. 3 * project.
4 */ 4 */
@@ -69,6 +69,7 @@
69#include "bytestring.h" 69#include "bytestring.h"
70#include "conf_local.h" 70#include "conf_local.h"
71#include "err_local.h" 71#include "err_local.h"
72#include "x509_local.h"
72 73
73/* 74/*
74 * Match reference identifiers starting with "." to any sub-domain. This 75 * Match reference identifiers starting with "." to any sub-domain. This