diff options
author | Thijs Alkemade <me@thijsalkema.de> | 2014-07-02 03:32:19 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-07-02 03:32:50 +0100 |
commit | b2cb6dc1ef485631a614510c05f3d52447bf3c90 (patch) | |
tree | d68c4c2a8ffe6cfcd488aa384a86d78d6efc445c /ssl/ssl_ciph.c | |
parent | f87f88a69fdd1844dd1ed6c2998c488e3a9860bc (diff) |
Make disabling last cipher work.
(cherry picked from commit 7cb472bd0d0fd9da3d42bed1acc56c3a79fc5328)
Diffstat (limited to 'ssl/ssl_ciph.c')
-rw-r--r-- | ssl/ssl_ciph.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 58f58e0ee9..00a067b7be 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -926,7 +926,7 @@ static void ssl_cipher_apply_rule(unsigned long cipher_id, 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; @@ -943,21 +943,25 @@ static void ssl_cipher_apply_rule(unsigned long cipher_id, 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; + + if (curr == NULL) break; + + next = reverse ? curr->prev : curr->next; cp = curr->cipher; |