summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_ciph.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-12-26 16:25:06 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-12-26 16:25:06 +0000
commit1520e6c084ccc06a6325381bf9fc618ab5cfb230 (patch)
treee15351c2802795a0c9ff38f83ed6e50160e9f66c /ssl/ssl_ciph.c
parent2001129f096d10bbd815936d23af3e97daf7882d (diff)
Add ctrl and utility functions to retrieve raw cipher list sent by client in
client hello message. Previously this could only be retrieved on an initial connection and it was impossible to determine the cipher IDs of any uknown ciphersuites. (backport from HEAD)
Diffstat (limited to 'ssl/ssl_ciph.c')
-rw-r--r--ssl/ssl_ciph.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index bac2515789..12c0bf2c3d 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -1934,3 +1934,16 @@ int ssl_cipher_get_cert_index(const SSL_CIPHER *c)
return -1;
}
+const SSL_CIPHER *ssl_get_cipher_by_char(SSL *ssl, const unsigned char *ptr)
+ {
+ const SSL_CIPHER *c;
+ c = ssl->method->get_cipher_by_char(ptr);
+ if (c == NULL || c->valid == 0)
+ return NULL;
+ return c;
+ }
+
+const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr)
+ {
+ return ssl->method->get_cipher_by_char(ptr);
+ }