summaryrefslogtreecommitdiff
path: root/lib/libssl/s3_srvr.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-04-15 16:25:44 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-04-15 16:25:44 +0000
commit2c353aeff1331c041c51ad5896dd493eec417af2 (patch)
tree3d5db91c004c497208ad1f137cb457dd08a3aa4a /lib/libssl/s3_srvr.c
parent578b020dfa848878f998e18e77a2413f46864b38 (diff)
Clean up the ssl_bytes_to_cipher_list() API - rather than having the
ability to pass or not pass a STACK_OF(SSL_CIPHER) *, which is then either zeroed or if NULL a new one is allocated, always allocate one and return it directly. Inspired by simliar changes in BoringSSL. ok beck@ doug@
Diffstat (limited to 'lib/libssl/s3_srvr.c')
-rw-r--r--lib/libssl/s3_srvr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libssl/s3_srvr.c b/lib/libssl/s3_srvr.c
index ce48809f65b..5248cc864c2 100644
--- a/lib/libssl/s3_srvr.c
+++ b/lib/libssl/s3_srvr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_srvr.c,v 1.101 2015/03/27 12:29:54 jsing Exp $ */
+/* $OpenBSD: s3_srvr.c,v 1.102 2015/04/15 16:25:43 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -988,9 +988,9 @@ ssl3_get_client_hello(SSL *s)
}
if (p + i - d > n)
goto truncated;
- if ((i > 0) &&
- (ssl_bytes_to_cipher_list(s, p, i, &(ciphers)) == NULL)) {
- goto err;
+ if (i > 0) {
+ if ((ciphers = ssl_bytes_to_cipher_list(s, p, i)) == NULL)
+ goto err;
}
p += i;