From 9ca594bf596db20fe3bf5a6e78e6df39cf9e10cd Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 22 Feb 2015 15:29:39 +0000 Subject: There is not much point constructing an SSL_CIPHER, then calling ssl3_cipher_get_value() to get the cipher suite value that we just put in the struct - use the cipher suite value directly. --- src/lib/libssl/src/ssl/ssl_lib.c | 10 +++------- src/lib/libssl/ssl_lib.c | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index 32feaa57e9..58835931d2 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.99 2015/02/22 15:19:56 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.100 2015/02/22 15:29:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1406,12 +1406,8 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, unsigned char *p) * If p == q, no ciphers and caller indicates an error. Otherwise * add SCSV if not renegotiating. */ - if (p != q && !s->renegotiate) { - static SSL_CIPHER scsv = { - 0, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - s2n(ssl3_cipher_get_value(&scsv), p); - } + if (p != q && !s->renegotiate) + s2n(SSL3_CK_SCSV & SSL3_CK_VALUE_MASK, p); return (p - q); } diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 32feaa57e9..58835931d2 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_lib.c,v 1.99 2015/02/22 15:19:56 jsing Exp $ */ +/* $OpenBSD: ssl_lib.c,v 1.100 2015/02/22 15:29:39 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1406,12 +1406,8 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, unsigned char *p) * If p == q, no ciphers and caller indicates an error. Otherwise * add SCSV if not renegotiating. */ - if (p != q && !s->renegotiate) { - static SSL_CIPHER scsv = { - 0, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - s2n(ssl3_cipher_get_value(&scsv), p); - } + if (p != q && !s->renegotiate) + s2n(SSL3_CK_SCSV & SSL3_CK_VALUE_MASK, p); return (p - q); } -- cgit v1.2.3-55-g6feb