Refactor SSL_bytes_to_cipher_list()
authorBenjamin Kaduk <bkaduk@akamai.com>
Tue, 31 Jan 2017 01:20:14 +0000 (19:20 -0600)
committerRichard Levitte <levitte@openssl.org>
Thu, 23 Feb 2017 18:40:25 +0000 (19:40 +0100)
commit90134d9806f0191bc0eb0cde2750f0cd68667a6d
tree5ce79363107c5328c44aec2010455352d580bd1c
parentccb8e6e0b1c536430290a87ba5c87dc072cc5a12
Refactor SSL_bytes_to_cipher_list()

Split off the portions that mutate the SSL object into a separate
function that the state machine calls, so that the public API can
be a pure function.  (It still needs the SSL parameter in order
to determine what SSL_METHOD's get_cipher_by_char() routine to use,
though.)

Instead of returning the stack of ciphers (functionality that was
not used internally), require using the output parameter, and add
a separate output parameter for the SCSVs contained in the supplied
octets, if desired.  This lets us move to the standard return value
convention.  Also make both output stacks optional parameters.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2279)
doc/man3/SSL_get_ciphers.pod
include/openssl/ssl.h
ssl/ssl_err.c
ssl/ssl_lib.c
ssl/ssl_locl.h
ssl/statem/statem_srvr.c