diff options
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r-- | src/lib/libssl/s3_lib.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index acb35a8f25..1d84effeea 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_lib.c,v 1.75 2014/08/10 15:06:15 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.76 2014/08/11 01:06:22 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -1873,6 +1873,19 @@ ssl3_get_cipher(unsigned int u) | |||
1873 | return (NULL); | 1873 | return (NULL); |
1874 | } | 1874 | } |
1875 | 1875 | ||
1876 | const SSL_CIPHER * | ||
1877 | ssl3_get_cipher_by_id(unsigned int id) | ||
1878 | { | ||
1879 | const SSL_CIPHER *cp; | ||
1880 | SSL_CIPHER c; | ||
1881 | |||
1882 | c.id = id; | ||
1883 | cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS); | ||
1884 | if (cp != NULL && cp->valid == 1) | ||
1885 | return (cp); | ||
1886 | return (NULL); | ||
1887 | } | ||
1888 | |||
1876 | int | 1889 | int |
1877 | ssl3_pending(const SSL *s) | 1890 | ssl3_pending(const SSL *s) |
1878 | { | 1891 | { |