summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s23_clnt.c
diff options
context:
space:
mode:
authorjsing <>2017-01-25 10:54:23 +0000
committerjsing <>2017-01-25 10:54:23 +0000
commit82b04dfad277d1c342754d144a0e705780351236 (patch)
tree2f63538a996d3eb1b9f5ed2648f750a11966a5b3 /src/lib/libssl/s23_clnt.c
parentfe779bdf8fe3a5ca93fe1aa8bdc24ea59b8b7adc (diff)
downloadopenbsd-82b04dfad277d1c342754d144a0e705780351236.tar.gz
openbsd-82b04dfad277d1c342754d144a0e705780351236.tar.bz2
openbsd-82b04dfad277d1c342754d144a0e705780351236.zip
Limit enabled version range by the versions configured on the SSL_CTX/SSL,
provide an ssl_supported_versions_range() function which also limits the versions to those supported by the current method. ok beck@
Diffstat (limited to 'src/lib/libssl/s23_clnt.c')
-rw-r--r--src/lib/libssl/s23_clnt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/s23_clnt.c b/src/lib/libssl/s23_clnt.c
index b2dc912a9c..4a7641b818 100644
--- a/src/lib/libssl/s23_clnt.c
+++ b/src/lib/libssl/s23_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s23_clnt.c,v 1.56 2017/01/23 14:35:42 jsing Exp $ */ 1/* $OpenBSD: s23_clnt.c,v 1.57 2017/01/25 10:54:23 jsing 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 *
@@ -239,12 +239,11 @@ ssl23_client_hello(SSL *s)
239 if (s->internal->state == SSL23_ST_CW_CLNT_HELLO_A) { 239 if (s->internal->state == SSL23_ST_CW_CLNT_HELLO_A) {
240 arc4random_buf(s->s3->client_random, SSL3_RANDOM_SIZE); 240 arc4random_buf(s->s3->client_random, SSL3_RANDOM_SIZE);
241 241
242 if (ssl_enabled_version_range(s, NULL, &version) != 1) { 242 if (ssl_supported_version_range(s, NULL, &version) != 1) {
243 SSLerr(SSL_F_SSL23_CLIENT_HELLO, 243 SSLerr(SSL_F_SSL23_CLIENT_HELLO,
244 SSL_R_NO_PROTOCOLS_AVAILABLE); 244 SSL_R_NO_PROTOCOLS_AVAILABLE);
245 return (-1); 245 return (-1);
246 } 246 }
247
248 s->client_version = version; 247 s->client_version = version;
249 248
250 /* create Client Hello in SSL 3.0/TLS 1.0 format */ 249 /* create Client Hello in SSL 3.0/TLS 1.0 format */