summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_ciph.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-07-12 07:52:36 +0000
committerguenther <guenther@openbsd.org>2014-07-12 07:52:36 +0000
commit5b791294fde6e55e7844f65ac20ecf85034abe1f (patch)
tree53468885a61563e85813640fdaf6451f7f606864 /lib/libssl/ssl_ciph.c
parentessentially mechanical conversion of softraid rebuild from (diff)
downloadwireguard-openbsd-5b791294fde6e55e7844f65ac20ecf85034abe1f.tar.xz
wireguard-openbsd-5b791294fde6e55e7844f65ac20ecf85034abe1f.zip
Make disabling last cipher work.
From Thijs Alkemade via OpenSSL trunk ok miod@
Diffstat (limited to 'lib/libssl/ssl_ciph.c')
-rw-r--r--lib/libssl/ssl_ciph.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libssl/ssl_ciph.c b/lib/libssl/ssl_ciph.c
index a79eafc9cf8..9df4f8a0c98 100644
--- a/lib/libssl/ssl_ciph.c
+++ b/lib/libssl/ssl_ciph.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_ciph.c,v 1.63 2014/07/11 09:24:44 beck Exp $ */
+/* $OpenBSD: ssl_ciph.c,v 1.64 2014/07/12 07:52:36 guenther Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1062,7 +1062,7 @@ ssl_cipher_apply_rule(unsigned long cipher_id, unsigned long alg_mkey,
unsigned long alg_ssl, unsigned long algo_strength,
int rule, int strength_bits, CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p)
{
- CIPHER_ORDER *head, *tail, *curr, *curr2, *last;
+ CIPHER_ORDER *head, *tail, *curr, *next, *last;
const SSL_CIPHER *cp;
int reverse = 0;
@@ -1074,19 +1074,19 @@ ssl_cipher_apply_rule(unsigned long cipher_id, unsigned long alg_mkey,
tail = *tail_p;
if (reverse) {
- curr = tail;
+ next = tail;
last = head;
} else {
- curr = head;
+ next = head;
last = tail;
}
- curr2 = curr;
+ curr = NULL;
for (;;) {
- if ((curr == NULL)
- || (curr == last)) break;
- curr = curr2;
- curr2 = reverse ? curr->prev : curr->next;
+ if (curr == last)
+ break;
+ curr = next;
+ next = reverse ? curr->prev : curr->next;
cp = curr->cipher;