diff options
author | jsing <> | 2017-10-10 16:51:38 +0000 |
---|---|---|
committer | jsing <> | 2017-10-10 16:51:38 +0000 |
commit | 098764416bf22cf0022a14e54c917a7d274d5907 (patch) | |
tree | 41440fc4cda10bdbc058059722ec231878a235ef /src/lib/libssl/ssl_srvr.c | |
parent | 9541ce793a71add79fbe8d7b3d5b3fae5015bf53 (diff) | |
download | openbsd-098764416bf22cf0022a14e54c917a7d274d5907.tar.gz openbsd-098764416bf22cf0022a14e54c917a7d274d5907.tar.bz2 openbsd-098764416bf22cf0022a14e54c917a7d274d5907.zip |
Make ssl_bytes_to_cipher_list() take a CBS, rather than a pointer and
length, since the caller has already been converted to CBS. A small amount
of additional clean up whilst here.
Diffstat (limited to 'src/lib/libssl/ssl_srvr.c')
-rw-r--r-- | src/lib/libssl/ssl_srvr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_srvr.c b/src/lib/libssl/ssl_srvr.c index 686d8c8db6..723d82fc82 100644 --- a/src/lib/libssl/ssl_srvr.c +++ b/src/lib/libssl/ssl_srvr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_srvr.c,v 1.23 2017/10/08 16:46:31 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_srvr.c,v 1.24 2017/10/10 16:51:38 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 | * |
@@ -872,11 +872,12 @@ ssl3_get_client_hello(SSL *s) | |||
872 | 872 | ||
873 | if (CBS_len(&cipher_suites) > 0) { | 873 | if (CBS_len(&cipher_suites) > 0) { |
874 | if ((ciphers = ssl_bytes_to_cipher_list(s, | 874 | if ((ciphers = ssl_bytes_to_cipher_list(s, |
875 | CBS_data(&cipher_suites), CBS_len(&cipher_suites))) == NULL) | 875 | &cipher_suites)) == NULL) |
876 | goto err; | 876 | goto err; |
877 | } | 877 | } |
878 | 878 | ||
879 | /* If it is a hit, check that the cipher is in the list */ | 879 | /* If it is a hit, check that the cipher is in the list */ |
880 | /* XXX - CBS_len(&cipher_suites) will always be zero here... */ | ||
880 | if (s->internal->hit && CBS_len(&cipher_suites) > 0) { | 881 | if (s->internal->hit && CBS_len(&cipher_suites) > 0) { |
881 | j = 0; | 882 | j = 0; |
882 | id = s->session->cipher->id; | 883 | id = s->session->cipher->id; |