summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_ciph.c
diff options
context:
space:
mode:
authorbeck <>2017-01-26 10:40:21 +0000
committerbeck <>2017-01-26 10:40:21 +0000
commit59161dbdf4da5b82b27402f93d7007a11b2d1cc1 (patch)
treee105a2b33d3aefb54727a955e9c746cc8edb0e50 /src/lib/libssl/ssl_ciph.c
parenta2e1efdba084d65702b419bc510c30a144eb5d7f (diff)
downloadopenbsd-59161dbdf4da5b82b27402f93d7007a11b2d1cc1.tar.gz
openbsd-59161dbdf4da5b82b27402f93d7007a11b2d1cc1.tar.bz2
openbsd-59161dbdf4da5b82b27402f93d7007a11b2d1cc1.zip
Send the error function codes to rot in the depths of hell where they belong
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public API will not break, and we replace all internal use of the two argument SSL_err() with the internal only SSL_error() that only takes a reason code. ok jsing@
Diffstat (limited to 'src/lib/libssl/ssl_ciph.c')
-rw-r--r--src/lib/libssl/ssl_ciph.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c
index 5a5bb165d8..c1dee99e58 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.90 2017/01/24 01:44:00 jsing Exp $ */ 1/* $OpenBSD: ssl_ciph.c,v 1.91 2017/01/26 10:40:21 beck 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 *
@@ -1072,7 +1072,7 @@ ssl_cipher_strength_sort(CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p)
1072 1072
1073 number_uses = calloc((max_strength_bits + 1), sizeof(int)); 1073 number_uses = calloc((max_strength_bits + 1), sizeof(int));
1074 if (!number_uses) { 1074 if (!number_uses) {
1075 SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT, ERR_R_MALLOC_FAILURE); 1075 SSLerror(ERR_R_MALLOC_FAILURE);
1076 return (0); 1076 return (0);
1077 } 1077 }
1078 1078
@@ -1162,7 +1162,7 @@ ssl_cipher_process_rulestr(const char *rule_str, CIPHER_ORDER **head_p,
1162 * it is no command or separator nor 1162 * it is no command or separator nor
1163 * alphanumeric, so we call this an error. 1163 * alphanumeric, so we call this an error.
1164 */ 1164 */
1165 SSLerr(SSL_F_SSL_CIPHER_PROCESS_RULESTR, 1165 SSLerror(
1166 SSL_R_INVALID_COMMAND); 1166 SSL_R_INVALID_COMMAND);
1167 retval = found = 0; 1167 retval = found = 0;
1168 l++; 1168 l++;
@@ -1309,7 +1309,7 @@ ssl_cipher_process_rulestr(const char *rule_str, CIPHER_ORDER **head_p,
1309 if ((buflen == 8) && !strncmp(buf, "STRENGTH", 8)) 1309 if ((buflen == 8) && !strncmp(buf, "STRENGTH", 8))
1310 ok = ssl_cipher_strength_sort(head_p, tail_p); 1310 ok = ssl_cipher_strength_sort(head_p, tail_p);
1311 else 1311 else
1312 SSLerr(SSL_F_SSL_CIPHER_PROCESS_RULESTR, 1312 SSLerror(
1313 SSL_R_INVALID_COMMAND); 1313 SSL_R_INVALID_COMMAND);
1314 if (ok == 0) 1314 if (ok == 0)
1315 retval = 0; 1315 retval = 0;
@@ -1379,7 +1379,7 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method,
1379 num_of_ciphers = ssl_method->num_ciphers(); 1379 num_of_ciphers = ssl_method->num_ciphers();
1380 co_list = reallocarray(NULL, num_of_ciphers, sizeof(CIPHER_ORDER)); 1380 co_list = reallocarray(NULL, num_of_ciphers, sizeof(CIPHER_ORDER));
1381 if (co_list == NULL) { 1381 if (co_list == NULL) {
1382 SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST, ERR_R_MALLOC_FAILURE); 1382 SSLerror(ERR_R_MALLOC_FAILURE);
1383 return(NULL); /* Failure */ 1383 return(NULL); /* Failure */
1384 } 1384 }
1385 1385
@@ -1459,7 +1459,7 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method,
1459 ca_list = reallocarray(NULL, num_of_alias_max, sizeof(SSL_CIPHER *)); 1459 ca_list = reallocarray(NULL, num_of_alias_max, sizeof(SSL_CIPHER *));
1460 if (ca_list == NULL) { 1460 if (ca_list == NULL) {
1461 free(co_list); 1461 free(co_list);
1462 SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST, ERR_R_MALLOC_FAILURE); 1462 SSLerror(ERR_R_MALLOC_FAILURE);
1463 return(NULL); /* Failure */ 1463 return(NULL); /* Failure */
1464 } 1464 }
1465 ssl_cipher_collect_aliases(ca_list, num_of_group_aliases, 1465 ssl_cipher_collect_aliases(ca_list, num_of_group_aliases,