summaryrefslogtreecommitdiffstats
path: root/ssl.c
diff options
context:
space:
mode:
authorAdriaan de Jong <dejong@fox-it.com>2011-06-27 09:52:59 +0200
committerDavid Sommerseth <davids@redhat.com>2011-10-19 22:31:46 +0200
commitb64ffdcf09edd7110c1f851942d0e8d4e05d883c (patch)
tree01e55f356f3032e663961ab3bf37ec520278a580 /ssl.c
parent397c0a35c5b36c270678c717e931476dc42bfa5c (diff)
downloadopenvpn-b64ffdcf09edd7110c1f851942d0e8d4e05d883c.tar.gz
openvpn-b64ffdcf09edd7110c1f851942d0e8d4e05d883c.tar.xz
openvpn-b64ffdcf09edd7110c1f851942d0e8d4e05d883c.zip
Refactored get_highest_preference_tls_cipher
Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'ssl.c')
-rw-r--r--ssl.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/ssl.c b/ssl.c
index 2935088..e94342f 100644
--- a/ssl.c
+++ b/ssl.c
@@ -2450,32 +2450,6 @@ print_details (SSL * c_ssl, const char *prefix)
}
/*
- * The OpenSSL library has a notion of preference in TLS
- * ciphers. Higher preference == more secure.
- * Return the highest preference cipher.
- */
-void
-get_highest_preference_tls_cipher (char *buf, int size)
-{
- SSL_CTX *ctx;
- SSL *ssl;
- const char *cipher_name;
-
- ctx = SSL_CTX_new (TLSv1_method ());
- if (!ctx)
- msg (M_SSLERR, "Cannot create SSL_CTX object");
- ssl = SSL_new (ctx);
- if (!ssl)
- msg (M_SSLERR, "Cannot create SSL object");
-
- cipher_name = SSL_get_cipher_list (ssl, 0);
- strncpynt (buf, cipher_name, size);
-
- SSL_free (ssl);
- SSL_CTX_free (ctx);
-}
-
-/*
* Map internal constants to ascii names.
*/
static const char *