diff options
author | jsing <> | 2015-02-22 15:29:39 +0000 |
---|---|---|
committer | jsing <> | 2015-02-22 15:29:39 +0000 |
commit | 9ca594bf596db20fe3bf5a6e78e6df39cf9e10cd (patch) | |
tree | a94ffaa00e3d26b4ad4a0ff595c85623fe28ca45 | |
parent | 3f90621762c98f948fa98621db214a2faeca0885 (diff) | |
download | openbsd-9ca594bf596db20fe3bf5a6e78e6df39cf9e10cd.tar.gz openbsd-9ca594bf596db20fe3bf5a6e78e6df39cf9e10cd.tar.bz2 openbsd-9ca594bf596db20fe3bf5a6e78e6df39cf9e10cd.zip |
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.
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_lib.c | 10 | ||||
-rw-r--r-- | 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 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.99 2015/02/22 15:19:56 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.100 2015/02/22 15:29:39 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 | * |
@@ -1406,12 +1406,8 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, unsigned char *p) | |||
1406 | * If p == q, no ciphers and caller indicates an error. Otherwise | 1406 | * If p == q, no ciphers and caller indicates an error. Otherwise |
1407 | * add SCSV if not renegotiating. | 1407 | * add SCSV if not renegotiating. |
1408 | */ | 1408 | */ |
1409 | if (p != q && !s->renegotiate) { | 1409 | if (p != q && !s->renegotiate) |
1410 | static SSL_CIPHER scsv = { | 1410 | s2n(SSL3_CK_SCSV & SSL3_CK_VALUE_MASK, p); |
1411 | 0, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0 | ||
1412 | }; | ||
1413 | s2n(ssl3_cipher_get_value(&scsv), p); | ||
1414 | } | ||
1415 | 1411 | ||
1416 | return (p - q); | 1412 | return (p - q); |
1417 | } | 1413 | } |
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 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.99 2015/02/22 15:19:56 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.100 2015/02/22 15:29:39 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 | * |
@@ -1406,12 +1406,8 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, unsigned char *p) | |||
1406 | * If p == q, no ciphers and caller indicates an error. Otherwise | 1406 | * If p == q, no ciphers and caller indicates an error. Otherwise |
1407 | * add SCSV if not renegotiating. | 1407 | * add SCSV if not renegotiating. |
1408 | */ | 1408 | */ |
1409 | if (p != q && !s->renegotiate) { | 1409 | if (p != q && !s->renegotiate) |
1410 | static SSL_CIPHER scsv = { | 1410 | s2n(SSL3_CK_SCSV & SSL3_CK_VALUE_MASK, p); |
1411 | 0, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0 | ||
1412 | }; | ||
1413 | s2n(ssl3_cipher_get_value(&scsv), p); | ||
1414 | } | ||
1415 | 1411 | ||
1416 | return (p - q); | 1412 | return (p - q); |
1417 | } | 1413 | } |