From 59161dbdf4da5b82b27402f93d7007a11b2d1cc1 Mon Sep 17 00:00:00 2001 From: beck <> Date: Thu, 26 Jan 2017 10:40:21 +0000 Subject: 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@ --- src/lib/libssl/ssl_ciph.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/libssl/ssl_ciph.c') 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 @@ -/* $OpenBSD: ssl_ciph.c,v 1.90 2017/01/24 01:44:00 jsing Exp $ */ +/* $OpenBSD: ssl_ciph.c,v 1.91 2017/01/26 10:40:21 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1072,7 +1072,7 @@ ssl_cipher_strength_sort(CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p) number_uses = calloc((max_strength_bits + 1), sizeof(int)); if (!number_uses) { - SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT, ERR_R_MALLOC_FAILURE); + SSLerror(ERR_R_MALLOC_FAILURE); return (0); } @@ -1162,7 +1162,7 @@ ssl_cipher_process_rulestr(const char *rule_str, CIPHER_ORDER **head_p, * it is no command or separator nor * alphanumeric, so we call this an error. */ - SSLerr(SSL_F_SSL_CIPHER_PROCESS_RULESTR, + SSLerror( SSL_R_INVALID_COMMAND); retval = found = 0; l++; @@ -1309,7 +1309,7 @@ ssl_cipher_process_rulestr(const char *rule_str, CIPHER_ORDER **head_p, if ((buflen == 8) && !strncmp(buf, "STRENGTH", 8)) ok = ssl_cipher_strength_sort(head_p, tail_p); else - SSLerr(SSL_F_SSL_CIPHER_PROCESS_RULESTR, + SSLerror( SSL_R_INVALID_COMMAND); if (ok == 0) retval = 0; @@ -1379,7 +1379,7 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method, num_of_ciphers = ssl_method->num_ciphers(); co_list = reallocarray(NULL, num_of_ciphers, sizeof(CIPHER_ORDER)); if (co_list == NULL) { - SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST, ERR_R_MALLOC_FAILURE); + SSLerror(ERR_R_MALLOC_FAILURE); return(NULL); /* Failure */ } @@ -1459,7 +1459,7 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method, ca_list = reallocarray(NULL, num_of_alias_max, sizeof(SSL_CIPHER *)); if (ca_list == NULL) { free(co_list); - SSLerr(SSL_F_SSL_CREATE_CIPHER_LIST, ERR_R_MALLOC_FAILURE); + SSLerror(ERR_R_MALLOC_FAILURE); return(NULL); /* Failure */ } ssl_cipher_collect_aliases(ca_list, num_of_group_aliases, -- cgit v1.2.3-55-g6feb