summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_ciph.c
diff options
context:
space:
mode:
authormarkus <>2003-05-12 02:18:40 +0000
committermarkus <>2003-05-12 02:18:40 +0000
commitd4fcd82bb7f6d603bd61e19a81ba97337b89dfca (patch)
treed52e3a0f1f08f65ad283027e560e17ed0d720462 /src/lib/libssl/ssl_ciph.c
parent582bbd139cd2afd58d10dc051c5b0b989b441074 (diff)
downloadopenbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.gz
openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.bz2
openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.zip
merge 0.9.7b with local changes; crank majors for libssl/libcrypto
Diffstat (limited to 'src/lib/libssl/ssl_ciph.c')
-rw-r--r--src/lib/libssl/ssl_ciph.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c
index df48245b2c..438d9eacbb 100644
--- a/src/lib/libssl/ssl_ciph.c
+++ b/src/lib/libssl/ssl_ciph.c
@@ -674,13 +674,14 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
674 * So additionally check whether the cipher name found 674 * So additionally check whether the cipher name found
675 * has the correct length. We can save a strlen() call: 675 * has the correct length. We can save a strlen() call:
676 * just checking for the '\0' at the right place is 676 * just checking for the '\0' at the right place is
677 * sufficient, we have to strncmp() anyway. 677 * sufficient, we have to strncmp() anyway. (We cannot
678 * use strcmp(), because buf is not '\0' terminated.)
678 */ 679 */
679 j = found = 0; 680 j = found = 0;
680 while (ca_list[j]) 681 while (ca_list[j])
681 { 682 {
682 if ((ca_list[j]->name[buflen] == '\0') && 683 if (!strncmp(buf, ca_list[j]->name, buflen) &&
683 !strncmp(buf, ca_list[j]->name, buflen)) 684 (ca_list[j]->name[buflen] == '\0'))
684 { 685 {
685 found = 1; 686 found = 1;
686 break; 687 break;
@@ -757,7 +758,12 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
757 */ 758 */
758 if (rule_str == NULL) return(NULL); 759 if (rule_str == NULL) return(NULL);
759 760
760 if (init_ciphers) load_ciphers(); 761 if (init_ciphers)
762 {
763 CRYPTO_w_lock(CRYPTO_LOCK_SSL);
764 if (init_ciphers) load_ciphers();
765 CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
766 }
761 767
762 /* 768 /*
763 * To reduce the work to do we only want to process the compiled 769 * To reduce the work to do we only want to process the compiled