summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libssl/ssl_ciph.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c
index bbae6a63d9..3cbf368ad3 100644
--- a/src/lib/libssl/ssl_ciph.c
+++ b/src/lib/libssl/ssl_ciph.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_ciph.c,v 1.106 2018/11/07 01:53:36 jsing Exp $ */ 1/* $OpenBSD: ssl_ciph.c,v 1.107 2019/03/24 17:10:54 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 *
@@ -921,6 +921,9 @@ ssl_cipher_apply_rule(unsigned long cipher_id, unsigned long alg_mkey,
921 921
922 cp = curr->cipher; 922 cp = curr->cipher;
923 923
924 if (cipher_id && cp->id != cipher_id)
925 continue;
926
924 /* 927 /*
925 * Selection criteria is either the value of strength_bits 928 * Selection criteria is either the value of strength_bits
926 * or the algorithms used. 929 * or the algorithms used.
@@ -929,7 +932,6 @@ ssl_cipher_apply_rule(unsigned long cipher_id, unsigned long alg_mkey,
929 if (strength_bits != cp->strength_bits) 932 if (strength_bits != cp->strength_bits)
930 continue; 933 continue;
931 } else { 934 } else {
932
933 if (alg_mkey && !(alg_mkey & cp->algorithm_mkey)) 935 if (alg_mkey && !(alg_mkey & cp->algorithm_mkey))
934 continue; 936 continue;
935 if (alg_auth && !(alg_auth & cp->algorithm_auth)) 937 if (alg_auth && !(alg_auth & cp->algorithm_auth))
@@ -944,7 +946,6 @@ ssl_cipher_apply_rule(unsigned long cipher_id, unsigned long alg_mkey,
944 continue; 946 continue;
945 } 947 }
946 948
947
948 /* add the cipher if it has not been added yet. */ 949 /* add the cipher if it has not been added yet. */
949 if (rule == CIPHER_ADD) { 950 if (rule == CIPHER_ADD) {
950 /* reverse == 0 */ 951 /* reverse == 0 */