summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2026-08-29 04:54:43 +0000
committertb <>2026-08-29 04:54:43 +0000
commita86ec57849247ba2ba6e7d7d7d9ccb619e5d01bf (patch)
tree6dcb35c6fbb4c6cf4c8060c1161d79f355a3da0d
parentc6ecafe6589675f83ca98bd5a3be89cf59281d1c (diff)
downloadopenbsd-a86ec57849247ba2ba6e7d7d7d9ccb619e5d01bf.tar.gz
openbsd-a86ec57849247ba2ba6e7d7d7d9ccb619e5d01bf.tar.bz2
openbsd-a86ec57849247ba2ba6e7d7d7d9ccb619e5d01bf.zip
tlsext_alpn_client_process(): rename list and proto
Use server_list and selected instead of list and proto to reduce noise in the next commit. ok jsing kenjiro
-rw-r--r--src/lib/libssl/ssl_tlsext.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c
index 35e554e292..f298ec4d11 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.166 2026/08/21 17:15:22 tb Exp $ */ 1/* $OpenBSD: ssl_tlsext.c,v 1.167 2026/08/29 04:54:43 tb 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>
@@ -163,25 +163,25 @@ tlsext_alpn_server_build(SSL *s, uint16_t msg_type, CBB *cbb)
163static int 163static int
164tlsext_alpn_client_process(SSL *s, uint16_t msg_type, CBS *cbs, int *alert) 164tlsext_alpn_client_process(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
165{ 165{
166 CBS list, proto; 166 CBS server_list;
167 CBS selected;
167 168
168 if (s->alpn_client_proto_list == NULL) { 169 if (s->alpn_client_proto_list == NULL) {
169 *alert = SSL_AD_UNSUPPORTED_EXTENSION; 170 *alert = SSL_AD_UNSUPPORTED_EXTENSION;
170 return 0; 171 return 0;
171 } 172 }
172 173
173 if (!CBS_get_u16_length_prefixed(cbs, &list)) 174 if (!CBS_get_u16_length_prefixed(cbs, &server_list))
174 return 0; 175 return 0;
175 176 if (!CBS_get_u8_length_prefixed(&server_list, &selected))
176 if (!CBS_get_u8_length_prefixed(&list, &proto))
177 return 0; 177 return 0;
178 178
179 if (CBS_len(&list) != 0) 179 if (CBS_len(&server_list) != 0)
180 return 0; 180 return 0;
181 if (CBS_len(&proto) == 0) 181 if (CBS_len(&selected) == 0)
182 return 0; 182 return 0;
183 183
184 if (!CBS_stow(&proto, &s->s3->alpn_selected, &s->s3->alpn_selected_len)) 184 if (!CBS_stow(&selected, &s->s3->alpn_selected, &s->s3->alpn_selected_len))
185 return 0; 185 return 0;
186 186
187 return 1; 187 return 1;