From 2c353aeff1331c041c51ad5896dd493eec417af2 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Wed, 15 Apr 2015 16:25:44 +0000 Subject: 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@ --- lib/libssl/s3_srvr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/libssl/s3_srvr.c') 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; -- cgit v1.2.3