summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ecdh/ech_err.c
diff options
context:
space:
mode:
authorjsing <>2015-09-13 10:46:20 +0000
committerjsing <>2015-09-13 10:46:20 +0000
commit3a5b89dade4c6af7e3c236a45cd4575df392c731 (patch)
tree817bacc9b22fc4c0e55887238cb20046856e27ec /src/lib/libcrypto/ecdh/ech_err.c
parent0fe34ffb19fc905de54d80200f12c5b3d7d14926 (diff)
downloadopenbsd-3a5b89dade4c6af7e3c236a45cd4575df392c731.tar.gz
openbsd-3a5b89dade4c6af7e3c236a45cd4575df392c731.tar.bz2
openbsd-3a5b89dade4c6af7e3c236a45cd4575df392c731.zip
Lob a style(9) grenade in here.
Diffstat (limited to 'src/lib/libcrypto/ecdh/ech_err.c')
-rw-r--r--src/lib/libcrypto/ecdh/ech_err.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_err.c b/src/lib/libcrypto/ecdh/ech_err.c
index 6b417a255d..2899b573c3 100644
--- a/src/lib/libcrypto/ecdh/ech_err.c
+++ b/src/lib/libcrypto/ecdh/ech_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_err.c,v 1.3 2014/07/10 22:45:57 jsing Exp $ */ 1/* $OpenBSD: ech_err.c,v 1.4 2015/09/13 10:46:20 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -7,7 +7,7 @@
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 11 *
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in 13 * notice, this list of conditions and the following disclaimer in
@@ -71,33 +71,30 @@
71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ECDH,func,0) 71#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ECDH,func,0)
72#define ERR_REASON(reason) ERR_PACK(ERR_LIB_ECDH,0,reason) 72#define ERR_REASON(reason) ERR_PACK(ERR_LIB_ECDH,0,reason)
73 73
74static ERR_STRING_DATA ECDH_str_functs[]= 74static ERR_STRING_DATA ECDH_str_functs[]= {
75 { 75 {ERR_FUNC(ECDH_F_ECDH_CHECK), "ECDH_CHECK"},
76{ERR_FUNC(ECDH_F_ECDH_CHECK), "ECDH_CHECK"}, 76 {ERR_FUNC(ECDH_F_ECDH_COMPUTE_KEY), "ECDH_compute_key"},
77{ERR_FUNC(ECDH_F_ECDH_COMPUTE_KEY), "ECDH_compute_key"}, 77 {ERR_FUNC(ECDH_F_ECDH_DATA_NEW_METHOD), "ECDH_DATA_new_method"},
78{ERR_FUNC(ECDH_F_ECDH_DATA_NEW_METHOD), "ECDH_DATA_new_method"}, 78 {0, NULL}
79{0,NULL} 79};
80 };
81 80
82static ERR_STRING_DATA ECDH_str_reasons[]= 81static ERR_STRING_DATA ECDH_str_reasons[]= {
83 { 82 {ERR_REASON(ECDH_R_KDF_FAILED) , "KDF failed"},
84{ERR_REASON(ECDH_R_KDF_FAILED) ,"KDF failed"}, 83 {ERR_REASON(ECDH_R_NON_FIPS_METHOD) , "non fips method"},
85{ERR_REASON(ECDH_R_NON_FIPS_METHOD) ,"non fips method"}, 84 {ERR_REASON(ECDH_R_NO_PRIVATE_VALUE) , "no private value"},
86{ERR_REASON(ECDH_R_NO_PRIVATE_VALUE) ,"no private value"}, 85 {ERR_REASON(ECDH_R_POINT_ARITHMETIC_FAILURE), "point arithmetic failure"},
87{ERR_REASON(ECDH_R_POINT_ARITHMETIC_FAILURE),"point arithmetic failure"}, 86 {0, NULL}
88{0,NULL} 87};
89 };
90 88
91#endif 89#endif
92 90
93void ERR_load_ECDH_strings(void) 91void
94 { 92ERR_load_ECDH_strings(void)
93{
95#ifndef OPENSSL_NO_ERR 94#ifndef OPENSSL_NO_ERR
96 95 if (ERR_func_error_string(ECDH_str_functs[0].error) == NULL) {
97 if (ERR_func_error_string(ECDH_str_functs[0].error) == NULL) 96 ERR_load_strings(0, ECDH_str_functs);
98 { 97 ERR_load_strings(0, ECDH_str_reasons);
99 ERR_load_strings(0,ECDH_str_functs);
100 ERR_load_strings(0,ECDH_str_reasons);
101 }
102#endif
103 } 98 }
99#endif
100}