diff options
| author | kenjiro <> | 2026-07-31 03:59:50 +0000 |
|---|---|---|
| committer | kenjiro <> | 2026-07-31 03:59:50 +0000 |
| commit | 49ff7c051c516a8d190b62787dc46f76275da66a (patch) | |
| tree | a9311563e340cb83c56d4c2031c66386d2d03418 /src | |
| parent | 45c467b8b6c3ae8944860a1e15922142d083e4d5 (diff) | |
| download | openbsd-49ff7c051c516a8d190b62787dc46f76275da66a.tar.gz openbsd-49ff7c051c516a8d190b62787dc46f76275da66a.tar.bz2 openbsd-49ff7c051c516a8d190b62787dc46f76275da66a.zip | |
Make file-local functions static
These functions are only used within their implementation files and do
not need external linkage. Mark them static.
ok tb
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/aes/aes.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/pem/pem_info.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_constraints.c | 12 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_policy.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_verify.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/s3_lib.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/ssl_tlsext.c | 4 | ||||
| -rw-r--r-- | src/lib/libssl/tls13_record_layer.c | 8 | ||||
| -rw-r--r-- | src/lib/libssl/tls13_server.c | 4 |
9 files changed, 27 insertions, 27 deletions
diff --git a/src/lib/libcrypto/aes/aes.c b/src/lib/libcrypto/aes/aes.c index 027cb84064..db693d2dd8 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.18 2026/07/31 00:50:52 kenjiro Exp $ */ | 1 | /* $OpenBSD: aes.c,v 1.19 2026/07/31 03:59:50 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 | * |
| @@ -136,7 +136,7 @@ aes_encrypt_block128(const unsigned char *in, unsigned char *out, const void *ke | |||
| 136 | aes_encrypt_internal(in, out, key); | 136 | aes_encrypt_internal(in, out, key); |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | void | 139 | static void |
| 140 | aes_decrypt_block128(const unsigned char *in, unsigned char *out, const void *key) | 140 | aes_decrypt_block128(const unsigned char *in, unsigned char *out, const void *key) |
| 141 | { | 141 | { |
| 142 | aes_decrypt_internal(in, out, key); | 142 | aes_decrypt_internal(in, out, key); |
diff --git a/src/lib/libcrypto/pem/pem_info.c b/src/lib/libcrypto/pem/pem_info.c index 26061f6f08..24f0ddb011 100644 --- a/src/lib/libcrypto/pem/pem_info.c +++ b/src/lib/libcrypto/pem/pem_info.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: pem_info.c,v 1.33 2025/07/16 15:59:26 tb Exp $ */ | 1 | /* $OpenBSD: pem_info.c,v 1.34 2026/07/31 03:59:50 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 | * |
| @@ -77,7 +77,7 @@ | |||
| 77 | #include "err_local.h" | 77 | #include "err_local.h" |
| 78 | #include "evp_local.h" | 78 | #include "evp_local.h" |
| 79 | 79 | ||
| 80 | X509_PKEY * | 80 | static X509_PKEY * |
| 81 | X509_PKEY_new(void) | 81 | X509_PKEY_new(void) |
| 82 | { | 82 | { |
| 83 | X509_PKEY *x_pkey; | 83 | X509_PKEY *x_pkey; |
| @@ -90,7 +90,7 @@ X509_PKEY_new(void) | |||
| 90 | return x_pkey; | 90 | return x_pkey; |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | void | 93 | static void |
| 94 | X509_PKEY_free(X509_PKEY *x_pkey) | 94 | X509_PKEY_free(X509_PKEY *x_pkey) |
| 95 | { | 95 | { |
| 96 | if (x_pkey == NULL) | 96 | if (x_pkey == NULL) |
diff --git a/src/lib/libcrypto/x509/x509_constraints.c b/src/lib/libcrypto/x509/x509_constraints.c index 61a08cacef..be93f3fd6c 100644 --- a/src/lib/libcrypto/x509/x509_constraints.c +++ b/src/lib/libcrypto/x509/x509_constraints.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_constraints.c,v 1.34 2026/07/14 15:52:52 jsing Exp $ */ | 1 | /* $OpenBSD: x509_constraints.c,v 1.35 2026/07/31 03:59:50 kenjiro Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -76,7 +76,7 @@ host_is_ip_address(CBS *cbs, int *is_ip) | |||
| 76 | return 1; | 76 | return 1; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | struct x509_constraints_name * | 79 | static struct x509_constraints_name * |
| 80 | x509_constraints_name_new(void) | 80 | x509_constraints_name_new(void) |
| 81 | { | 81 | { |
| 82 | return (calloc(1, sizeof(struct x509_constraints_name))); | 82 | return (calloc(1, sizeof(struct x509_constraints_name))); |
| @@ -100,7 +100,7 @@ x509_constraints_name_free(struct x509_constraints_name *name) | |||
| 100 | free(name); | 100 | free(name); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | struct x509_constraints_name * | 103 | static struct x509_constraints_name * |
| 104 | x509_constraints_name_dup(struct x509_constraints_name *name) | 104 | x509_constraints_name_dup(struct x509_constraints_name *name) |
| 105 | { | 105 | { |
| 106 | struct x509_constraints_name *new; | 106 | struct x509_constraints_name *new; |
| @@ -724,7 +724,7 @@ x509_constraints_uri(uint8_t *uri, size_t ulen, uint8_t *constraint, | |||
| 724 | * respectively for ipv4 addresses and constraints, and a length of | 724 | * respectively for ipv4 addresses and constraints, and a length of |
| 725 | * 16 and 32 respectively for ipv6 address constraints by the caller. | 725 | * 16 and 32 respectively for ipv6 address constraints by the caller. |
| 726 | */ | 726 | */ |
| 727 | int | 727 | static int |
| 728 | x509_constraints_ipaddr(uint8_t *address, size_t alen, uint8_t *constraint, | 728 | x509_constraints_ipaddr(uint8_t *address, size_t alen, uint8_t *constraint, |
| 729 | size_t len) | 729 | size_t len) |
| 730 | { | 730 | { |
| @@ -746,7 +746,7 @@ x509_constraints_ipaddr(uint8_t *address, size_t alen, uint8_t *constraint, | |||
| 746 | * Verify a canonicalized der encoded constraint dirname | 746 | * Verify a canonicalized der encoded constraint dirname |
| 747 | * a canonicalized der encoded constraint. | 747 | * a canonicalized der encoded constraint. |
| 748 | */ | 748 | */ |
| 749 | int | 749 | static int |
| 750 | x509_constraints_dirname(uint8_t *dirname, size_t dlen, | 750 | x509_constraints_dirname(uint8_t *dirname, size_t dlen, |
| 751 | uint8_t *constraint, size_t len) | 751 | uint8_t *constraint, size_t len) |
| 752 | { | 752 | { |
| @@ -1194,7 +1194,7 @@ x509_constraints_extract_constraints(X509 *cert, | |||
| 1194 | * Match a validated name in "name" against a validated constraint in | 1194 | * Match a validated name in "name" against a validated constraint in |
| 1195 | * "constraint" return 1 if then name matches, 0 otherwise. | 1195 | * "constraint" return 1 if then name matches, 0 otherwise. |
| 1196 | */ | 1196 | */ |
| 1197 | int | 1197 | static int |
| 1198 | x509_constraints_match(struct x509_constraints_name *name, | 1198 | x509_constraints_match(struct x509_constraints_name *name, |
| 1199 | struct x509_constraints_name *constraint) | 1199 | struct x509_constraints_name *constraint) |
| 1200 | { | 1200 | { |
diff --git a/src/lib/libcrypto/x509/x509_policy.c b/src/lib/libcrypto/x509/x509_policy.c index 2df965aad1..addd4b29ef 100644 --- a/src/lib/libcrypto/x509/x509_policy.c +++ b/src/lib/libcrypto/x509/x509_policy.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_policy.c,v 1.33 2025/08/10 06:36:45 beck Exp $ */ | 1 | /* $OpenBSD: x509_policy.c,v 1.34 2026/07/31 03:59:50 kenjiro Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2022, Google Inc. | 3 | * Copyright (c) 2022, Google Inc. |
| 4 | * | 4 | * |
| @@ -158,7 +158,7 @@ DECLARE_STACK_OF(X509_POLICY_LEVEL) | |||
| 158 | * this the OpenSSL way either, and we are not using this boringsslism | 158 | * this the OpenSSL way either, and we are not using this boringsslism |
| 159 | * anywhere else. Callers should ensure that the stack in data is sorted. | 159 | * anywhere else. Callers should ensure that the stack in data is sorted. |
| 160 | */ | 160 | */ |
| 161 | void | 161 | static void |
| 162 | sk_X509_POLICY_NODE_delete_if(STACK_OF(X509_POLICY_NODE) *nodes, | 162 | sk_X509_POLICY_NODE_delete_if(STACK_OF(X509_POLICY_NODE) *nodes, |
| 163 | int (*delete_if)(X509_POLICY_NODE *, void *), void *data) | 163 | int (*delete_if)(X509_POLICY_NODE *, void *), void *data) |
| 164 | { | 164 | { |
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c index af35cb0007..e0efa9ffc5 100644 --- a/src/lib/libcrypto/x509/x509_verify.c +++ b/src/lib/libcrypto/x509/x509_verify.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_verify.c,v 1.77 2026/06/10 04:26:58 tb Exp $ */ | 1 | /* $OpenBSD: x509_verify.c,v 1.78 2026/07/31 03:59:50 kenjiro Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -83,7 +83,7 @@ x509_verify_asn1_time_to_time_t(const ASN1_TIME *atime, int notAfter, | |||
| 83 | return asn1_time_tm_to_time_t(&tm, out); | 83 | return asn1_time_tm_to_time_t(&tm, out); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | struct x509_verify_chain * | 86 | static struct x509_verify_chain * |
| 87 | x509_verify_chain_new(void) | 87 | x509_verify_chain_new(void) |
| 88 | { | 88 | { |
| 89 | struct x509_verify_chain *chain; | 89 | struct x509_verify_chain *chain; |
| @@ -199,7 +199,7 @@ x509_verify_chain_last(struct x509_verify_chain *chain) | |||
| 199 | return sk_X509_value(chain->certs, last); | 199 | return sk_X509_value(chain->certs, last); |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | X509 * | 202 | static X509 * |
| 203 | x509_verify_chain_leaf(struct x509_verify_chain *chain) | 203 | x509_verify_chain_leaf(struct x509_verify_chain *chain) |
| 204 | { | 204 | { |
| 205 | if (chain->certs == NULL) | 205 | if (chain->certs == NULL) |
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index df45df47fc..929de03a3d 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s3_lib.c,v 1.260 2026/06/06 15:22:25 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.261 2026/07/31 03:59:50 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 | * |
| @@ -1379,7 +1379,7 @@ ssl3_clear(SSL *s) | |||
| 1379 | s->s3->hs.state = SSL_ST_BEFORE|((s->server) ? SSL_ST_ACCEPT : SSL_ST_CONNECT); | 1379 | s->s3->hs.state = SSL_ST_BEFORE|((s->server) ? SSL_ST_ACCEPT : SSL_ST_CONNECT); |
| 1380 | } | 1380 | } |
| 1381 | 1381 | ||
| 1382 | long | 1382 | static long |
| 1383 | _SSL_get_shared_group(SSL *s, long n) | 1383 | _SSL_get_shared_group(SSL *s, long n) |
| 1384 | { | 1384 | { |
| 1385 | size_t count; | 1385 | size_t count; |
| @@ -1412,7 +1412,7 @@ _SSL_get_shared_group(SSL *s, long n) | |||
| 1412 | return nid; | 1412 | return nid; |
| 1413 | } | 1413 | } |
| 1414 | 1414 | ||
| 1415 | long | 1415 | static long |
| 1416 | _SSL_get_peer_tmp_key(SSL *s, EVP_PKEY **key) | 1416 | _SSL_get_peer_tmp_key(SSL *s, EVP_PKEY **key) |
| 1417 | { | 1417 | { |
| 1418 | EVP_PKEY *pkey = NULL; | 1418 | EVP_PKEY *pkey = NULL; |
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c index 2755cbc92d..467784da2b 100644 --- a/src/lib/libssl/ssl_tlsext.c +++ b/src/lib/libssl/ssl_tlsext.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_tlsext.c,v 1.163 2026/06/14 15:47:49 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_tlsext.c,v 1.164 2026/07/31 03:59:50 kenjiro Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> | 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> |
| @@ -2567,7 +2567,7 @@ tlsext_build(SSL *s, int is_server, uint16_t msg_type, CBB *cbb) | |||
| 2567 | return 1; | 2567 | return 1; |
| 2568 | } | 2568 | } |
| 2569 | 2569 | ||
| 2570 | int | 2570 | static int |
| 2571 | tlsext_clienthello_hash_extension(SSL *s, uint16_t type, CBS *cbs) | 2571 | tlsext_clienthello_hash_extension(SSL *s, uint16_t type, CBS *cbs) |
| 2572 | { | 2572 | { |
| 2573 | /* | 2573 | /* |
diff --git a/src/lib/libssl/tls13_record_layer.c b/src/lib/libssl/tls13_record_layer.c index f5604adbeb..778356af15 100644 --- a/src/lib/libssl/tls13_record_layer.c +++ b/src/lib/libssl/tls13_record_layer.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls13_record_layer.c,v 1.74 2024/09/09 03:32:29 tb Exp $ */ | 1 | /* $OpenBSD: tls13_record_layer.c,v 1.75 2026/07/31 03:59:50 kenjiro Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -31,13 +31,13 @@ struct tls13_record_protection { | |||
| 31 | uint8_t seq_num[TLS13_RECORD_SEQ_NUM_LEN]; | 31 | uint8_t seq_num[TLS13_RECORD_SEQ_NUM_LEN]; |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | struct tls13_record_protection * | 34 | static struct tls13_record_protection * |
| 35 | tls13_record_protection_new(void) | 35 | tls13_record_protection_new(void) |
| 36 | { | 36 | { |
| 37 | return calloc(1, sizeof(struct tls13_record_protection)); | 37 | return calloc(1, sizeof(struct tls13_record_protection)); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | void | 40 | static void |
| 41 | tls13_record_protection_clear(struct tls13_record_protection *rp) | 41 | tls13_record_protection_clear(struct tls13_record_protection *rp) |
| 42 | { | 42 | { |
| 43 | EVP_AEAD_CTX_free(rp->aead_ctx); | 43 | EVP_AEAD_CTX_free(rp->aead_ctx); |
| @@ -48,7 +48,7 @@ tls13_record_protection_clear(struct tls13_record_protection *rp) | |||
| 48 | memset(rp, 0, sizeof(*rp)); | 48 | memset(rp, 0, sizeof(*rp)); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | void | 51 | static void |
| 52 | tls13_record_protection_free(struct tls13_record_protection *rp) | 52 | tls13_record_protection_free(struct tls13_record_protection *rp) |
| 53 | { | 53 | { |
| 54 | if (rp == NULL) | 54 | if (rp == NULL) |
diff --git a/src/lib/libssl/tls13_server.c b/src/lib/libssl/tls13_server.c index 604dab4cba..8ad11c6428 100644 --- a/src/lib/libssl/tls13_server.c +++ b/src/lib/libssl/tls13_server.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls13_server.c,v 1.112 2025/12/04 21:03:42 beck Exp $ */ | 1 | /* $OpenBSD: tls13_server.c,v 1.113 2026/07/31 03:59:50 kenjiro Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 4 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
| @@ -96,7 +96,7 @@ tls13_client_hello_is_legacy(CBS *cbs) | |||
| 96 | return (max_version < TLS1_3_VERSION); | 96 | return (max_version < TLS1_3_VERSION); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | int | 99 | static int |
| 100 | tls13_client_hello_required_extensions(struct tls13_ctx *ctx) | 100 | tls13_client_hello_required_extensions(struct tls13_ctx *ctx) |
| 101 | { | 101 | { |
| 102 | SSL *s = ctx->ssl; | 102 | SSL *s = ctx->ssl; |
