1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

Bring back the horrible API that is get_cipher_by_char/put_cipher_by_char.

This API was intended to be an internal only, however like many things in
OpenSSL, it is exposed externally and parts of the software ecosystem are
now using it since there is no real alternative within the public API.

ok doug@, tedu@ and reluctantly miod@
This commit is contained in:
jsing 2015-02-06 08:30:23 +00:00
parent 33f66565dd
commit bdb3203319
28 changed files with 176 additions and 30 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: d1_clnt.c,v 1.41 2014/12/14 16:19:38 jsing Exp $ */
/* $OpenBSD: d1_clnt.c,v 1.42 2015/02/06 08:30:23 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@ -146,6 +146,8 @@ const SSL_METHOD DTLSv1_client_method_data = {
.ssl_dispatch_alert = dtls1_dispatch_alert,
.ssl_ctrl = dtls1_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = dtls1_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: d1_meth.c,v 1.8 2014/12/14 15:30:50 jsing Exp $ */
/* $OpenBSD: d1_meth.c,v 1.9 2015/02/06 08:30:23 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@ -84,6 +84,8 @@ const SSL_METHOD DTLSv1_method_data = {
.ssl_dispatch_alert = dtls1_dispatch_alert,
.ssl_ctrl = dtls1_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = dtls1_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: d1_srvr.c,v 1.46 2014/12/15 00:46:53 doug Exp $ */
/* $OpenBSD: d1_srvr.c,v 1.47 2015/02/06 08:30:23 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@ -147,6 +147,8 @@ const SSL_METHOD DTLSv1_server_method_data = {
.ssl_dispatch_alert = dtls1_dispatch_alert,
.ssl_ctrl = dtls1_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = dtls1_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s23_clnt.c,v 1.35 2014/12/10 15:43:31 jsing Exp $ */
/* $OpenBSD: s23_clnt.c,v 1.36 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -140,6 +140,8 @@ const SSL_METHOD SSLv23_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl_undefined_const_function,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s23_srvr.c,v 1.37 2014/12/10 15:43:31 jsing Exp $ */
/* $OpenBSD: s23_srvr.c,v 1.38 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -139,6 +139,8 @@ const SSL_METHOD SSLv23_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl_undefined_const_function,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s3_clnt.c,v 1.104 2015/01/23 14:40:59 jsing Exp $ */
/* $OpenBSD: s3_clnt.c,v 1.105 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -188,6 +188,8 @@ const SSL_METHOD SSLv3_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s3_lib.c,v 1.91 2014/12/16 05:47:28 miod Exp $ */
/* $OpenBSD: s3_lib.c,v 1.92 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -2519,7 +2519,42 @@ ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
return (1);
}
SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
/*
* This function needs to check if the ciphers required are actually available.
*/
const SSL_CIPHER *
ssl3_get_cipher_by_char(const unsigned char *p)
{
const SSL_CIPHER *cp;
unsigned long id;
SSL_CIPHER c;
id = 0x03000000L | ((unsigned long)p[0] << 8L) | (unsigned long)p[1];
c.id = id;
cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
if (cp == NULL || cp->valid == 0)
return NULL;
else
return cp;
}
int
ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p)
{
long l;
if (p != NULL) {
l = c->id;
if ((l & 0xff000000) != 0x03000000)
return (0);
p[0] = ((unsigned char)(l >> 8L)) & 0xFF;
p[1] = ((unsigned char)(l)) & 0xFF;
}
return (2);
}
SSL_CIPHER *
ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
STACK_OF(SSL_CIPHER) *srvr)
{
unsigned long alg_k, alg_a, mask_k, mask_a;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s3_srvr.c,v 1.96 2014/12/29 16:12:59 tedu Exp $ */
/* $OpenBSD: s3_srvr.c,v 1.97 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -188,6 +188,8 @@ const SSL_METHOD SSLv3_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: d1_clnt.c,v 1.41 2014/12/14 16:19:38 jsing Exp $ */
/* $OpenBSD: d1_clnt.c,v 1.42 2015/02/06 08:30:23 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@ -146,6 +146,8 @@ const SSL_METHOD DTLSv1_client_method_data = {
.ssl_dispatch_alert = dtls1_dispatch_alert,
.ssl_ctrl = dtls1_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = dtls1_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: d1_meth.c,v 1.8 2014/12/14 15:30:50 jsing Exp $ */
/* $OpenBSD: d1_meth.c,v 1.9 2015/02/06 08:30:23 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@ -84,6 +84,8 @@ const SSL_METHOD DTLSv1_method_data = {
.ssl_dispatch_alert = dtls1_dispatch_alert,
.ssl_ctrl = dtls1_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = dtls1_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: d1_srvr.c,v 1.46 2014/12/15 00:46:53 doug Exp $ */
/* $OpenBSD: d1_srvr.c,v 1.47 2015/02/06 08:30:23 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@ -147,6 +147,8 @@ const SSL_METHOD DTLSv1_server_method_data = {
.ssl_dispatch_alert = dtls1_dispatch_alert,
.ssl_ctrl = dtls1_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = dtls1_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s23_clnt.c,v 1.35 2014/12/10 15:43:31 jsing Exp $ */
/* $OpenBSD: s23_clnt.c,v 1.36 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -140,6 +140,8 @@ const SSL_METHOD SSLv23_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl_undefined_const_function,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s23_meth.c,v 1.16 2014/11/16 14:12:47 jsing Exp $ */
/* $OpenBSD: s23_meth.c,v 1.17 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -83,6 +83,8 @@ const SSL_METHOD SSLv23_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl_undefined_const_function,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s23_srvr.c,v 1.37 2014/12/10 15:43:31 jsing Exp $ */
/* $OpenBSD: s23_srvr.c,v 1.38 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -139,6 +139,8 @@ const SSL_METHOD SSLv23_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl_undefined_const_function,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s3_clnt.c,v 1.104 2015/01/23 14:40:59 jsing Exp $ */
/* $OpenBSD: s3_clnt.c,v 1.105 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -188,6 +188,8 @@ const SSL_METHOD SSLv3_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s3_lib.c,v 1.91 2014/12/16 05:47:28 miod Exp $ */
/* $OpenBSD: s3_lib.c,v 1.92 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -2519,7 +2519,42 @@ ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
return (1);
}
SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
/*
* This function needs to check if the ciphers required are actually available.
*/
const SSL_CIPHER *
ssl3_get_cipher_by_char(const unsigned char *p)
{
const SSL_CIPHER *cp;
unsigned long id;
SSL_CIPHER c;
id = 0x03000000L | ((unsigned long)p[0] << 8L) | (unsigned long)p[1];
c.id = id;
cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
if (cp == NULL || cp->valid == 0)
return NULL;
else
return cp;
}
int
ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p)
{
long l;
if (p != NULL) {
l = c->id;
if ((l & 0xff000000) != 0x03000000)
return (0);
p[0] = ((unsigned char)(l >> 8L)) & 0xFF;
p[1] = ((unsigned char)(l)) & 0xFF;
}
return (2);
}
SSL_CIPHER *
ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
STACK_OF(SSL_CIPHER) *srvr)
{
unsigned long alg_k, alg_a, mask_k, mask_a;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s3_meth.c,v 1.12 2014/12/14 15:30:50 jsing Exp $ */
/* $OpenBSD: s3_meth.c,v 1.13 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -83,6 +83,8 @@ const SSL_METHOD SSLv3_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: s3_srvr.c,v 1.96 2014/12/29 16:12:59 tedu Exp $ */
/* $OpenBSD: s3_srvr.c,v 1.97 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -188,6 +188,8 @@ const SSL_METHOD SSLv3_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ssl.h,v 1.79 2015/02/06 01:37:11 reyk Exp $ */
/* $OpenBSD: ssl.h,v 1.80 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -418,6 +418,8 @@ struct ssl_method_st {
int (*ssl_dispatch_alert)(SSL *s);
long (*ssl_ctrl)(SSL *s, int cmd, long larg, void *parg);
long (*ssl_ctx_ctrl)(SSL_CTX *ctx, int cmd, long larg, void *parg);
const SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
int (*put_cipher_by_char)(const SSL_CIPHER *cipher, unsigned char *ptr);
int (*ssl_pending)(const SSL *s);
int (*num_ciphers)(void);
const SSL_CIPHER *(*get_cipher)(unsigned ncipher);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ssl_locl.h,v 1.84 2014/12/15 00:46:53 doug Exp $ */
/* $OpenBSD: ssl_locl.h,v 1.85 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -595,6 +595,8 @@ STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s);
int ssl_verify_alarm_type(long type);
void ssl_load_ciphers(void);
const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p);
int ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p);
int ssl3_init_finished_mac(SSL *s);
int ssl3_send_server_certificate(SSL *s);
int ssl3_send_newsession_ticket(SSL *s);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: t1_clnt.c,v 1.16 2014/11/16 14:12:47 jsing Exp $ */
/* $OpenBSD: t1_clnt.c,v 1.17 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -85,6 +85,8 @@ const SSL_METHOD TLSv1_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -115,6 +117,8 @@ const SSL_METHOD TLSv1_1_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -145,6 +149,8 @@ const SSL_METHOD TLSv1_2_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: t1_meth.c,v 1.15 2014/12/14 15:30:50 jsing Exp $ */
/* $OpenBSD: t1_meth.c,v 1.16 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -83,6 +83,8 @@ const SSL_METHOD TLSv1_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -113,6 +115,8 @@ const SSL_METHOD TLSv1_1_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -143,6 +147,8 @@ const SSL_METHOD TLSv1_2_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: t1_srvr.c,v 1.17 2014/12/14 15:30:50 jsing Exp $ */
/* $OpenBSD: t1_srvr.c,v 1.18 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -86,6 +86,8 @@ const SSL_METHOD TLSv1_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -116,6 +118,8 @@ const SSL_METHOD TLSv1_1_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -146,6 +150,8 @@ const SSL_METHOD TLSv1_2_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ssl.h,v 1.79 2015/02/06 01:37:11 reyk Exp $ */
/* $OpenBSD: ssl.h,v 1.80 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -418,6 +418,8 @@ struct ssl_method_st {
int (*ssl_dispatch_alert)(SSL *s);
long (*ssl_ctrl)(SSL *s, int cmd, long larg, void *parg);
long (*ssl_ctx_ctrl)(SSL_CTX *ctx, int cmd, long larg, void *parg);
const SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
int (*put_cipher_by_char)(const SSL_CIPHER *cipher, unsigned char *ptr);
int (*ssl_pending)(const SSL *s);
int (*num_ciphers)(void);
const SSL_CIPHER *(*get_cipher)(unsigned ncipher);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ssl_locl.h,v 1.84 2014/12/15 00:46:53 doug Exp $ */
/* $OpenBSD: ssl_locl.h,v 1.85 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -595,6 +595,8 @@ STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s);
int ssl_verify_alarm_type(long type);
void ssl_load_ciphers(void);
const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p);
int ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p);
int ssl3_init_finished_mac(SSL *s);
int ssl3_send_server_certificate(SSL *s);
int ssl3_send_newsession_ticket(SSL *s);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: t1_clnt.c,v 1.16 2014/11/16 14:12:47 jsing Exp $ */
/* $OpenBSD: t1_clnt.c,v 1.17 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -85,6 +85,8 @@ const SSL_METHOD TLSv1_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -115,6 +117,8 @@ const SSL_METHOD TLSv1_1_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -145,6 +149,8 @@ const SSL_METHOD TLSv1_2_client_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: t1_meth.c,v 1.15 2014/12/14 15:30:50 jsing Exp $ */
/* $OpenBSD: t1_meth.c,v 1.16 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -83,6 +83,8 @@ const SSL_METHOD TLSv1_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -113,6 +115,8 @@ const SSL_METHOD TLSv1_1_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -143,6 +147,8 @@ const SSL_METHOD TLSv1_2_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: t1_srvr.c,v 1.17 2014/12/14 15:30:50 jsing Exp $ */
/* $OpenBSD: t1_srvr.c,v 1.18 2015/02/06 08:30:23 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@ -86,6 +86,8 @@ const SSL_METHOD TLSv1_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -116,6 +118,8 @@ const SSL_METHOD TLSv1_1_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,
@ -146,6 +150,8 @@ const SSL_METHOD TLSv1_2_server_method_data = {
.ssl_dispatch_alert = ssl3_dispatch_alert,
.ssl_ctrl = ssl3_ctrl,
.ssl_ctx_ctrl = ssl3_ctx_ctrl,
.get_cipher_by_char = ssl3_get_cipher_by_char,
.put_cipher_by_char = ssl3_put_cipher_by_char,
.ssl_pending = ssl3_pending,
.num_ciphers = ssl3_num_ciphers,
.get_cipher = ssl3_get_cipher,