Add SSL_CIPHER_get_kx_name.
This is needed by Android because it passes this string to a handshake
callback. It's implemented in Android's OpenSSL in this patch:
https://android.googlesource.com/platform/external/openssl.git/+/master/patches/0003-jsse.patch
(Note that it's called |SSL_authentication_method| there.)
I didn't format this function in OpenSSL style because it's crazy and
because we'll probably clang-format ssl/ soon.
Change-Id: I865540511b50859c339da5d76ce37810449aa444
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index a1412ab..5a65fac 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1950,6 +1950,9 @@
OPENSSL_EXPORT int SSL_CIPHER_get_bits(const SSL_CIPHER *c,int *alg_bits);
OPENSSL_EXPORT const char * SSL_CIPHER_get_version(const SSL_CIPHER *c);
OPENSSL_EXPORT const char * SSL_CIPHER_get_name(const SSL_CIPHER *c);
+/* SSL_CIPHER_get_kx_name returns a string that describes the key-exchange
+ * method used by |c|. For example, "ECDHE-ECDSA". */
+OPENSSL_EXPORT const char * SSL_CIPHER_get_kx_name(const SSL_CIPHER *cipher);
OPENSSL_EXPORT unsigned long SSL_CIPHER_get_id(const SSL_CIPHER *c);
OPENSSL_EXPORT int SSL_get_fd(const SSL *s);