summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-08-24 14:36:45 +0000
committerjsing <jsing@openbsd.org>2014-08-24 14:36:45 +0000
commitef88cf8e57c0c5ec5dabf3ef064c26ac8ec79f96 (patch)
treea798ea060f7e234e3fd9d0ae03642d95bfcf840d /lib/libssl/ssl_lib.c
parentreduce indentation of main program by one tab, no functional change (diff)
downloadwireguard-openbsd-ef88cf8e57c0c5ec5dabf3ef064c26ac8ec79f96.tar.xz
wireguard-openbsd-ef88cf8e57c0c5ec5dabf3ef064c26ac8ec79f96.zip
Replace the remaining uses of ssl3_put_cipher_by_char() with s2n and a
ssl3_cipher_get_value() helper function, which returns the cipher suite value for the given cipher. ok miod@
Diffstat (limited to 'lib/libssl/ssl_lib.c')
-rw-r--r--lib/libssl/ssl_lib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c
index e5dedf0ba4a..fad600a07eb 100644
--- a/lib/libssl/ssl_lib.c
+++ b/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_lib.c,v 1.82 2014/08/23 14:52:41 jsing Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.83 2014/08/24 14:36:45 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1384,7 +1384,8 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, unsigned char *p)
if ((c->algorithm_ssl & SSL_TLSV1_2) &&
(TLS1_get_client_version(s) < TLS1_2_VERSION))
continue;
- p += ssl3_put_cipher_by_char(c, p);
+
+ s2n(ssl3_cipher_get_value(c), p);
}
/*
@@ -1395,7 +1396,7 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *sk, unsigned char *p)
static SSL_CIPHER scsv = {
0, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
- p += ssl3_put_cipher_by_char(&scsv, p);
+ s2n(ssl3_cipher_get_value(&scsv), p);
}
return (p - q);