boringssl/ssl
David Benjamin a07c0fc8f2 Fix SSL_get_current_cipher.
SSL_get_current_cipher is documented by upstream to return the cipher actually
being used. However, because it reads s->session, it returns information
pertaining to the session to be offered if queried before ServerHello or early
in an abbreviated handshake.

Logic around s->session needs more comprehensive cleanup but for just this
function, defining it to be the current outgoing cipher is close to the current
semantics but for fixing the initial state (s->session->cipher is populated
when sending CCS). Store it in the SSL_AEAD_CTX which seems a natural place to
associate state pertaining to a connection half.

BUG=484744

Change-Id: Ife8db27a16615d0dbb2aec65359537243e08af7c
Reviewed-on: https://boringssl-review.googlesource.com/4733
Reviewed-by: Adam Langley <agl@google.com>
2015-05-14 23:02:16 +00:00
..
pqueue
test Fix SSL_get_current_cipher. 2015-05-14 23:02:16 +00:00
CMakeLists.txt Document everything in ssl_ciph.c, now ssl_cipher.c. 2015-04-13 22:06:55 +00:00
d1_both.c Promote max_cert_list and max_send_fragment to functions. 2015-05-06 22:14:07 +00:00
d1_clnt.c Never resume sessions on renegotiations. 2015-05-14 22:53:21 +00:00
d1_lib.c Remove OPENSSL_timeval. 2015-05-08 18:03:07 +00:00
d1_meth.c Promote all dtls1_ctrl hooks to functions. 2015-05-06 22:11:05 +00:00
d1_pkt.c Remove redundant setup buffer calls. 2015-05-11 21:31:59 +00:00
d1_srtp.c Fix STACK_OF pointer style. 2015-05-06 22:55:16 +00:00
d1_srvr.c Never resume sessions on renegotiations. 2015-05-14 22:53:21 +00:00
internal.h Fix SSL_get_current_cipher. 2015-05-14 23:02:16 +00:00
s3_both.c Remove redundant setup buffer calls. 2015-05-11 21:31:59 +00:00
s3_clnt.c Never resume sessions on renegotiations. 2015-05-14 22:53:21 +00:00
s3_enc.c Remove unnecessary NULL checks, part 5. 2015-05-04 23:16:19 +00:00
s3_lib.c Switch EVP_PKEY_dup calls to EVP_PKEY_up_ref. 2015-05-06 22:57:09 +00:00
s3_meth.c Promote all SSL callback ctrl hooks to proper functions. 2015-05-06 22:10:47 +00:00
s3_pkt.c Never resume sessions on renegotiations. 2015-05-14 22:53:21 +00:00
s3_srvr.c Never resume sessions on renegotiations. 2015-05-14 22:53:21 +00:00
ssl_algs.c Rename ssl_locl.h to internal.h 2015-04-10 22:14:09 +00:00
ssl_asn1.c Remove unnecessary NULL checks, part 5. 2015-05-04 23:16:19 +00:00
ssl_cert.c Switch EVP_PKEY_dup calls to EVP_PKEY_up_ref. 2015-05-06 22:57:09 +00:00
ssl_cipher.c Remove dead field from CIPHER_ORDER. 2015-05-06 22:36:31 +00:00
ssl_lib.c Fix SSL_get_current_cipher. 2015-05-14 23:02:16 +00:00
ssl_rsa.c Switch EVP_PKEY_dup calls to EVP_PKEY_up_ref. 2015-05-06 22:57:09 +00:00
ssl_sess.c Fix STACK_OF pointer style. 2015-05-06 22:55:16 +00:00
ssl_stat.c Rename ssl_locl.h to internal.h 2015-04-10 22:14:09 +00:00
ssl_test.cc Revert "Temporarily break a handful of tests." 2015-05-04 20:21:32 -04:00
ssl_txt.c Rename ssl_locl.h to internal.h 2015-04-10 22:14:09 +00:00
t1_enc.c Fix SSL_get_current_cipher. 2015-05-14 23:02:16 +00:00
t1_lib.c Never resume sessions on renegotiations. 2015-05-14 22:53:21 +00:00
t1_reneg.c Include-what-you-use ssl/internal.h. 2015-04-10 22:15:02 +00:00