summaryrefslogtreecommitdiff
path: root/src/lib/libssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl')
-rw-r--r--src/lib/libssl/d1_clnt.c4
-rw-r--r--src/lib/libssl/d1_meth.c4
-rw-r--r--src/lib/libssl/d1_srvr.c4
-rw-r--r--src/lib/libssl/s23_clnt.c4
-rw-r--r--src/lib/libssl/s23_srvr.c4
-rw-r--r--src/lib/libssl/s3_clnt.c4
-rw-r--r--src/lib/libssl/s3_lib.c39
-rw-r--r--src/lib/libssl/s3_srvr.c4
-rw-r--r--src/lib/libssl/src/ssl/d1_clnt.c4
-rw-r--r--src/lib/libssl/src/ssl/d1_meth.c4
-rw-r--r--src/lib/libssl/src/ssl/d1_srvr.c4
-rw-r--r--src/lib/libssl/src/ssl/s23_clnt.c4
-rw-r--r--src/lib/libssl/src/ssl/s23_meth.c4
-rw-r--r--src/lib/libssl/src/ssl/s23_srvr.c4
-rw-r--r--src/lib/libssl/src/ssl/s3_clnt.c4
-rw-r--r--src/lib/libssl/src/ssl/s3_lib.c39
-rw-r--r--src/lib/libssl/src/ssl/s3_meth.c4
-rw-r--r--src/lib/libssl/src/ssl/s3_srvr.c4
-rw-r--r--src/lib/libssl/src/ssl/ssl.h4
-rw-r--r--src/lib/libssl/src/ssl/ssl_locl.h4
-rw-r--r--src/lib/libssl/src/ssl/t1_clnt.c8
-rw-r--r--src/lib/libssl/src/ssl/t1_meth.c8
-rw-r--r--src/lib/libssl/src/ssl/t1_srvr.c8
-rw-r--r--src/lib/libssl/ssl.h4
-rw-r--r--src/lib/libssl/ssl_locl.h4
-rw-r--r--src/lib/libssl/t1_clnt.c8
-rw-r--r--src/lib/libssl/t1_meth.c8
-rw-r--r--src/lib/libssl/t1_srvr.c8
28 files changed, 176 insertions, 30 deletions
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c
index 3687f5917c..c344c1bcdc 100644
--- a/src/lib/libssl/d1_clnt.c
+++ b/src/lib/libssl/d1_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_clnt.c,v 1.41 2014/12/14 16:19:38 jsing Exp $ */ 1/* $OpenBSD: d1_clnt.c,v 1.42 2015/02/06 08:30:23 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -146,6 +146,8 @@ const SSL_METHOD DTLSv1_client_method_data = {
146 .ssl_dispatch_alert = dtls1_dispatch_alert, 146 .ssl_dispatch_alert = dtls1_dispatch_alert,
147 .ssl_ctrl = dtls1_ctrl, 147 .ssl_ctrl = dtls1_ctrl,
148 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 148 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
149 .get_cipher_by_char = ssl3_get_cipher_by_char,
150 .put_cipher_by_char = ssl3_put_cipher_by_char,
149 .ssl_pending = ssl3_pending, 151 .ssl_pending = ssl3_pending,
150 .num_ciphers = ssl3_num_ciphers, 152 .num_ciphers = ssl3_num_ciphers,
151 .get_cipher = dtls1_get_cipher, 153 .get_cipher = dtls1_get_cipher,
diff --git a/src/lib/libssl/d1_meth.c b/src/lib/libssl/d1_meth.c
index 527b47e98a..7f279a4f50 100644
--- a/src/lib/libssl/d1_meth.c
+++ b/src/lib/libssl/d1_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_meth.c,v 1.8 2014/12/14 15:30:50 jsing Exp $ */ 1/* $OpenBSD: d1_meth.c,v 1.9 2015/02/06 08:30:23 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -84,6 +84,8 @@ const SSL_METHOD DTLSv1_method_data = {
84 .ssl_dispatch_alert = dtls1_dispatch_alert, 84 .ssl_dispatch_alert = dtls1_dispatch_alert,
85 .ssl_ctrl = dtls1_ctrl, 85 .ssl_ctrl = dtls1_ctrl,
86 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 86 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
87 .get_cipher_by_char = ssl3_get_cipher_by_char,
88 .put_cipher_by_char = ssl3_put_cipher_by_char,
87 .ssl_pending = ssl3_pending, 89 .ssl_pending = ssl3_pending,
88 .num_ciphers = ssl3_num_ciphers, 90 .num_ciphers = ssl3_num_ciphers,
89 .get_cipher = dtls1_get_cipher, 91 .get_cipher = dtls1_get_cipher,
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c
index 057d92109c..82f846d236 100644
--- a/src/lib/libssl/d1_srvr.c
+++ b/src/lib/libssl/d1_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_srvr.c,v 1.46 2014/12/15 00:46:53 doug Exp $ */ 1/* $OpenBSD: d1_srvr.c,v 1.47 2015/02/06 08:30:23 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -147,6 +147,8 @@ const SSL_METHOD DTLSv1_server_method_data = {
147 .ssl_dispatch_alert = dtls1_dispatch_alert, 147 .ssl_dispatch_alert = dtls1_dispatch_alert,
148 .ssl_ctrl = dtls1_ctrl, 148 .ssl_ctrl = dtls1_ctrl,
149 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 149 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
150 .get_cipher_by_char = ssl3_get_cipher_by_char,
151 .put_cipher_by_char = ssl3_put_cipher_by_char,
150 .ssl_pending = ssl3_pending, 152 .ssl_pending = ssl3_pending,
151 .num_ciphers = ssl3_num_ciphers, 153 .num_ciphers = ssl3_num_ciphers,
152 .get_cipher = dtls1_get_cipher, 154 .get_cipher = dtls1_get_cipher,
diff --git a/src/lib/libssl/s23_clnt.c b/src/lib/libssl/s23_clnt.c
index 28ea24c173..4159ae0580 100644
--- a/src/lib/libssl/s23_clnt.c
+++ b/src/lib/libssl/s23_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s23_clnt.c,v 1.35 2014/12/10 15:43:31 jsing Exp $ */ 1/* $OpenBSD: s23_clnt.c,v 1.36 2015/02/06 08:30:23 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 *
@@ -140,6 +140,8 @@ const SSL_METHOD SSLv23_client_method_data = {
140 .ssl_dispatch_alert = ssl3_dispatch_alert, 140 .ssl_dispatch_alert = ssl3_dispatch_alert,
141 .ssl_ctrl = ssl3_ctrl, 141 .ssl_ctrl = ssl3_ctrl,
142 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 142 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
143 .get_cipher_by_char = ssl3_get_cipher_by_char,
144 .put_cipher_by_char = ssl3_put_cipher_by_char,
143 .ssl_pending = ssl_undefined_const_function, 145 .ssl_pending = ssl_undefined_const_function,
144 .num_ciphers = ssl3_num_ciphers, 146 .num_ciphers = ssl3_num_ciphers,
145 .get_cipher = ssl3_get_cipher, 147 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/s23_srvr.c b/src/lib/libssl/s23_srvr.c
index a7686c3f40..9e0ee453db 100644
--- a/src/lib/libssl/s23_srvr.c
+++ b/src/lib/libssl/s23_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s23_srvr.c,v 1.37 2014/12/10 15:43:31 jsing Exp $ */ 1/* $OpenBSD: s23_srvr.c,v 1.38 2015/02/06 08:30:23 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 *
@@ -139,6 +139,8 @@ const SSL_METHOD SSLv23_server_method_data = {
139 .ssl_dispatch_alert = ssl3_dispatch_alert, 139 .ssl_dispatch_alert = ssl3_dispatch_alert,
140 .ssl_ctrl = ssl3_ctrl, 140 .ssl_ctrl = ssl3_ctrl,
141 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 141 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
142 .get_cipher_by_char = ssl3_get_cipher_by_char,
143 .put_cipher_by_char = ssl3_put_cipher_by_char,
142 .ssl_pending = ssl_undefined_const_function, 144 .ssl_pending = ssl_undefined_const_function,
143 .num_ciphers = ssl3_num_ciphers, 145 .num_ciphers = ssl3_num_ciphers,
144 .get_cipher = ssl3_get_cipher, 146 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c
index b1c8ffb200..1a64a7e5f2 100644
--- a/src/lib/libssl/s3_clnt.c
+++ b/src/lib/libssl/s3_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_clnt.c,v 1.104 2015/01/23 14:40:59 jsing Exp $ */ 1/* $OpenBSD: s3_clnt.c,v 1.105 2015/02/06 08:30:23 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 *
@@ -188,6 +188,8 @@ const SSL_METHOD SSLv3_client_method_data = {
188 .ssl_dispatch_alert = ssl3_dispatch_alert, 188 .ssl_dispatch_alert = ssl3_dispatch_alert,
189 .ssl_ctrl = ssl3_ctrl, 189 .ssl_ctrl = ssl3_ctrl,
190 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 190 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
191 .get_cipher_by_char = ssl3_get_cipher_by_char,
192 .put_cipher_by_char = ssl3_put_cipher_by_char,
191 .ssl_pending = ssl3_pending, 193 .ssl_pending = ssl3_pending,
192 .num_ciphers = ssl3_num_ciphers, 194 .num_ciphers = ssl3_num_ciphers,
193 .get_cipher = ssl3_get_cipher, 195 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c
index 98eff97131..c7731b3cf4 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.91 2014/12/16 05:47:28 miod Exp $ */ 1/* $OpenBSD: s3_lib.c,v 1.92 2015/02/06 08:30:23 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 *
@@ -2519,7 +2519,42 @@ ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
2519 return (1); 2519 return (1);
2520} 2520}
2521 2521
2522SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, 2522/*
2523 * This function needs to check if the ciphers required are actually available.
2524 */
2525const SSL_CIPHER *
2526ssl3_get_cipher_by_char(const unsigned char *p)
2527{
2528 const SSL_CIPHER *cp;
2529 unsigned long id;
2530 SSL_CIPHER c;
2531
2532 id = 0x03000000L | ((unsigned long)p[0] << 8L) | (unsigned long)p[1];
2533 c.id = id;
2534 cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
2535 if (cp == NULL || cp->valid == 0)
2536 return NULL;
2537 else
2538 return cp;
2539}
2540
2541int
2542ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p)
2543{
2544 long l;
2545
2546 if (p != NULL) {
2547 l = c->id;
2548 if ((l & 0xff000000) != 0x03000000)
2549 return (0);
2550 p[0] = ((unsigned char)(l >> 8L)) & 0xFF;
2551 p[1] = ((unsigned char)(l)) & 0xFF;
2552 }
2553 return (2);
2554}
2555
2556SSL_CIPHER *
2557ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
2523 STACK_OF(SSL_CIPHER) *srvr) 2558 STACK_OF(SSL_CIPHER) *srvr)
2524{ 2559{
2525 unsigned long alg_k, alg_a, mask_k, mask_a; 2560 unsigned long alg_k, alg_a, mask_k, mask_a;
diff --git a/src/lib/libssl/s3_srvr.c b/src/lib/libssl/s3_srvr.c
index fd8f9aabab..e16eb6f5d0 100644
--- a/src/lib/libssl/s3_srvr.c
+++ b/src/lib/libssl/s3_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_srvr.c,v 1.96 2014/12/29 16:12:59 tedu Exp $ */ 1/* $OpenBSD: s3_srvr.c,v 1.97 2015/02/06 08:30:23 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 *
@@ -188,6 +188,8 @@ const SSL_METHOD SSLv3_server_method_data = {
188 .ssl_dispatch_alert = ssl3_dispatch_alert, 188 .ssl_dispatch_alert = ssl3_dispatch_alert,
189 .ssl_ctrl = ssl3_ctrl, 189 .ssl_ctrl = ssl3_ctrl,
190 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 190 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
191 .get_cipher_by_char = ssl3_get_cipher_by_char,
192 .put_cipher_by_char = ssl3_put_cipher_by_char,
191 .ssl_pending = ssl3_pending, 193 .ssl_pending = ssl3_pending,
192 .num_ciphers = ssl3_num_ciphers, 194 .num_ciphers = ssl3_num_ciphers,
193 .get_cipher = ssl3_get_cipher, 195 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/src/ssl/d1_clnt.c b/src/lib/libssl/src/ssl/d1_clnt.c
index 3687f5917c..c344c1bcdc 100644
--- a/src/lib/libssl/src/ssl/d1_clnt.c
+++ b/src/lib/libssl/src/ssl/d1_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_clnt.c,v 1.41 2014/12/14 16:19:38 jsing Exp $ */ 1/* $OpenBSD: d1_clnt.c,v 1.42 2015/02/06 08:30:23 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -146,6 +146,8 @@ const SSL_METHOD DTLSv1_client_method_data = {
146 .ssl_dispatch_alert = dtls1_dispatch_alert, 146 .ssl_dispatch_alert = dtls1_dispatch_alert,
147 .ssl_ctrl = dtls1_ctrl, 147 .ssl_ctrl = dtls1_ctrl,
148 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 148 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
149 .get_cipher_by_char = ssl3_get_cipher_by_char,
150 .put_cipher_by_char = ssl3_put_cipher_by_char,
149 .ssl_pending = ssl3_pending, 151 .ssl_pending = ssl3_pending,
150 .num_ciphers = ssl3_num_ciphers, 152 .num_ciphers = ssl3_num_ciphers,
151 .get_cipher = dtls1_get_cipher, 153 .get_cipher = dtls1_get_cipher,
diff --git a/src/lib/libssl/src/ssl/d1_meth.c b/src/lib/libssl/src/ssl/d1_meth.c
index 527b47e98a..7f279a4f50 100644
--- a/src/lib/libssl/src/ssl/d1_meth.c
+++ b/src/lib/libssl/src/ssl/d1_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_meth.c,v 1.8 2014/12/14 15:30:50 jsing Exp $ */ 1/* $OpenBSD: d1_meth.c,v 1.9 2015/02/06 08:30:23 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -84,6 +84,8 @@ const SSL_METHOD DTLSv1_method_data = {
84 .ssl_dispatch_alert = dtls1_dispatch_alert, 84 .ssl_dispatch_alert = dtls1_dispatch_alert,
85 .ssl_ctrl = dtls1_ctrl, 85 .ssl_ctrl = dtls1_ctrl,
86 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 86 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
87 .get_cipher_by_char = ssl3_get_cipher_by_char,
88 .put_cipher_by_char = ssl3_put_cipher_by_char,
87 .ssl_pending = ssl3_pending, 89 .ssl_pending = ssl3_pending,
88 .num_ciphers = ssl3_num_ciphers, 90 .num_ciphers = ssl3_num_ciphers,
89 .get_cipher = dtls1_get_cipher, 91 .get_cipher = dtls1_get_cipher,
diff --git a/src/lib/libssl/src/ssl/d1_srvr.c b/src/lib/libssl/src/ssl/d1_srvr.c
index 057d92109c..82f846d236 100644
--- a/src/lib/libssl/src/ssl/d1_srvr.c
+++ b/src/lib/libssl/src/ssl/d1_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_srvr.c,v 1.46 2014/12/15 00:46:53 doug Exp $ */ 1/* $OpenBSD: d1_srvr.c,v 1.47 2015/02/06 08:30:23 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -147,6 +147,8 @@ const SSL_METHOD DTLSv1_server_method_data = {
147 .ssl_dispatch_alert = dtls1_dispatch_alert, 147 .ssl_dispatch_alert = dtls1_dispatch_alert,
148 .ssl_ctrl = dtls1_ctrl, 148 .ssl_ctrl = dtls1_ctrl,
149 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 149 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
150 .get_cipher_by_char = ssl3_get_cipher_by_char,
151 .put_cipher_by_char = ssl3_put_cipher_by_char,
150 .ssl_pending = ssl3_pending, 152 .ssl_pending = ssl3_pending,
151 .num_ciphers = ssl3_num_ciphers, 153 .num_ciphers = ssl3_num_ciphers,
152 .get_cipher = dtls1_get_cipher, 154 .get_cipher = dtls1_get_cipher,
diff --git a/src/lib/libssl/src/ssl/s23_clnt.c b/src/lib/libssl/src/ssl/s23_clnt.c
index 28ea24c173..4159ae0580 100644
--- a/src/lib/libssl/src/ssl/s23_clnt.c
+++ b/src/lib/libssl/src/ssl/s23_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s23_clnt.c,v 1.35 2014/12/10 15:43:31 jsing Exp $ */ 1/* $OpenBSD: s23_clnt.c,v 1.36 2015/02/06 08:30:23 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 *
@@ -140,6 +140,8 @@ const SSL_METHOD SSLv23_client_method_data = {
140 .ssl_dispatch_alert = ssl3_dispatch_alert, 140 .ssl_dispatch_alert = ssl3_dispatch_alert,
141 .ssl_ctrl = ssl3_ctrl, 141 .ssl_ctrl = ssl3_ctrl,
142 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 142 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
143 .get_cipher_by_char = ssl3_get_cipher_by_char,
144 .put_cipher_by_char = ssl3_put_cipher_by_char,
143 .ssl_pending = ssl_undefined_const_function, 145 .ssl_pending = ssl_undefined_const_function,
144 .num_ciphers = ssl3_num_ciphers, 146 .num_ciphers = ssl3_num_ciphers,
145 .get_cipher = ssl3_get_cipher, 147 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/src/ssl/s23_meth.c b/src/lib/libssl/src/ssl/s23_meth.c
index e5382ff38d..164604001e 100644
--- a/src/lib/libssl/src/ssl/s23_meth.c
+++ b/src/lib/libssl/src/ssl/s23_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s23_meth.c,v 1.16 2014/11/16 14:12:47 jsing Exp $ */ 1/* $OpenBSD: s23_meth.c,v 1.17 2015/02/06 08:30:23 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 *
@@ -83,6 +83,8 @@ const SSL_METHOD SSLv23_method_data = {
83 .ssl_dispatch_alert = ssl3_dispatch_alert, 83 .ssl_dispatch_alert = ssl3_dispatch_alert,
84 .ssl_ctrl = ssl3_ctrl, 84 .ssl_ctrl = ssl3_ctrl,
85 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 85 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
86 .get_cipher_by_char = ssl3_get_cipher_by_char,
87 .put_cipher_by_char = ssl3_put_cipher_by_char,
86 .ssl_pending = ssl_undefined_const_function, 88 .ssl_pending = ssl_undefined_const_function,
87 .num_ciphers = ssl3_num_ciphers, 89 .num_ciphers = ssl3_num_ciphers,
88 .get_cipher = ssl3_get_cipher, 90 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/src/ssl/s23_srvr.c b/src/lib/libssl/src/ssl/s23_srvr.c
index a7686c3f40..9e0ee453db 100644
--- a/src/lib/libssl/src/ssl/s23_srvr.c
+++ b/src/lib/libssl/src/ssl/s23_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s23_srvr.c,v 1.37 2014/12/10 15:43:31 jsing Exp $ */ 1/* $OpenBSD: s23_srvr.c,v 1.38 2015/02/06 08:30:23 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 *
@@ -139,6 +139,8 @@ const SSL_METHOD SSLv23_server_method_data = {
139 .ssl_dispatch_alert = ssl3_dispatch_alert, 139 .ssl_dispatch_alert = ssl3_dispatch_alert,
140 .ssl_ctrl = ssl3_ctrl, 140 .ssl_ctrl = ssl3_ctrl,
141 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 141 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
142 .get_cipher_by_char = ssl3_get_cipher_by_char,
143 .put_cipher_by_char = ssl3_put_cipher_by_char,
142 .ssl_pending = ssl_undefined_const_function, 144 .ssl_pending = ssl_undefined_const_function,
143 .num_ciphers = ssl3_num_ciphers, 145 .num_ciphers = ssl3_num_ciphers,
144 .get_cipher = ssl3_get_cipher, 146 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c
index b1c8ffb200..1a64a7e5f2 100644
--- a/src/lib/libssl/src/ssl/s3_clnt.c
+++ b/src/lib/libssl/src/ssl/s3_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_clnt.c,v 1.104 2015/01/23 14:40:59 jsing Exp $ */ 1/* $OpenBSD: s3_clnt.c,v 1.105 2015/02/06 08:30:23 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 *
@@ -188,6 +188,8 @@ const SSL_METHOD SSLv3_client_method_data = {
188 .ssl_dispatch_alert = ssl3_dispatch_alert, 188 .ssl_dispatch_alert = ssl3_dispatch_alert,
189 .ssl_ctrl = ssl3_ctrl, 189 .ssl_ctrl = ssl3_ctrl,
190 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 190 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
191 .get_cipher_by_char = ssl3_get_cipher_by_char,
192 .put_cipher_by_char = ssl3_put_cipher_by_char,
191 .ssl_pending = ssl3_pending, 193 .ssl_pending = ssl3_pending,
192 .num_ciphers = ssl3_num_ciphers, 194 .num_ciphers = ssl3_num_ciphers,
193 .get_cipher = ssl3_get_cipher, 195 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/src/ssl/s3_lib.c b/src/lib/libssl/src/ssl/s3_lib.c
index 98eff97131..c7731b3cf4 100644
--- a/src/lib/libssl/src/ssl/s3_lib.c
+++ b/src/lib/libssl/src/ssl/s3_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_lib.c,v 1.91 2014/12/16 05:47:28 miod Exp $ */ 1/* $OpenBSD: s3_lib.c,v 1.92 2015/02/06 08:30:23 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 *
@@ -2519,7 +2519,42 @@ ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
2519 return (1); 2519 return (1);
2520} 2520}
2521 2521
2522SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, 2522/*
2523 * This function needs to check if the ciphers required are actually available.
2524 */
2525const SSL_CIPHER *
2526ssl3_get_cipher_by_char(const unsigned char *p)
2527{
2528 const SSL_CIPHER *cp;
2529 unsigned long id;
2530 SSL_CIPHER c;
2531
2532 id = 0x03000000L | ((unsigned long)p[0] << 8L) | (unsigned long)p[1];
2533 c.id = id;
2534 cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
2535 if (cp == NULL || cp->valid == 0)
2536 return NULL;
2537 else
2538 return cp;
2539}
2540
2541int
2542ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p)
2543{
2544 long l;
2545
2546 if (p != NULL) {
2547 l = c->id;
2548 if ((l & 0xff000000) != 0x03000000)
2549 return (0);
2550 p[0] = ((unsigned char)(l >> 8L)) & 0xFF;
2551 p[1] = ((unsigned char)(l)) & 0xFF;
2552 }
2553 return (2);
2554}
2555
2556SSL_CIPHER *
2557ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
2523 STACK_OF(SSL_CIPHER) *srvr) 2558 STACK_OF(SSL_CIPHER) *srvr)
2524{ 2559{
2525 unsigned long alg_k, alg_a, mask_k, mask_a; 2560 unsigned long alg_k, alg_a, mask_k, mask_a;
diff --git a/src/lib/libssl/src/ssl/s3_meth.c b/src/lib/libssl/src/ssl/s3_meth.c
index 3435e529d9..8ad4efa7a8 100644
--- a/src/lib/libssl/src/ssl/s3_meth.c
+++ b/src/lib/libssl/src/ssl/s3_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_meth.c,v 1.12 2014/12/14 15:30:50 jsing Exp $ */ 1/* $OpenBSD: s3_meth.c,v 1.13 2015/02/06 08:30:23 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 *
@@ -83,6 +83,8 @@ const SSL_METHOD SSLv3_method_data = {
83 .ssl_dispatch_alert = ssl3_dispatch_alert, 83 .ssl_dispatch_alert = ssl3_dispatch_alert,
84 .ssl_ctrl = ssl3_ctrl, 84 .ssl_ctrl = ssl3_ctrl,
85 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 85 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
86 .get_cipher_by_char = ssl3_get_cipher_by_char,
87 .put_cipher_by_char = ssl3_put_cipher_by_char,
86 .ssl_pending = ssl3_pending, 88 .ssl_pending = ssl3_pending,
87 .num_ciphers = ssl3_num_ciphers, 89 .num_ciphers = ssl3_num_ciphers,
88 .get_cipher = ssl3_get_cipher, 90 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/src/ssl/s3_srvr.c b/src/lib/libssl/src/ssl/s3_srvr.c
index fd8f9aabab..e16eb6f5d0 100644
--- a/src/lib/libssl/src/ssl/s3_srvr.c
+++ b/src/lib/libssl/src/ssl/s3_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_srvr.c,v 1.96 2014/12/29 16:12:59 tedu Exp $ */ 1/* $OpenBSD: s3_srvr.c,v 1.97 2015/02/06 08:30:23 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 *
@@ -188,6 +188,8 @@ const SSL_METHOD SSLv3_server_method_data = {
188 .ssl_dispatch_alert = ssl3_dispatch_alert, 188 .ssl_dispatch_alert = ssl3_dispatch_alert,
189 .ssl_ctrl = ssl3_ctrl, 189 .ssl_ctrl = ssl3_ctrl,
190 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 190 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
191 .get_cipher_by_char = ssl3_get_cipher_by_char,
192 .put_cipher_by_char = ssl3_put_cipher_by_char,
191 .ssl_pending = ssl3_pending, 193 .ssl_pending = ssl3_pending,
192 .num_ciphers = ssl3_num_ciphers, 194 .num_ciphers = ssl3_num_ciphers,
193 .get_cipher = ssl3_get_cipher, 195 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h
index 275743a6a0..571786dcf6 100644
--- a/src/lib/libssl/src/ssl/ssl.h
+++ b/src/lib/libssl/src/ssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.79 2015/02/06 01:37:11 reyk Exp $ */ 1/* $OpenBSD: ssl.h,v 1.80 2015/02/06 08:30:23 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 *
@@ -418,6 +418,8 @@ struct ssl_method_st {
418 int (*ssl_dispatch_alert)(SSL *s); 418 int (*ssl_dispatch_alert)(SSL *s);
419 long (*ssl_ctrl)(SSL *s, int cmd, long larg, void *parg); 419 long (*ssl_ctrl)(SSL *s, int cmd, long larg, void *parg);
420 long (*ssl_ctx_ctrl)(SSL_CTX *ctx, int cmd, long larg, void *parg); 420 long (*ssl_ctx_ctrl)(SSL_CTX *ctx, int cmd, long larg, void *parg);
421 const SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
422 int (*put_cipher_by_char)(const SSL_CIPHER *cipher, unsigned char *ptr);
421 int (*ssl_pending)(const SSL *s); 423 int (*ssl_pending)(const SSL *s);
422 int (*num_ciphers)(void); 424 int (*num_ciphers)(void);
423 const SSL_CIPHER *(*get_cipher)(unsigned ncipher); 425 const SSL_CIPHER *(*get_cipher)(unsigned ncipher);
diff --git a/src/lib/libssl/src/ssl/ssl_locl.h b/src/lib/libssl/src/ssl/ssl_locl.h
index 3312aebaad..94c0d4a83d 100644
--- a/src/lib/libssl/src/ssl/ssl_locl.h
+++ b/src/lib/libssl/src/ssl/ssl_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_locl.h,v 1.84 2014/12/15 00:46:53 doug Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.85 2015/02/06 08:30:23 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 *
@@ -595,6 +595,8 @@ STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s);
595int ssl_verify_alarm_type(long type); 595int ssl_verify_alarm_type(long type);
596void ssl_load_ciphers(void); 596void ssl_load_ciphers(void);
597 597
598const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p);
599int ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p);
598int ssl3_init_finished_mac(SSL *s); 600int ssl3_init_finished_mac(SSL *s);
599int ssl3_send_server_certificate(SSL *s); 601int ssl3_send_server_certificate(SSL *s);
600int ssl3_send_newsession_ticket(SSL *s); 602int ssl3_send_newsession_ticket(SSL *s);
diff --git a/src/lib/libssl/src/ssl/t1_clnt.c b/src/lib/libssl/src/ssl/t1_clnt.c
index b2adbaee73..0dc41af5b3 100644
--- a/src/lib/libssl/src/ssl/t1_clnt.c
+++ b/src/lib/libssl/src/ssl/t1_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_clnt.c,v 1.16 2014/11/16 14:12:47 jsing Exp $ */ 1/* $OpenBSD: t1_clnt.c,v 1.17 2015/02/06 08:30:23 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 *
@@ -85,6 +85,8 @@ const SSL_METHOD TLSv1_client_method_data = {
85 .ssl_dispatch_alert = ssl3_dispatch_alert, 85 .ssl_dispatch_alert = ssl3_dispatch_alert,
86 .ssl_ctrl = ssl3_ctrl, 86 .ssl_ctrl = ssl3_ctrl,
87 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 87 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
88 .get_cipher_by_char = ssl3_get_cipher_by_char,
89 .put_cipher_by_char = ssl3_put_cipher_by_char,
88 .ssl_pending = ssl3_pending, 90 .ssl_pending = ssl3_pending,
89 .num_ciphers = ssl3_num_ciphers, 91 .num_ciphers = ssl3_num_ciphers,
90 .get_cipher = ssl3_get_cipher, 92 .get_cipher = ssl3_get_cipher,
@@ -115,6 +117,8 @@ const SSL_METHOD TLSv1_1_client_method_data = {
115 .ssl_dispatch_alert = ssl3_dispatch_alert, 117 .ssl_dispatch_alert = ssl3_dispatch_alert,
116 .ssl_ctrl = ssl3_ctrl, 118 .ssl_ctrl = ssl3_ctrl,
117 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 119 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
120 .get_cipher_by_char = ssl3_get_cipher_by_char,
121 .put_cipher_by_char = ssl3_put_cipher_by_char,
118 .ssl_pending = ssl3_pending, 122 .ssl_pending = ssl3_pending,
119 .num_ciphers = ssl3_num_ciphers, 123 .num_ciphers = ssl3_num_ciphers,
120 .get_cipher = ssl3_get_cipher, 124 .get_cipher = ssl3_get_cipher,
@@ -145,6 +149,8 @@ const SSL_METHOD TLSv1_2_client_method_data = {
145 .ssl_dispatch_alert = ssl3_dispatch_alert, 149 .ssl_dispatch_alert = ssl3_dispatch_alert,
146 .ssl_ctrl = ssl3_ctrl, 150 .ssl_ctrl = ssl3_ctrl,
147 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 151 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
152 .get_cipher_by_char = ssl3_get_cipher_by_char,
153 .put_cipher_by_char = ssl3_put_cipher_by_char,
148 .ssl_pending = ssl3_pending, 154 .ssl_pending = ssl3_pending,
149 .num_ciphers = ssl3_num_ciphers, 155 .num_ciphers = ssl3_num_ciphers,
150 .get_cipher = ssl3_get_cipher, 156 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/src/ssl/t1_meth.c b/src/lib/libssl/src/ssl/t1_meth.c
index 71d957fca9..48341525d8 100644
--- a/src/lib/libssl/src/ssl/t1_meth.c
+++ b/src/lib/libssl/src/ssl/t1_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_meth.c,v 1.15 2014/12/14 15:30:50 jsing Exp $ */ 1/* $OpenBSD: t1_meth.c,v 1.16 2015/02/06 08:30:23 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 *
@@ -83,6 +83,8 @@ const SSL_METHOD TLSv1_method_data = {
83 .ssl_dispatch_alert = ssl3_dispatch_alert, 83 .ssl_dispatch_alert = ssl3_dispatch_alert,
84 .ssl_ctrl = ssl3_ctrl, 84 .ssl_ctrl = ssl3_ctrl,
85 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 85 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
86 .get_cipher_by_char = ssl3_get_cipher_by_char,
87 .put_cipher_by_char = ssl3_put_cipher_by_char,
86 .ssl_pending = ssl3_pending, 88 .ssl_pending = ssl3_pending,
87 .num_ciphers = ssl3_num_ciphers, 89 .num_ciphers = ssl3_num_ciphers,
88 .get_cipher = ssl3_get_cipher, 90 .get_cipher = ssl3_get_cipher,
@@ -113,6 +115,8 @@ const SSL_METHOD TLSv1_1_method_data = {
113 .ssl_dispatch_alert = ssl3_dispatch_alert, 115 .ssl_dispatch_alert = ssl3_dispatch_alert,
114 .ssl_ctrl = ssl3_ctrl, 116 .ssl_ctrl = ssl3_ctrl,
115 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 117 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
118 .get_cipher_by_char = ssl3_get_cipher_by_char,
119 .put_cipher_by_char = ssl3_put_cipher_by_char,
116 .ssl_pending = ssl3_pending, 120 .ssl_pending = ssl3_pending,
117 .num_ciphers = ssl3_num_ciphers, 121 .num_ciphers = ssl3_num_ciphers,
118 .get_cipher = ssl3_get_cipher, 122 .get_cipher = ssl3_get_cipher,
@@ -143,6 +147,8 @@ const SSL_METHOD TLSv1_2_method_data = {
143 .ssl_dispatch_alert = ssl3_dispatch_alert, 147 .ssl_dispatch_alert = ssl3_dispatch_alert,
144 .ssl_ctrl = ssl3_ctrl, 148 .ssl_ctrl = ssl3_ctrl,
145 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 149 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
150 .get_cipher_by_char = ssl3_get_cipher_by_char,
151 .put_cipher_by_char = ssl3_put_cipher_by_char,
146 .ssl_pending = ssl3_pending, 152 .ssl_pending = ssl3_pending,
147 .num_ciphers = ssl3_num_ciphers, 153 .num_ciphers = ssl3_num_ciphers,
148 .get_cipher = ssl3_get_cipher, 154 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/src/ssl/t1_srvr.c b/src/lib/libssl/src/ssl/t1_srvr.c
index 4dedc727e2..3c6ac541f8 100644
--- a/src/lib/libssl/src/ssl/t1_srvr.c
+++ b/src/lib/libssl/src/ssl/t1_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_srvr.c,v 1.17 2014/12/14 15:30:50 jsing Exp $ */ 1/* $OpenBSD: t1_srvr.c,v 1.18 2015/02/06 08:30:23 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 *
@@ -86,6 +86,8 @@ const SSL_METHOD TLSv1_server_method_data = {
86 .ssl_dispatch_alert = ssl3_dispatch_alert, 86 .ssl_dispatch_alert = ssl3_dispatch_alert,
87 .ssl_ctrl = ssl3_ctrl, 87 .ssl_ctrl = ssl3_ctrl,
88 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 88 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
89 .get_cipher_by_char = ssl3_get_cipher_by_char,
90 .put_cipher_by_char = ssl3_put_cipher_by_char,
89 .ssl_pending = ssl3_pending, 91 .ssl_pending = ssl3_pending,
90 .num_ciphers = ssl3_num_ciphers, 92 .num_ciphers = ssl3_num_ciphers,
91 .get_cipher = ssl3_get_cipher, 93 .get_cipher = ssl3_get_cipher,
@@ -116,6 +118,8 @@ const SSL_METHOD TLSv1_1_server_method_data = {
116 .ssl_dispatch_alert = ssl3_dispatch_alert, 118 .ssl_dispatch_alert = ssl3_dispatch_alert,
117 .ssl_ctrl = ssl3_ctrl, 119 .ssl_ctrl = ssl3_ctrl,
118 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 120 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
121 .get_cipher_by_char = ssl3_get_cipher_by_char,
122 .put_cipher_by_char = ssl3_put_cipher_by_char,
119 .ssl_pending = ssl3_pending, 123 .ssl_pending = ssl3_pending,
120 .num_ciphers = ssl3_num_ciphers, 124 .num_ciphers = ssl3_num_ciphers,
121 .get_cipher = ssl3_get_cipher, 125 .get_cipher = ssl3_get_cipher,
@@ -146,6 +150,8 @@ const SSL_METHOD TLSv1_2_server_method_data = {
146 .ssl_dispatch_alert = ssl3_dispatch_alert, 150 .ssl_dispatch_alert = ssl3_dispatch_alert,
147 .ssl_ctrl = ssl3_ctrl, 151 .ssl_ctrl = ssl3_ctrl,
148 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 152 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
153 .get_cipher_by_char = ssl3_get_cipher_by_char,
154 .put_cipher_by_char = ssl3_put_cipher_by_char,
149 .ssl_pending = ssl3_pending, 155 .ssl_pending = ssl3_pending,
150 .num_ciphers = ssl3_num_ciphers, 156 .num_ciphers = ssl3_num_ciphers,
151 .get_cipher = ssl3_get_cipher, 157 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index 275743a6a0..571786dcf6 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.79 2015/02/06 01:37:11 reyk Exp $ */ 1/* $OpenBSD: ssl.h,v 1.80 2015/02/06 08:30:23 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 *
@@ -418,6 +418,8 @@ struct ssl_method_st {
418 int (*ssl_dispatch_alert)(SSL *s); 418 int (*ssl_dispatch_alert)(SSL *s);
419 long (*ssl_ctrl)(SSL *s, int cmd, long larg, void *parg); 419 long (*ssl_ctrl)(SSL *s, int cmd, long larg, void *parg);
420 long (*ssl_ctx_ctrl)(SSL_CTX *ctx, int cmd, long larg, void *parg); 420 long (*ssl_ctx_ctrl)(SSL_CTX *ctx, int cmd, long larg, void *parg);
421 const SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
422 int (*put_cipher_by_char)(const SSL_CIPHER *cipher, unsigned char *ptr);
421 int (*ssl_pending)(const SSL *s); 423 int (*ssl_pending)(const SSL *s);
422 int (*num_ciphers)(void); 424 int (*num_ciphers)(void);
423 const SSL_CIPHER *(*get_cipher)(unsigned ncipher); 425 const SSL_CIPHER *(*get_cipher)(unsigned ncipher);
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 3312aebaad..94c0d4a83d 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_locl.h,v 1.84 2014/12/15 00:46:53 doug Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.85 2015/02/06 08:30:23 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 *
@@ -595,6 +595,8 @@ STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s);
595int ssl_verify_alarm_type(long type); 595int ssl_verify_alarm_type(long type);
596void ssl_load_ciphers(void); 596void ssl_load_ciphers(void);
597 597
598const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p);
599int ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p);
598int ssl3_init_finished_mac(SSL *s); 600int ssl3_init_finished_mac(SSL *s);
599int ssl3_send_server_certificate(SSL *s); 601int ssl3_send_server_certificate(SSL *s);
600int ssl3_send_newsession_ticket(SSL *s); 602int ssl3_send_newsession_ticket(SSL *s);
diff --git a/src/lib/libssl/t1_clnt.c b/src/lib/libssl/t1_clnt.c
index b2adbaee73..0dc41af5b3 100644
--- a/src/lib/libssl/t1_clnt.c
+++ b/src/lib/libssl/t1_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_clnt.c,v 1.16 2014/11/16 14:12:47 jsing Exp $ */ 1/* $OpenBSD: t1_clnt.c,v 1.17 2015/02/06 08:30:23 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 *
@@ -85,6 +85,8 @@ const SSL_METHOD TLSv1_client_method_data = {
85 .ssl_dispatch_alert = ssl3_dispatch_alert, 85 .ssl_dispatch_alert = ssl3_dispatch_alert,
86 .ssl_ctrl = ssl3_ctrl, 86 .ssl_ctrl = ssl3_ctrl,
87 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 87 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
88 .get_cipher_by_char = ssl3_get_cipher_by_char,
89 .put_cipher_by_char = ssl3_put_cipher_by_char,
88 .ssl_pending = ssl3_pending, 90 .ssl_pending = ssl3_pending,
89 .num_ciphers = ssl3_num_ciphers, 91 .num_ciphers = ssl3_num_ciphers,
90 .get_cipher = ssl3_get_cipher, 92 .get_cipher = ssl3_get_cipher,
@@ -115,6 +117,8 @@ const SSL_METHOD TLSv1_1_client_method_data = {
115 .ssl_dispatch_alert = ssl3_dispatch_alert, 117 .ssl_dispatch_alert = ssl3_dispatch_alert,
116 .ssl_ctrl = ssl3_ctrl, 118 .ssl_ctrl = ssl3_ctrl,
117 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 119 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
120 .get_cipher_by_char = ssl3_get_cipher_by_char,
121 .put_cipher_by_char = ssl3_put_cipher_by_char,
118 .ssl_pending = ssl3_pending, 122 .ssl_pending = ssl3_pending,
119 .num_ciphers = ssl3_num_ciphers, 123 .num_ciphers = ssl3_num_ciphers,
120 .get_cipher = ssl3_get_cipher, 124 .get_cipher = ssl3_get_cipher,
@@ -145,6 +149,8 @@ const SSL_METHOD TLSv1_2_client_method_data = {
145 .ssl_dispatch_alert = ssl3_dispatch_alert, 149 .ssl_dispatch_alert = ssl3_dispatch_alert,
146 .ssl_ctrl = ssl3_ctrl, 150 .ssl_ctrl = ssl3_ctrl,
147 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 151 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
152 .get_cipher_by_char = ssl3_get_cipher_by_char,
153 .put_cipher_by_char = ssl3_put_cipher_by_char,
148 .ssl_pending = ssl3_pending, 154 .ssl_pending = ssl3_pending,
149 .num_ciphers = ssl3_num_ciphers, 155 .num_ciphers = ssl3_num_ciphers,
150 .get_cipher = ssl3_get_cipher, 156 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/t1_meth.c b/src/lib/libssl/t1_meth.c
index 71d957fca9..48341525d8 100644
--- a/src/lib/libssl/t1_meth.c
+++ b/src/lib/libssl/t1_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_meth.c,v 1.15 2014/12/14 15:30:50 jsing Exp $ */ 1/* $OpenBSD: t1_meth.c,v 1.16 2015/02/06 08:30:23 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 *
@@ -83,6 +83,8 @@ const SSL_METHOD TLSv1_method_data = {
83 .ssl_dispatch_alert = ssl3_dispatch_alert, 83 .ssl_dispatch_alert = ssl3_dispatch_alert,
84 .ssl_ctrl = ssl3_ctrl, 84 .ssl_ctrl = ssl3_ctrl,
85 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 85 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
86 .get_cipher_by_char = ssl3_get_cipher_by_char,
87 .put_cipher_by_char = ssl3_put_cipher_by_char,
86 .ssl_pending = ssl3_pending, 88 .ssl_pending = ssl3_pending,
87 .num_ciphers = ssl3_num_ciphers, 89 .num_ciphers = ssl3_num_ciphers,
88 .get_cipher = ssl3_get_cipher, 90 .get_cipher = ssl3_get_cipher,
@@ -113,6 +115,8 @@ const SSL_METHOD TLSv1_1_method_data = {
113 .ssl_dispatch_alert = ssl3_dispatch_alert, 115 .ssl_dispatch_alert = ssl3_dispatch_alert,
114 .ssl_ctrl = ssl3_ctrl, 116 .ssl_ctrl = ssl3_ctrl,
115 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 117 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
118 .get_cipher_by_char = ssl3_get_cipher_by_char,
119 .put_cipher_by_char = ssl3_put_cipher_by_char,
116 .ssl_pending = ssl3_pending, 120 .ssl_pending = ssl3_pending,
117 .num_ciphers = ssl3_num_ciphers, 121 .num_ciphers = ssl3_num_ciphers,
118 .get_cipher = ssl3_get_cipher, 122 .get_cipher = ssl3_get_cipher,
@@ -143,6 +147,8 @@ const SSL_METHOD TLSv1_2_method_data = {
143 .ssl_dispatch_alert = ssl3_dispatch_alert, 147 .ssl_dispatch_alert = ssl3_dispatch_alert,
144 .ssl_ctrl = ssl3_ctrl, 148 .ssl_ctrl = ssl3_ctrl,
145 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 149 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
150 .get_cipher_by_char = ssl3_get_cipher_by_char,
151 .put_cipher_by_char = ssl3_put_cipher_by_char,
146 .ssl_pending = ssl3_pending, 152 .ssl_pending = ssl3_pending,
147 .num_ciphers = ssl3_num_ciphers, 153 .num_ciphers = ssl3_num_ciphers,
148 .get_cipher = ssl3_get_cipher, 154 .get_cipher = ssl3_get_cipher,
diff --git a/src/lib/libssl/t1_srvr.c b/src/lib/libssl/t1_srvr.c
index 4dedc727e2..3c6ac541f8 100644
--- a/src/lib/libssl/t1_srvr.c
+++ b/src/lib/libssl/t1_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_srvr.c,v 1.17 2014/12/14 15:30:50 jsing Exp $ */ 1/* $OpenBSD: t1_srvr.c,v 1.18 2015/02/06 08:30:23 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 *
@@ -86,6 +86,8 @@ const SSL_METHOD TLSv1_server_method_data = {
86 .ssl_dispatch_alert = ssl3_dispatch_alert, 86 .ssl_dispatch_alert = ssl3_dispatch_alert,
87 .ssl_ctrl = ssl3_ctrl, 87 .ssl_ctrl = ssl3_ctrl,
88 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 88 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
89 .get_cipher_by_char = ssl3_get_cipher_by_char,
90 .put_cipher_by_char = ssl3_put_cipher_by_char,
89 .ssl_pending = ssl3_pending, 91 .ssl_pending = ssl3_pending,
90 .num_ciphers = ssl3_num_ciphers, 92 .num_ciphers = ssl3_num_ciphers,
91 .get_cipher = ssl3_get_cipher, 93 .get_cipher = ssl3_get_cipher,
@@ -116,6 +118,8 @@ const SSL_METHOD TLSv1_1_server_method_data = {
116 .ssl_dispatch_alert = ssl3_dispatch_alert, 118 .ssl_dispatch_alert = ssl3_dispatch_alert,
117 .ssl_ctrl = ssl3_ctrl, 119 .ssl_ctrl = ssl3_ctrl,
118 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 120 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
121 .get_cipher_by_char = ssl3_get_cipher_by_char,
122 .put_cipher_by_char = ssl3_put_cipher_by_char,
119 .ssl_pending = ssl3_pending, 123 .ssl_pending = ssl3_pending,
120 .num_ciphers = ssl3_num_ciphers, 124 .num_ciphers = ssl3_num_ciphers,
121 .get_cipher = ssl3_get_cipher, 125 .get_cipher = ssl3_get_cipher,
@@ -146,6 +150,8 @@ const SSL_METHOD TLSv1_2_server_method_data = {
146 .ssl_dispatch_alert = ssl3_dispatch_alert, 150 .ssl_dispatch_alert = ssl3_dispatch_alert,
147 .ssl_ctrl = ssl3_ctrl, 151 .ssl_ctrl = ssl3_ctrl,
148 .ssl_ctx_ctrl = ssl3_ctx_ctrl, 152 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
153 .get_cipher_by_char = ssl3_get_cipher_by_char,
154 .put_cipher_by_char = ssl3_put_cipher_by_char,
149 .ssl_pending = ssl3_pending, 155 .ssl_pending = ssl3_pending,
150 .num_ciphers = ssl3_num_ciphers, 156 .num_ciphers = ssl3_num_ciphers,
151 .get_cipher = ssl3_get_cipher, 157 .get_cipher = ssl3_get_cipher,