Changeset 372 for asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl
- Timestamp:
- Feb 7, 2019, 8:36:33 AM (5 years ago)
- Location:
- asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl
- Files:
-
- 1 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/bio.h
r337 r372 1 /* bio.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* bio.h for openssl */ 2 23 … … 12 33 #endif 13 34 35 #define BIO_FLAG_BASE64_NO_NL WOLFSSL_BIO_FLAG_BASE64_NO_NL 36 #define BIO_FLAG_READ WOLFSSL_BIO_FLAG_READ 37 #define BIO_FLAG_WRITE WOLFSSL_BIO_FLAG_WRITE 38 #define BIO_FLAG_IO_SPECIAL WOLFSSL_BIO_FLAG_IO_SPECIAL 39 #define BIO_FLAG_RETRY WOLFSSL_BIO_FLAG_RETRY 14 40 41 #define BIO_find_type wolfSSL_BIO_find_type 42 #define BIO_next wolfSSL_BIO_next 43 #define BIO_gets wolfSSL_BIO_gets 44 45 46 #define BIO_TYPE_FILE WOLFSSL_BIO_FILE 47 #define BIO_TYPE_BIO WOLFSSL_BIO_BIO 48 #define BIO_TYPE_MEM WOLFSSL_BIO_MEMORY 49 #define BIO_TYPE_BASE64 WOLFSSL_BIO_BASE64 15 50 16 51 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/bn.h
r337 r372 1 /* bn.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* bn.h for openssl */ 23 24 /*! 25 \file wolfssl/openssl/bn.h 26 \brief bn.h for openssl 27 */ 2 28 3 29 … … 38 64 WOLFSSL_API int wolfSSL_BN_mod_exp(WOLFSSL_BIGNUM *r, const WOLFSSL_BIGNUM *a, 39 65 const WOLFSSL_BIGNUM *p, const WOLFSSL_BIGNUM *m, WOLFSSL_BN_CTX *ctx); 66 WOLFSSL_API int wolfSSL_BN_mod_mul(WOLFSSL_BIGNUM *r, const WOLFSSL_BIGNUM *a, 67 const WOLFSSL_BIGNUM *b, const WOLFSSL_BIGNUM *m, WOLFSSL_BN_CTX *ctx); 40 68 WOLFSSL_API const WOLFSSL_BIGNUM* wolfSSL_BN_value_one(void); 41 69 … … 56 84 WOLFSSL_API int wolfSSL_mask_bits(WOLFSSL_BIGNUM*, int n); 57 85 86 WOLFSSL_API int wolfSSL_BN_pseudo_rand(WOLFSSL_BIGNUM*, int bits, int top, 87 int bottom); 58 88 WOLFSSL_API int wolfSSL_BN_rand(WOLFSSL_BIGNUM*, int bits, int top, int bottom); 59 89 WOLFSSL_API int wolfSSL_BN_is_bit_set(const WOLFSSL_BIGNUM*, int n); … … 71 101 WOLFSSL_API int wolfSSL_BN_set_bit(WOLFSSL_BIGNUM*, int); 72 102 WOLFSSL_API int wolfSSL_BN_set_word(WOLFSSL_BIGNUM*, WOLFSSL_BN_ULONG); 103 WOLFSSL_API unsigned long wolfSSL_BN_get_word(const WOLFSSL_BIGNUM*); 73 104 74 105 WOLFSSL_API int wolfSSL_BN_add(WOLFSSL_BIGNUM*, WOLFSSL_BIGNUM*, … … 80 111 WOLFSSL_BN_ULONG); 81 112 #if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) 82 WOLFSSL_API int wolfSSL_BN_print_fp( FILE*, const WOLFSSL_BIGNUM*);113 WOLFSSL_API int wolfSSL_BN_print_fp(XFILE, const WOLFSSL_BIGNUM*); 83 114 #endif 84 115 WOLFSSL_API int wolfSSL_BN_rshift(WOLFSSL_BIGNUM*, const WOLFSSL_BIGNUM*, int); 85 116 WOLFSSL_API WOLFSSL_BIGNUM *wolfSSL_BN_CTX_get(WOLFSSL_BN_CTX *ctx); 86 117 WOLFSSL_API void wolfSSL_BN_CTX_start(WOLFSSL_BN_CTX *ctx); 87 118 WOLFSSL_API WOLFSSL_BIGNUM *wolfSSL_BN_mod_inverse(WOLFSSL_BIGNUM*, WOLFSSL_BIGNUM*, 119 const WOLFSSL_BIGNUM*, WOLFSSL_BN_CTX *ctx); 88 120 typedef WOLFSSL_BIGNUM BIGNUM; 89 121 typedef WOLFSSL_BN_CTX BN_CTX; … … 112 144 #define BN_mod wolfSSL_BN_mod 113 145 #define BN_mod_exp wolfSSL_BN_mod_exp 146 #define BN_mod_mul wolfSSL_BN_mod_mul 114 147 #define BN_sub wolfSSL_BN_sub 115 148 #define BN_value_one wolfSSL_BN_value_one … … 117 150 #define BN_mask_bits wolfSSL_mask_bits 118 151 152 #define BN_pseudo_rand wolfSSL_BN_pseudo_rand 119 153 #define BN_rand wolfSSL_BN_rand 120 154 #define BN_is_bit_set wolfSSL_BN_is_bit_set … … 124 158 #define BN_copy wolfSSL_BN_copy 125 159 160 #define BN_get_word wolfSSL_BN_get_word 126 161 #define BN_set_word wolfSSL_BN_set_word 127 162 … … 145 180 #define BN_CTX_start wolfSSL_BN_CTX_start 146 181 182 #define BN_mod_inverse wolfSSL_BN_mod_inverse 183 147 184 #ifdef __cplusplus 148 185 } /* extern "C" */ -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/crypto.h
r337 r372 1 /* crypto.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* crypto.h for openSSL */ 2 23 … … 16 37 WOLFSSL_API unsigned long wolfSSLeay(void); 17 38 39 #ifdef OPENSSL_EXTRA 40 WOLFSSL_API void wolfSSL_OPENSSL_free(void*); 41 WOLFSSL_API void *wolfSSL_OPENSSL_malloc(size_t a); 42 #endif 43 18 44 #define CRYPTO_THREADID void 19 45 … … 24 50 #define SSLEAY_VERSION 0x0090600fL 25 51 #define SSLEAY_VERSION_NUMBER SSLEAY_VERSION 52 #define CRYPTO_lock wc_LockMutex_ex 26 53 27 #if defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) 54 /* this function was used to set the default malloc, free, and realloc */ 55 #define CRYPTO_malloc_init() /* CRYPTO_malloc_init is not needed */ 56 57 #define OPENSSL_free wolfSSL_OPENSSL_free 58 #define OPENSSL_malloc wolfSSL_OPENSSL_malloc 59 60 #if defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || \ 61 defined(WOLFSSL_HAPROXY) || defined(OPENSSL_EXTRA) 28 62 #define CRYPTO_set_mem_ex_functions wolfSSL_CRYPTO_set_mem_ex_functions 29 63 #define FIPS_mode wolfSSL_FIPS_mode … … 35 69 #define CRYPTO_THREADID_set_numeric wolfSSL_THREADID_set_numeric 36 70 37 #define CRYPTO_lock wc_LockMutex 38 #define CRYPTO_r_lock wc_LockMutex 39 #define CRYPTO_unlock wc_UnLockMutex 71 #define CRYPTO_r_lock wc_LockMutex_ex 72 #define CRYPTO_unlock wc_LockMutex_ex 40 73 41 74 #define CRYPTO_THREAD_lock wc_LockMutex … … 43 76 #define CRYPTO_THREAD_unlock wc_UnLockMutex 44 77 45 #define OPENSSL_malloc(a) XMALLOC(a, NULL, DYNAMIC_TYPE_OPENSSL) 46 47 #endif /* HAVE_STUNNEL || WOLFSSL_NGINX || WOLFSSL_HAPROXY */ 78 #endif /* OPENSSL_ALL || HAVE_STUNNEL || WOLFSSL_NGINX || WOLFSSL_HAPROXY */ 48 79 49 80 #endif /* header */ 50 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/des.h
r337 r372 46 46 typedef /* const */ WOLFSSL_DES_cblock WOLFSSL_const_DES_cblock; 47 47 typedef WOLFSSL_DES_cblock WOLFSSL_DES_key_schedule; 48 typedef unsigned int WOLFSSL_DES_LONG; 48 49 49 50 … … 54 55 55 56 57 WOLFSSL_API int wolfSSL_DES_is_weak_key(WOLFSSL_const_DES_cblock* key); 58 WOLFSSL_API WOLFSSL_DES_LONG wolfSSL_DES_cbc_cksum(const unsigned char* in, 59 WOLFSSL_DES_cblock* out, long length, WOLFSSL_DES_key_schedule* sc, 60 WOLFSSL_const_DES_cblock* iv); 56 61 WOLFSSL_API int wolfSSL_DES_set_key(WOLFSSL_const_DES_cblock* myDes, 57 62 WOLFSSL_DES_key_schedule* key); … … 85 90 typedef WOLFSSL_const_DES_cblock const_DES_cblock; 86 91 typedef WOLFSSL_DES_key_schedule DES_key_schedule; 92 typedef WOLFSSL_DES_LONG DES_LONG; 87 93 88 94 #define DES_check_key(x) /* Define WOLFSSL_CHECK_DESKEY to check key */ 95 #define DES_is_weak_key wolfSSL_DES_is_weak_key 89 96 #define DES_set_key wolfSSL_DES_set_key 90 97 #define DES_set_key_checked wolfSSL_DES_set_key_checked … … 96 103 #define DES_ecb_encrypt wolfSSL_DES_ecb_encrypt 97 104 #define DES_ede3_cbc_encrypt wolfSSL_DES_ede3_cbc_encrypt 105 #define DES_cbc_cksum wolfSSL_DES_cbc_cksum 98 106 99 107 #ifdef __cplusplus -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/dh.h
r337 r372 1 /* dh.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* dh.h for openSSL */ 2 23 … … 44 65 #define DH_generate_key wolfSSL_DH_generate_key 45 66 #define DH_compute_key wolfSSL_DH_compute_key 67 #define get_rfc3526_prime_1536 wolfSSL_DH_1536_prime 46 68 47 69 … … 50 72 #endif 51 73 52 #if def HAVE_STUNNEL74 #if defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) 53 75 #define DH_generate_parameters wolfSSL_DH_generate_parameters 54 76 #define DH_generate_parameters_ex wolfSSL_DH_generate_parameters_ex 55 #endif /* HAVE_STUNNEL */ 56 #endif /* header */ 77 #endif /* OPENSSL_ALL || HAVE_STUNNEL */ 78 79 #endif /* WOLFSSL_DH_H_ */ -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/dsa.h
r337 r372 1 /* dsa.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* dsa.h for openSSL */ 2 23 … … 34 55 35 56 WOLFSSL_API int wolfSSL_DSA_generate_key(WOLFSSL_DSA*); 57 58 typedef void (*WOLFSSL_BN_CB)(int i, int j, void* exArg); 59 WOLFSSL_API WOLFSSL_DSA* wolfSSL_DSA_generate_parameters(int bits, 60 unsigned char* seed, int seedLen, int* counterRet, 61 unsigned long* hRet, WOLFSSL_BN_CB cb, void* CBArg); 36 62 WOLFSSL_API int wolfSSL_DSA_generate_parameters_ex(WOLFSSL_DSA*, int bits, 37 63 unsigned char* seed, int seedLen, int* counterRet, … … 51 77 52 78 #define DSA_generate_key wolfSSL_DSA_generate_key 79 #define DSA_generate_parameters wolfSSL_DSA_generate_parameters 53 80 #define DSA_generate_parameters_ex wolfSSL_DSA_generate_parameters_ex 54 81 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/ec.h
r337 r372 1 /* ec.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* ec.h for openssl */ 2 23 … … 13 34 /* Map OpenSSL NID value */ 14 35 enum { 36 POINT_CONVERSION_COMPRESSED = 2, 15 37 POINT_CONVERSION_UNCOMPRESSED = 4, 16 38 … … 81 103 }; 82 104 105 106 #define WOLFSSL_EC_KEY_LOAD_PRIVATE 1 107 #define WOLFSSL_EC_KEY_LOAD_PUBLIC 2 108 83 109 WOLFSSL_API 84 110 int wolfSSL_ECPoint_i2d(const WOLFSSL_EC_GROUP *curve, … … 92 118 const unsigned char* der, int derSz); 93 119 WOLFSSL_API 120 int wolfSSL_EC_KEY_LoadDer_ex(WOLFSSL_EC_KEY* key, 121 const unsigned char* der, int derSz, int opt); 122 WOLFSSL_API 94 123 void wolfSSL_EC_KEY_free(WOLFSSL_EC_KEY *key); 95 124 WOLFSSL_API … … 131 160 WOLFSSL_API 132 161 void wolfSSL_EC_GROUP_free(WOLFSSL_EC_GROUP *group); 133 #if defined(DEBUG_WOLFSSL) && !defined(NO_FILESYSTEM)134 WOLFSSL_API135 void wolfssl_EC_POINT_dump(const char *msg, const WOLFSSL_EC_POINT *p);136 #endif137 162 WOLFSSL_API 138 163 WOLFSSL_EC_POINT *wolfSSL_EC_POINT_new(const WOLFSSL_EC_GROUP *group); … … 160 185 const WOLFSSL_EC_POINT *a); 161 186 187 #ifndef HAVE_SELFTEST 188 WOLFSSL_API 189 char* wolfSSL_EC_POINT_point2hex(const WOLFSSL_EC_GROUP* group, 190 const WOLFSSL_EC_POINT* point, int form, 191 WOLFSSL_BN_CTX* ctx); 192 #endif 193 194 #define EC_KEY_new wolfSSL_EC_KEY_new 162 195 #define EC_KEY_free wolfSSL_EC_KEY_free 163 196 #define EC_KEY_get0_public_key wolfSSL_EC_KEY_get0_public_key … … 170 203 #define EC_KEY_set_asn1_flag wolfSSL_EC_KEY_set_asn1_flag 171 204 #define EC_KEY_set_public_key wolfSSL_EC_KEY_set_public_key 172 #define EC_KEY_new wolfSSL_EC_KEY_new 173 205 206 #define EC_GROUP_free wolfSSL_EC_GROUP_free 174 207 #define EC_GROUP_set_asn1_flag wolfSSL_EC_GROUP_set_asn1_flag 175 208 #define EC_GROUP_new_by_curve_name wolfSSL_EC_GROUP_new_by_curve_name … … 178 211 #define EC_GROUP_get_degree wolfSSL_EC_GROUP_get_degree 179 212 #define EC_GROUP_get_order wolfSSL_EC_GROUP_get_order 180 #define EC_GROUP_free wolfSSL_EC_GROUP_free181 213 182 214 #define EC_POINT_new wolfSSL_EC_POINT_new 215 #define EC_POINT_free wolfSSL_EC_POINT_free 183 216 #define EC_POINT_get_affine_coordinates_GFp \ 184 217 wolfSSL_EC_POINT_get_affine_coordinates_GFp … … 186 219 #define EC_POINT_clear_free wolfSSL_EC_POINT_clear_free 187 220 #define EC_POINT_cmp wolfSSL_EC_POINT_cmp 188 #define EC_POINT_free wolfSSL_EC_POINT_free189 221 #define EC_POINT_is_at_infinity wolfSSL_EC_POINT_is_at_infinity 222 223 #ifndef HAVE_SELFTEST 224 #define EC_POINT_point2hex wolfSSL_EC_POINT_point2hex 225 #endif 226 227 #define EC_POINT_dump wolfSSL_EC_POINT_dump 190 228 191 229 #ifdef __cplusplus -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/ec25519.h
r337 r372 1 /* ec25519.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* ec25519.h */ 2 23 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/ecdh.h
r337 r372 1 /* ecdh.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* ecdh.h for openssl */ 2 23 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/ecdsa.h
r337 r372 1 /* ecdsa.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* ecdsa.h for openssl */ 2 23 … … 33 54 WOLFSSL_EC_KEY *eckey); 34 55 56 WOLFSSL_API WOLFSSL_ECDSA_SIG *wolfSSL_d2i_ECDSA_SIG(WOLFSSL_ECDSA_SIG **sig, 57 const unsigned char **pp, 58 long len); 59 WOLFSSL_API int wolfSSL_i2d_ECDSA_SIG(const WOLFSSL_ECDSA_SIG *sig, 60 unsigned char **pp); 61 35 62 #define ECDSA_SIG_free wolfSSL_ECDSA_SIG_free 36 63 #define ECDSA_SIG_new wolfSSL_ECDSA_SIG_new 37 64 #define ECDSA_do_sign wolfSSL_ECDSA_do_sign 38 65 #define ECDSA_do_verify wolfSSL_ECDSA_do_verify 66 #define d2i_ECDSA_SIG wolfSSL_d2i_ECDSA_SIG 67 #define i2d_ECDSA_SIG wolfSSL_i2d_ECDSA_SIG 39 68 40 69 #ifdef __cplusplus -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/ed25519.h
r337 r372 1 /* ed25519.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* ed25519.h */ 2 23 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/err.h
r337 r372 1 /* err.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 22 #ifndef WOLFSSL_OPENSSL_ERR_ 23 #define WOLFSSL_OPENSSL_ERR_ 24 25 #include <wolfssl/openssl/ssl.h> 26 1 27 /* err.h for openssl */ 2 28 #define ERR_load_crypto_strings wolfSSL_ERR_load_crypto_strings 3 29 #define ERR_peek_last_error wolfSSL_ERR_peek_last_error 30 31 #endif /* WOLFSSL_OPENSSL_ERR_ */ 32 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/evp.h
r337 r372 22 22 23 23 24 /* evp.h defines mini evp openssl compatibility layer 25 * 24 /*! 25 \file wolfssl/openssl/evp.h 26 \brief evp.h defines mini evp openssl compatibility layer 26 27 */ 27 28 … … 36 37 #endif 37 38 39 #ifndef NO_MD4 40 #include <wolfssl/openssl/md4.h> 41 #endif 38 42 #ifndef NO_MD5 39 43 #include <wolfssl/openssl/md5.h> … … 52 56 #include <wolfssl/wolfcrypt/idea.h> 53 57 #endif 58 #include <wolfssl/wolfcrypt/pwdbased.h> 54 59 55 60 #ifdef __cplusplus … … 57 62 #endif 58 63 64 59 65 typedef char WOLFSSL_EVP_CIPHER; 66 #ifndef WOLFSSL_EVP_TYPE_DEFINED /* guard on redeclaration */ 60 67 typedef char WOLFSSL_EVP_MD; 61 68 typedef struct WOLFSSL_EVP_PKEY WOLFSSL_EVP_PKEY; 69 #define WOLFSSL_EVP_TYPE_DEFINED 70 #endif 71 72 typedef WOLFSSL_EVP_PKEY EVP_PKEY; 73 typedef WOLFSSL_EVP_PKEY PKCS8_PRIV_KEY_INFO; 74 75 #ifndef NO_MD4 76 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_md4(void); 77 #endif 62 78 #ifndef NO_MD5 63 79 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_md5(void); … … 74 90 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_256_ecb(void); 75 91 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_128_cbc(void); 92 #if !defined(NO_AES) && defined(HAVE_AES_CBC) 76 93 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_192_cbc(void); 77 94 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_256_cbc(void); 95 #endif 78 96 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_128_ctr(void); 79 97 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_192_ctr(void); … … 89 107 90 108 typedef union { 109 #ifndef NO_MD4 110 WOLFSSL_MD4_CTX md4; 111 #endif 91 112 #ifndef NO_MD5 92 113 WOLFSSL_MD5_CTX md5; … … 108 129 } WOLFSSL_Hasher; 109 130 131 typedef struct WOLFSSL_EVP_PKEY_CTX WOLFSSL_EVP_PKEY_CTX; 110 132 111 133 typedef struct WOLFSSL_EVP_MD_CTX { … … 115 137 } hash; 116 138 unsigned char macType; 139 WOLFSSL_EVP_PKEY_CTX *pctx; 117 140 } WOLFSSL_EVP_MD_CTX; 118 141 … … 152 175 EVP_PKEY_DSA = 17, 153 176 EVP_PKEY_EC = 18, 177 #ifdef HAVE_IDEA 154 178 IDEA_CBC_TYPE = 19, 179 #endif 155 180 NID_sha1 = 64, 156 NID_md2 = 3, 181 NID_sha224 = 65, 182 NID_md2 = 77, 157 183 NID_md5 = 4, 158 184 NID_hmac = 855, … … 198 224 } WOLFSSL_EVP_CIPHER_CTX; 199 225 200 201 #ifndef WOLFSSL_EVP_PKEY_TYPE_DEFINED /* guard on redeclaration */ 202 typedef struct WOLFSSL_EVP_PKEY WOLFSSL_EVP_PKEY; 203 #define WOLFSSL_EVP_PKEY_TYPE_DEFINED 204 #endif 205 206 struct WOLFSSL_EVP_PKEY { 207 int type; /* openssh dereference */ 208 int save_type; /* openssh dereference */ 209 int pkey_sz; 210 union { 211 char* ptr; /* der format of key / or raw for NTRU */ 212 } pkey; 213 #ifdef HAVE_ECC 214 int pkey_curve; 215 #endif 226 struct WOLFSSL_EVP_PKEY_CTX { 227 WOLFSSL_EVP_PKEY *pkey; 228 int op; /* operation */ 229 int padding; 216 230 }; 217 231 218 232 typedef int WOLFSSL_ENGINE ; 219 233 typedef WOLFSSL_ENGINE ENGINE; 220 typedef int WOLFSSL_EVP_PKEY_CTX;221 234 typedef WOLFSSL_EVP_PKEY_CTX EVP_PKEY_CTX; 235 236 #define EVP_PKEY_OP_ENCRYPT (1 << 6) 237 #define EVP_PKEY_OP_DECRYPT (1 << 7) 222 238 223 239 WOLFSSL_API void wolfSSL_EVP_init(void); … … 229 245 WOLFSSL_API void wolfSSL_EVP_MD_CTX_init(WOLFSSL_EVP_MD_CTX* ctx); 230 246 WOLFSSL_API int wolfSSL_EVP_MD_CTX_cleanup(WOLFSSL_EVP_MD_CTX* ctx); 247 WOLFSSL_API int wolfSSL_EVP_MD_CTX_copy(WOLFSSL_EVP_MD_CTX *out, const WOLFSSL_EVP_MD_CTX *in); 248 WOLFSSL_API int wolfSSL_EVP_MD_CTX_copy_ex(WOLFSSL_EVP_MD_CTX *out, const WOLFSSL_EVP_MD_CTX *in); 249 WOLFSSL_API int wolfSSL_EVP_MD_CTX_type(const WOLFSSL_EVP_MD_CTX *ctx); 231 250 WOLFSSL_API const WOLFSSL_EVP_MD *wolfSSL_EVP_MD_CTX_md(const WOLFSSL_EVP_MD_CTX *ctx); 232 251 WOLFSSL_API const WOLFSSL_EVP_CIPHER *wolfSSL_EVP_get_cipherbyname(const char *name); … … 239 258 WOLFSSL_ENGINE *impl); 240 259 WOLFSSL_API int wolfSSL_EVP_DigestUpdate(WOLFSSL_EVP_MD_CTX* ctx, const void* data, 241 unsigned longsz);260 size_t sz); 242 261 WOLFSSL_API int wolfSSL_EVP_DigestFinal(WOLFSSL_EVP_MD_CTX* ctx, unsigned char* md, 243 262 unsigned int* s); … … 255 274 unsigned char *sig, size_t *siglen); 256 275 257 #ifndef NO_MD5 276 WOLFSSL_API int wolfSSL_EVP_DigestVerifyInit(WOLFSSL_EVP_MD_CTX *ctx, 277 WOLFSSL_EVP_PKEY_CTX **pctx, 278 const WOLFSSL_EVP_MD *type, 279 WOLFSSL_ENGINE *e, 280 WOLFSSL_EVP_PKEY *pkey); 281 WOLFSSL_API int wolfSSL_EVP_DigestVerifyUpdate(WOLFSSL_EVP_MD_CTX *ctx, 282 const void *d, size_t cnt); 283 WOLFSSL_API int wolfSSL_EVP_DigestVerifyFinal(WOLFSSL_EVP_MD_CTX *ctx, 284 const unsigned char *sig, 285 size_t siglen); 286 287 258 288 WOLFSSL_API int wolfSSL_EVP_BytesToKey(const WOLFSSL_EVP_CIPHER*, 259 289 const WOLFSSL_EVP_MD*, const unsigned char*, 260 290 const unsigned char*, int, int, unsigned char*, 261 291 unsigned char*); 262 #endif263 292 264 293 WOLFSSL_API void wolfSSL_EVP_CIPHER_CTX_init(WOLFSSL_EVP_CIPHER_CTX* ctx); … … 267 296 WOLFSSL_API int wolfSSL_EVP_CIPHER_CTX_iv_length(const WOLFSSL_EVP_CIPHER_CTX*); 268 297 WOLFSSL_API int wolfSSL_EVP_CIPHER_iv_length(const WOLFSSL_EVP_CIPHER*); 298 WOLFSSL_API int wolfSSL_EVP_Cipher_key_length(const WOLFSSL_EVP_CIPHER* c); 269 299 270 300 271 301 WOLFSSL_API int wolfSSL_EVP_CipherInit(WOLFSSL_EVP_CIPHER_CTX* ctx, 272 302 const WOLFSSL_EVP_CIPHER* type, 273 unsigned char* key, unsigned char* iv, 303 const unsigned char* key, 304 const unsigned char* iv, 274 305 int enc); 275 306 WOLFSSL_API int wolfSSL_EVP_CipherInit_ex(WOLFSSL_EVP_CIPHER_CTX* ctx, 276 307 const WOLFSSL_EVP_CIPHER* type, 277 308 WOLFSSL_ENGINE *impl, 278 unsigned char* key, unsigned char* iv, 309 const unsigned char* key, 310 const unsigned char* iv, 279 311 int enc); 280 312 WOLFSSL_API int wolfSSL_EVP_EncryptInit(WOLFSSL_EVP_CIPHER_CTX* ctx, 281 313 const WOLFSSL_EVP_CIPHER* type, 282 unsigned char* key, unsigned char* iv); 314 const unsigned char* key, 315 const unsigned char* iv); 283 316 WOLFSSL_API int wolfSSL_EVP_EncryptInit_ex(WOLFSSL_EVP_CIPHER_CTX* ctx, 284 317 const WOLFSSL_EVP_CIPHER* type, 285 318 WOLFSSL_ENGINE *impl, 286 unsigned char* key, unsigned char* iv); 319 const unsigned char* key, 320 const unsigned char* iv); 287 321 WOLFSSL_API int wolfSSL_EVP_DecryptInit(WOLFSSL_EVP_CIPHER_CTX* ctx, 288 322 const WOLFSSL_EVP_CIPHER* type, 289 unsigned char* key, unsigned char* iv); 323 const unsigned char* key, 324 const unsigned char* iv); 290 325 WOLFSSL_API int wolfSSL_EVP_DecryptInit_ex(WOLFSSL_EVP_CIPHER_CTX* ctx, 291 326 const WOLFSSL_EVP_CIPHER* type, 292 327 WOLFSSL_ENGINE *impl, 293 unsigned char* key, unsigned char* iv); 328 const unsigned char* key, 329 const unsigned char* iv); 294 330 WOLFSSL_API int wolfSSL_EVP_CipherUpdate(WOLFSSL_EVP_CIPHER_CTX *ctx, 295 331 unsigned char *out, int *outl, … … 320 356 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_get_digestbynid(int); 321 357 358 WOLFSSL_API int wolfSSL_EVP_PKEY_assign_RSA(WOLFSSL_EVP_PKEY* pkey, 359 WOLFSSL_RSA* key); 360 WOLFSSL_API int wolfSSL_EVP_PKEY_assign_EC_KEY(WOLFSSL_EVP_PKEY* pkey, 361 WOLFSSL_EC_KEY* key); 322 362 WOLFSSL_API WOLFSSL_RSA* wolfSSL_EVP_PKEY_get1_RSA(WOLFSSL_EVP_PKEY*); 323 363 WOLFSSL_API WOLFSSL_DSA* wolfSSL_EVP_PKEY_get1_DSA(WOLFSSL_EVP_PKEY*); 324 364 WOLFSSL_API WOLFSSL_EC_KEY *wolfSSL_EVP_PKEY_get1_EC_KEY(WOLFSSL_EVP_PKEY *key); 365 WOLFSSL_API int wolfSSL_EVP_PKEY_set1_RSA(WOLFSSL_EVP_PKEY *pkey, WOLFSSL_RSA *key); 325 366 326 367 WOLFSSL_API WOLFSSL_EVP_PKEY* wolfSSL_EVP_PKEY_new_mac_key(int type, ENGINE* e, … … 328 369 WOLFSSL_API const unsigned char* wolfSSL_EVP_PKEY_get0_hmac(const WOLFSSL_EVP_PKEY* pkey, 329 370 size_t* len); 371 WOLFSSL_API int wolfSSL_EVP_PKEY_bits(const WOLFSSL_EVP_PKEY *pkey); 372 WOLFSSL_API int wolfSSL_EVP_PKEY_CTX_free(WOLFSSL_EVP_PKEY_CTX *ctx); 373 WOLFSSL_API WOLFSSL_EVP_PKEY_CTX *wolfSSL_EVP_PKEY_CTX_new(WOLFSSL_EVP_PKEY *pkey, WOLFSSL_ENGINE *e); 374 WOLFSSL_API int wolfSSL_EVP_PKEY_CTX_set_rsa_padding(WOLFSSL_EVP_PKEY_CTX *ctx, int padding); 375 WOLFSSL_API int wolfSSL_EVP_PKEY_decrypt(WOLFSSL_EVP_PKEY_CTX *ctx, 376 unsigned char *out, size_t *outlen, 377 const unsigned char *in, size_t inlen); 378 WOLFSSL_API int wolfSSL_EVP_PKEY_decrypt_init(WOLFSSL_EVP_PKEY_CTX *ctx); 379 WOLFSSL_API int wolfSSL_EVP_PKEY_encrypt(WOLFSSL_EVP_PKEY_CTX *ctx, 380 unsigned char *out, size_t *outlen, 381 const unsigned char *in, size_t inlen); 382 WOLFSSL_API int wolfSSL_EVP_PKEY_encrypt_init(WOLFSSL_EVP_PKEY_CTX *ctx); 383 WOLFSSL_API WOLFSSL_EVP_PKEY *wolfSSL_EVP_PKEY_new(void); 384 WOLFSSL_API void wolfSSL_EVP_PKEY_free(WOLFSSL_EVP_PKEY*); 385 WOLFSSL_API int wolfSSL_EVP_PKEY_size(WOLFSSL_EVP_PKEY *pkey); 386 WOLFSSL_API int wolfSSL_EVP_PKEY_type(int type); 387 WOLFSSL_API int wolfSSL_EVP_PKEY_id(const EVP_PKEY *pkey); 388 WOLFSSL_API int wolfSSL_EVP_PKEY_base_id(const EVP_PKEY *pkey); 389 WOLFSSL_API int wolfSSL_EVP_SignFinal(WOLFSSL_EVP_MD_CTX *ctx, unsigned char *sigret, 390 unsigned int *siglen, WOLFSSL_EVP_PKEY *pkey); 391 WOLFSSL_API int wolfSSL_EVP_SignInit(WOLFSSL_EVP_MD_CTX *ctx, const WOLFSSL_EVP_MD *type); 392 WOLFSSL_API int wolfSSL_EVP_SignUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data, size_t len); 393 WOLFSSL_API int wolfSSL_EVP_VerifyFinal(WOLFSSL_EVP_MD_CTX *ctx, 394 unsigned char* sig, unsigned int sig_len, WOLFSSL_EVP_PKEY *pkey); 395 WOLFSSL_API int wolfSSL_EVP_VerifyInit(WOLFSSL_EVP_MD_CTX *ctx, const WOLFSSL_EVP_MD *type); 396 WOLFSSL_API int wolfSSL_EVP_VerifyUpdate(WOLFSSL_EVP_MD_CTX *ctx, const void *data, size_t len); 397 330 398 331 399 /* these next ones don't need real OpenSSL type, for OpenSSH compat only */ … … 347 415 WOLFSSL_API unsigned long wolfSSL_EVP_CIPHER_flags(const WOLFSSL_EVP_CIPHER *cipher); 348 416 WOLFSSL_API void wolfSSL_EVP_CIPHER_CTX_set_flags(WOLFSSL_EVP_CIPHER_CTX *ctx, int flags); 417 WOLFSSL_API void wolfSSL_EVP_CIPHER_CTX_clear_flags(WOLFSSL_EVP_CIPHER_CTX *ctx, int flags); 349 418 WOLFSSL_API unsigned long wolfSSL_EVP_CIPHER_CTX_mode(const WOLFSSL_EVP_CIPHER_CTX *ctx); 350 419 WOLFSSL_API int wolfSSL_EVP_CIPHER_CTX_set_padding(WOLFSSL_EVP_CIPHER_CTX *c, int pad); 351 420 WOLFSSL_API int wolfSSL_EVP_add_digest(const WOLFSSL_EVP_MD *digest); 352 421 WOLFSSL_API int wolfSSL_EVP_add_cipher(const WOLFSSL_EVP_CIPHER *cipher); 422 WOLFSSL_API void wolfSSL_EVP_cleanup(void); 423 WOLFSSL_API int wolfSSL_add_all_algorithms(void); 424 WOLFSSL_API int wolfSSL_OpenSSL_add_all_algorithms_noconf(void); 425 426 WOLFSSL_API int wolfSSL_PKCS5_PBKDF2_HMAC_SHA1(const char * pass, int passlen, 427 const unsigned char * salt, 428 int saltlen, int iter, 429 int keylen, unsigned char *out); 353 430 354 431 #define EVP_CIPH_STREAM_CIPHER WOLFSSL_EVP_CIPH_STREAM_CIPHER … … 371 448 #define WOLFSSL_EVP_CIPH_CCM_MODE 0x7 372 449 #define WOLFSSL_EVP_CIPH_NO_PADDING 0x100 450 #define WOLFSSL_EVP_CIPH_TYPE_INIT 0xff 373 451 374 452 /* end OpenSSH compat */ … … 379 457 typedef WOLFSSL_EVP_CIPHER_CTX EVP_CIPHER_CTX; 380 458 459 #ifndef NO_MD4 460 #define EVP_md4 wolfSSL_EVP_md4 461 #endif 381 462 #ifndef NO_MD5 382 463 #define EVP_md5 wolfSSL_EVP_md5 383 464 #endif 384 465 #define EVP_sha1 wolfSSL_EVP_sha1 466 #define EVP_dds1 wolfSSL_EVP_sha1 385 467 #define EVP_sha224 wolfSSL_EVP_sha224 386 468 #define EVP_sha256 wolfSSL_EVP_sha256 … … 414 496 #define EVP_MD_CTX_cleanup wolfSSL_EVP_MD_CTX_cleanup 415 497 #define EVP_MD_CTX_md wolfSSL_EVP_MD_CTX_md 416 #define EVP_MD_CTX_type wolfSSL_EVP_MD_ type498 #define EVP_MD_CTX_type wolfSSL_EVP_MD_CTX_type 417 499 #define EVP_MD_type wolfSSL_EVP_MD_type 418 500 … … 425 507 #define EVP_DigestSignUpdate wolfSSL_EVP_DigestSignUpdate 426 508 #define EVP_DigestSignFinal wolfSSL_EVP_DigestSignFinal 509 #define EVP_DigestVerifyInit wolfSSL_EVP_DigestVerifyInit 510 #define EVP_DigestVerifyUpdate wolfSSL_EVP_DigestVerifyUpdate 511 #define EVP_DigestVerifyFinal wolfSSL_EVP_DigestVerifyFinal 427 512 #define EVP_BytesToKey wolfSSL_EVP_BytesToKey 428 513 … … 438 523 439 524 #define EVP_CIPHER_iv_length wolfSSL_EVP_CIPHER_iv_length 525 #define EVP_CIPHER_key_length wolfSSL_EVP_Cipher_key_length 440 526 441 527 #define EVP_CipherInit wolfSSL_EVP_CipherInit … … 465 551 #define EVP_get_digestbyname wolfSSL_EVP_get_digestbyname 466 552 553 #define EVP_PKEY_asign_RSA wolfSSL_EVP_PKEY_assign_RSA 554 #define EVP_PKEY_asign_EC_KEY wolfSSL_EVP_PKEY_assign_EC_KEY 555 #define EVP_PKEY_get1_DSA wolfSSL_EVP_PKEY_get1_DSA 467 556 #define EVP_PKEY_get1_RSA wolfSSL_EVP_PKEY_get1_RSA 468 557 #define EVP_PKEY_get1_DSA wolfSSL_EVP_PKEY_get1_DSA 558 #define EVP_PKEY_set1_RSA wolfSSL_EVP_PKEY_set1_RSA 469 559 #define EVP_PKEY_get1_EC_KEY wolfSSL_EVP_PKEY_get1_EC_KEY 470 560 #define EVP_PKEY_get0_hmac wolfSSL_EVP_PKEY_get0_hmac 471 561 #define EVP_PKEY_new_mac_key wolfSSL_EVP_PKEY_new_mac_key 562 #define EVP_MD_CTX_copy wolfSSL_EVP_MD_CTX_copy 563 #define EVP_MD_CTX_copy_ex wolfSSL_EVP_MD_CTX_copy_ex 564 #define EVP_PKEY_bits wolfSSL_EVP_PKEY_bits 565 #define EVP_PKEY_CTX_free wolfSSL_EVP_PKEY_CTX_free 566 #define EVP_PKEY_CTX_new wolfSSL_EVP_PKEY_CTX_new 567 #define EVP_PKEY_CTX_set_rsa_padding wolfSSL_EVP_PKEY_CTX_set_rsa_padding 568 #define EVP_PKEY_decrypt wolfSSL_EVP_PKEY_decrypt 569 #define EVP_PKEY_decrypt_init wolfSSL_EVP_PKEY_decrypt_init 570 #define EVP_PKEY_encrypt wolfSSL_EVP_PKEY_encrypt 571 #define EVP_PKEY_encrypt_init wolfSSL_EVP_PKEY_encrypt_init 572 #define EVP_PKEY_new wolfSSL_PKEY_new 573 #define EVP_PKEY_free wolfSSL_EVP_PKEY_free 574 #define EVP_PKEY_size wolfSSL_EVP_PKEY_size 575 #define EVP_PKEY_type wolfSSL_EVP_PKEY_type 576 #define EVP_PKEY_base_id wolfSSL_EVP_PKEY_base_id 577 #define EVP_PKEY_id wolfSSL_EVP_PKEY_id 578 #define EVP_SignFinal wolfSSL_EVP_SignFinal 579 #define EVP_SignInit wolfSSL_EVP_SignInit 580 #define EVP_SignUpdate wolfSSL_EVP_SignUpdate 581 #define EVP_VerifyFinal wolfSSL_EVP_VerifyFinal 582 #define EVP_VerifyInit wolfSSL_EVP_VerifyInit 583 #define EVP_VerifyUpdate wolfSSL_EVP_VerifyUpdate 472 584 473 585 #define EVP_CIPHER_CTX_block_size wolfSSL_EVP_CIPHER_CTX_block_size … … 475 587 #define EVP_CIPHER_flags wolfSSL_EVP_CIPHER_flags 476 588 #define EVP_CIPHER_CTX_set_flags wolfSSL_EVP_CIPHER_CTX_set_flags 589 #define EVP_CIPHER_CTX_clear_flags wolfSSL_EVP_CIPHER_CTX_clear_flags 477 590 #define EVP_CIPHER_CTX_set_padding wolfSSL_EVP_CIPHER_CTX_set_padding 478 591 #define EVP_CIPHER_CTX_flags wolfSSL_EVP_CIPHER_CTX_flags 479 592 #define EVP_add_digest wolfSSL_EVP_add_digest 480 593 #define EVP_add_cipher wolfSSL_EVP_add_cipher 594 #define EVP_cleanup wolfSSL_EVP_cleanup 595 596 #define OpenSSL_add_all_digests() wolfCrypt_Init() 597 #define OpenSSL_add_all_ciphers() wolfCrypt_Init() 598 #define OpenSSL_add_all_algorithms wolfSSL_add_all_algorithms 599 #define OpenSSL_add_all_algorithms_noconf wolfSSL_OpenSSL_add_all_algorithms_noconf 600 #define wolfSSL_OPENSSL_add_all_algorithms_noconf wolfSSL_OpenSSL_add_all_algorithms_noconf 601 602 #define PKCS5_PBKDF2_HMAC_SHA1 wolfSSL_PKCS5_PBKDF2_HMAC_SHA1 481 603 482 604 #ifndef EVP_MAX_MD_SIZE … … 489 611 #endif 490 612 613 WOLFSSL_API void printPKEY(WOLFSSL_EVP_PKEY *k); 614 491 615 #ifdef __cplusplus 492 616 } /* extern "C" */ -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/hmac.h
r337 r372 37 37 38 38 #include <wolfssl/openssl/evp.h> 39 #include <wolfssl/openssl/opensslv.h> 39 40 #include <wolfssl/wolfcrypt/hmac.h> 40 41 … … 53 54 Hmac hmac; 54 55 int type; 56 word32 save_ipad[WC_HMAC_BLOCK_SIZE / sizeof(word32)]; /* same block size all*/ 57 word32 save_opad[WC_HMAC_BLOCK_SIZE / sizeof(word32)]; 55 58 } WOLFSSL_HMAC_CTX; 56 59 57 60 58 WOLFSSL_API void wolfSSL_HMAC_Init(WOLFSSL_HMAC_CTX* ctx, const void* key, 61 WOLFSSL_API int wolfSSL_HMAC_CTX_Init(WOLFSSL_HMAC_CTX* ctx); 62 WOLFSSL_API int wolfSSL_HMAC_CTX_copy(WOLFSSL_HMAC_CTX* des, 63 WOLFSSL_HMAC_CTX* src); 64 WOLFSSL_LOCAL int wolfSSL_HmacCopy(Hmac* des, Hmac* src); 65 WOLFSSL_API int wolfSSL_HMAC_Init(WOLFSSL_HMAC_CTX* ctx, const void* key, 59 66 int keylen, const EVP_MD* type); 60 67 WOLFSSL_API int wolfSSL_HMAC_Init_ex(WOLFSSL_HMAC_CTX* ctx, const void* key, 61 int len, const EVP_MD* md, void* impl);62 WOLFSSL_API voidwolfSSL_HMAC_Update(WOLFSSL_HMAC_CTX* ctx,68 int keylen, const EVP_MD* type, WOLFSSL_ENGINE* e); 69 WOLFSSL_API int wolfSSL_HMAC_Update(WOLFSSL_HMAC_CTX* ctx, 63 70 const unsigned char* data, int len); 64 WOLFSSL_API voidwolfSSL_HMAC_Final(WOLFSSL_HMAC_CTX* ctx, unsigned char* hash,71 WOLFSSL_API int wolfSSL_HMAC_Final(WOLFSSL_HMAC_CTX* ctx, unsigned char* hash, 65 72 unsigned int* len); 66 WOLFSSL_API void wolfSSL_HMAC_cleanup(WOLFSSL_HMAC_CTX* ctx); 67 73 WOLFSSL_API int wolfSSL_HMAC_cleanup(WOLFSSL_HMAC_CTX* ctx); 68 74 69 75 typedef struct WOLFSSL_HMAC_CTX HMAC_CTX; … … 71 77 #define HMAC(a,b,c,d,e,f,g) wolfSSL_HMAC((a),(b),(c),(d),(e),(f),(g)) 72 78 73 #define HMAC_Init wolfSSL_HMAC_Init 79 #define HMAC_CTX_init wolfSSL_HMAC_CTX_Init 80 #define HMAC_CTX_copy wolfSSL_HMAC_CTX_copy 74 81 #define HMAC_Init_ex wolfSSL_HMAC_Init_ex 82 #define HMAC_Init wolfSSL_HMAC_Init 75 83 #define HMAC_Update wolfSSL_HMAC_Update 76 84 #define HMAC_Final wolfSSL_HMAC_Final -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/md5.h
r337 r372 1 /* md5.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* md5.h for openssl */ 2 23 … … 21 42 22 43 typedef struct WOLFSSL_MD5_CTX { 23 int holder[28 + (WC_ASYNC_DEV_SIZE / sizeof(int))]; /* big enough to hold wolfcrypt md5, but check on init */44 void* holder[(112 + WC_ASYNC_DEV_SIZE) / sizeof(void*)]; /* big enough to hold wolfcrypt md5, but check on init */ 24 45 } WOLFSSL_MD5_CTX; 25 46 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/ocsp.h
r337 r372 1 /* ocsp.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* ocsp.h for libcurl */ 2 23 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/opensslv.h
r337 r372 1 /* opensslv.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* opensslv.h compatibility */ 2 23 … … 6 27 7 28 /* api version compatibility */ 8 #if defined(HAVE_STUNNEL) || defined(HAVE_LIGHTY) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) 29 #if defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) || defined(HAVE_LIGHTY) || \ 30 defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) 9 31 /* version number can be increased for Lighty after compatibility for ECDH 10 32 is added */ … … 18 40 19 41 #endif /* header */ 20 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/pem.h
r337 r372 1 /* pem.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* pem.h for openssl */ 23 24 /*! 25 \file wolfssl/openssl/pem.h 26 */ 2 27 3 28 … … 14 39 #endif 15 40 16 #define PEM_write_bio_PrivateKey wolfSSL_PEM_write_bio_PrivateKey17 18 41 /* RSA */ 19 42 WOLFSSL_API … … 23 46 pem_password_cb* cb, void* arg); 24 47 WOLFSSL_API 48 WOLFSSL_RSA* wolfSSL_PEM_read_bio_RSAPrivateKey(WOLFSSL_BIO* bio, 49 WOLFSSL_RSA**, 50 pem_password_cb* cb, 51 void* arg); 52 WOLFSSL_API 25 53 int wolfSSL_PEM_write_mem_RSAPrivateKey(RSA* rsa, const EVP_CIPHER* cipher, 26 54 unsigned char* passwd, int len, … … 28 56 #if !defined(NO_FILESYSTEM) 29 57 WOLFSSL_API 30 int wolfSSL_PEM_write_RSAPrivateKey( FILE *fp, WOLFSSL_RSA *rsa,58 int wolfSSL_PEM_write_RSAPrivateKey(XFILE fp, WOLFSSL_RSA *rsa, 31 59 const EVP_CIPHER *enc, 32 60 unsigned char *kstr, int klen, 33 61 pem_password_cb *cb, void *u); 34 62 WOLFSSL_API 35 WOLFSSL_RSA *wolfSSL_PEM_read_RSAPublicKey( FILE *fp, WOLFSSL_RSA **x,63 WOLFSSL_RSA *wolfSSL_PEM_read_RSAPublicKey(XFILE fp, WOLFSSL_RSA **x, 36 64 pem_password_cb *cb, void *u); 37 65 WOLFSSL_API 38 int wolfSSL_PEM_write_RSAPublicKey( FILE *fp, WOLFSSL_RSA *x);66 int wolfSSL_PEM_write_RSAPublicKey(XFILE fp, WOLFSSL_RSA *x); 39 67 40 68 WOLFSSL_API 41 int wolfSSL_PEM_write_RSA_PUBKEY( FILE *fp, WOLFSSL_RSA *x);69 int wolfSSL_PEM_write_RSA_PUBKEY(XFILE fp, WOLFSSL_RSA *x); 42 70 #endif /* NO_FILESYSTEM */ 43 71 … … 56 84 #if !defined(NO_FILESYSTEM) 57 85 WOLFSSL_API 58 int wolfSSL_PEM_write_DSAPrivateKey( FILE *fp, WOLFSSL_DSA *dsa,86 int wolfSSL_PEM_write_DSAPrivateKey(XFILE fp, WOLFSSL_DSA *dsa, 59 87 const EVP_CIPHER *enc, 60 88 unsigned char *kstr, int klen, 61 89 pem_password_cb *cb, void *u); 62 90 WOLFSSL_API 63 int wolfSSL_PEM_write_DSA_PUBKEY( FILE *fp, WOLFSSL_DSA *x);91 int wolfSSL_PEM_write_DSA_PUBKEY(XFILE fp, WOLFSSL_DSA *x); 64 92 #endif /* NO_FILESYSTEM */ 65 93 … … 77 105 #if !defined(NO_FILESYSTEM) 78 106 WOLFSSL_API 79 int wolfSSL_PEM_write_ECPrivateKey( FILE *fp, WOLFSSL_EC_KEY *key,107 int wolfSSL_PEM_write_ECPrivateKey(XFILE fp, WOLFSSL_EC_KEY *key, 80 108 const EVP_CIPHER *enc, 81 109 unsigned char *kstr, int klen, 82 110 pem_password_cb *cb, void *u); 83 111 WOLFSSL_API 84 int wolfSSL_PEM_write_EC_PUBKEY( FILE *fp, WOLFSSL_EC_KEY *key);112 int wolfSSL_PEM_write_EC_PUBKEY(XFILE fp, WOLFSSL_EC_KEY *key); 85 113 #endif /* NO_FILESYSTEM */ 86 114 … … 92 120 void* arg); 93 121 WOLFSSL_API 122 WOLFSSL_EVP_PKEY *wolfSSL_PEM_read_bio_PUBKEY(WOLFSSL_BIO* bio, 123 WOLFSSL_EVP_PKEY **key, 124 pem_password_cb *cb, void *pass); 125 WOLFSSL_API 94 126 int wolfSSL_PEM_write_bio_PrivateKey(WOLFSSL_BIO* bio, WOLFSSL_EVP_PKEY* key, 95 127 const WOLFSSL_EVP_CIPHER* cipher, … … 97 129 pem_password_cb* cb, void* arg); 98 130 99 WOLFSSL_API100 int wolfSSL_EVP_PKEY_type(int type);101 131 102 132 WOLFSSL_API 103 int wolfSSL_EVP_PKEY_base_id(const EVP_PKEY *pkey); 133 int wolfSSL_PEM_read_bio(WOLFSSL_BIO* bio, char **name, char **header, 134 unsigned char **data, long *len); 135 WOLFSSL_API 136 int wolfSSL_PEM_write_bio(WOLFSSL_BIO *bio, const char *name, 137 const char *header, const unsigned char *data, 138 long len); 139 #if !defined(NO_FILESYSTEM) 140 WOLFSSL_API 141 int wolfSSL_PEM_read(XFILE fp, char **name, char **header, unsigned char **data, 142 long *len); 143 WOLFSSL_API 144 int wolfSSL_PEM_write(XFILE fp, const char *name, const char *header, 145 const unsigned char *data, long len); 146 #endif 104 147 105 148 #if !defined(NO_FILESYSTEM) 106 149 WOLFSSL_API 107 WOLFSSL_EVP_PKEY *wolfSSL_PEM_read_PUBKEY( FILE *fp, EVP_PKEY **x,150 WOLFSSL_EVP_PKEY *wolfSSL_PEM_read_PUBKEY(XFILE fp, EVP_PKEY **x, 108 151 pem_password_cb *cb, void *u); 109 152 WOLFSSL_API 110 WOLFSSL_X509 *wolfSSL_PEM_read_X509( FILE *fp, WOLFSSL_X509 **x,153 WOLFSSL_X509 *wolfSSL_PEM_read_X509(XFILE fp, WOLFSSL_X509 **x, 111 154 pem_password_cb *cb, void *u); 112 155 WOLFSSL_API 113 WOLFSSL_EVP_PKEY *wolfSSL_PEM_read_PrivateKey( FILE *fp, WOLFSSL_EVP_PKEY **x,156 WOLFSSL_EVP_PKEY *wolfSSL_PEM_read_PrivateKey(XFILE fp, WOLFSSL_EVP_PKEY **x, 114 157 pem_password_cb *cb, void *u); 158 159 WOLFSSL_API 160 int wolfSSL_PEM_write_X509(XFILE fp, WOLFSSL_X509 *x); 115 161 #endif /* NO_FILESYSTEM */ 162 163 #define PEM_read wolfSSL_PEM_read 164 #define PEM_read_bio wolfSSL_PEM_read_bio 165 #define PEM_write wolfSSL_PEM_write 166 #define PEM_write_bio wolfSSL_PEM_write_bio 116 167 117 168 #define PEM_read_X509 wolfSSL_PEM_read_X509 118 169 #define PEM_read_PrivateKey wolfSSL_PEM_read_PrivateKey 170 #define PEM_write_X509 wolfSSL_PEM_write_X509 119 171 #define PEM_write_bio_PrivateKey wolfSSL_PEM_write_bio_PrivateKey 172 #define PEM_write_bio_PKCS8PrivateKey wolfSSL_PEM_write_bio_PKCS8PrivateKey 120 173 /* RSA */ 121 174 #define PEM_write_bio_RSAPrivateKey wolfSSL_PEM_write_bio_RSAPrivateKey 175 #define PEM_read_bio_RSAPrivateKey wolfSSL_PEM_read_bio_RSAPrivateKey 122 176 #define PEM_write_RSAPrivateKey wolfSSL_PEM_write_RSAPrivateKey 123 177 #define PEM_write_RSA_PUBKEY wolfSSL_PEM_write_RSA_PUBKEY … … 135 189 #define PEM_read_bio_PrivateKey wolfSSL_PEM_read_bio_PrivateKey 136 190 #define PEM_read_PUBKEY wolfSSL_PEM_read_PUBKEY 137 #define EVP_PKEY_type wolfSSL_EVP_PKEY_type191 #define PEM_read_bio_PUBKEY wolfSSL_PEM_read_bio_PUBKEY 138 192 139 193 #ifdef __cplusplus -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/rand.h
r337 r372 1 /* rand.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* rand.h for openSSL */ 2 23 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/ripemd.h
r337 r372 1 /* ripemd.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* ripemd.h for openssl */ 2 23 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/rsa.h
r337 r372 1 /* rsa.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* rsa.h for openSSL */ 2 23 … … 12 33 #endif 13 34 14 15 enum { 16 RSA_PKCS1_PADDING = 1, 17 RSA_PKCS1_OAEP_PADDING = 4 18 }; 19 20 /* rsaTypes */ 21 enum { 22 NID_sha256 = 672, 23 NID_sha384 = 673, 24 NID_sha512 = 674 25 }; 35 /* Padding types */ 36 #define RSA_PKCS1_PADDING 0 37 #define RSA_PKCS1_OAEP_PADDING 1 26 38 27 39 #ifndef WOLFSSL_RSA_TYPE_DEFINED /* guard on redeclaration */ … … 33 45 34 46 struct WOLFSSL_RSA { 47 #ifdef WC_RSA_BLINDING 48 WC_RNG* rng; /* for PrivateDecrypt blinding */ 49 #endif 35 50 WOLFSSL_BIGNUM* n; 36 51 WOLFSSL_BIGNUM* e; … … 41 56 WOLFSSL_BIGNUM* dmq1; /* dQ */ 42 57 WOLFSSL_BIGNUM* iqmp; /* u */ 58 void* heap; 43 59 void* internal; /* our RSA */ 44 60 char inSet; /* internal set from external ? */ 45 61 char exSet; /* external set from internal ? */ 62 char ownRng; /* flag for if the rng should be free'd */ 46 63 }; 47 64 … … 58 75 WOLFSSL_API int wolfSSL_RSA_private_decrypt(int len, const unsigned char* fr, 59 76 unsigned char* to, WOLFSSL_RSA*, int padding); 77 WOLFSSL_API int wolfSSL_RSA_private_encrypt(int len, unsigned char* in, 78 unsigned char* out, WOLFSSL_RSA* rsa, int padding); 60 79 61 80 WOLFSSL_API int wolfSSL_RSA_size(const WOLFSSL_RSA*); … … 63 82 unsigned int mLen, unsigned char* sigRet, 64 83 unsigned int* sigLen, WOLFSSL_RSA*); 84 WOLFSSL_API int wolfSSL_RSA_sign_ex(int type, const unsigned char* m, 85 unsigned int mLen, unsigned char* sigRet, 86 unsigned int* sigLen, WOLFSSL_RSA*, int); 87 WOLFSSL_API int wolfSSL_RSA_verify(int type, const unsigned char* m, 88 unsigned int mLen, const unsigned char* sig, 89 unsigned int sigLen, WOLFSSL_RSA*); 65 90 WOLFSSL_API int wolfSSL_RSA_public_decrypt(int flen, const unsigned char* from, 66 91 unsigned char* to, WOLFSSL_RSA*, int padding); 67 92 WOLFSSL_API int wolfSSL_RSA_GenAdd(WOLFSSL_RSA*); 68 93 WOLFSSL_API int wolfSSL_RSA_LoadDer(WOLFSSL_RSA*, const unsigned char*, int sz); 94 WOLFSSL_API int wolfSSL_RSA_LoadDer_ex(WOLFSSL_RSA*, const unsigned char*, int sz, int opt); 69 95 96 #define WOLFSSL_RSA_LOAD_PRIVATE 1 97 #define WOLFSSL_RSA_LOAD_PUBLIC 2 98 #define WOLFSSL_RSA_F4 0x10001L 70 99 71 100 #define RSA_new wolfSSL_RSA_new … … 77 106 #define RSA_public_encrypt wolfSSL_RSA_public_encrypt 78 107 #define RSA_private_decrypt wolfSSL_RSA_private_decrypt 108 #define RSA_private_encrypt wolfSSL_RSA_private_encrypt 79 109 80 110 #define RSA_size wolfSSL_RSA_size 81 111 #define RSA_sign wolfSSL_RSA_sign 112 #define RSA_verify wolfSSL_RSA_verify 82 113 #define RSA_public_decrypt wolfSSL_RSA_public_decrypt 83 114 115 #define RSA_F4 WOLFSSL_RSA_F4 84 116 85 117 #ifdef __cplusplus -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/sha.h
r337 r372 1 /* sha.h 2 * 3 * Copyright (C) 2006-2017 wolfSSL Inc. 4 * 5 * This file is part of wolfSSL. 6 * 7 * wolfSSL is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * wolfSSL is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 20 */ 21 1 22 /* sha.h for openssl */ 2 23 … … 19 40 typedef struct WOLFSSL_SHA_CTX { 20 41 /* big enough to hold wolfcrypt Sha, but check on init */ 21 int holder[28 + (WC_ASYNC_DEV_SIZE / sizeof(int))];42 void* holder[(112 + WC_ASYNC_DEV_SIZE) / sizeof(void*)]; 22 43 } WOLFSSL_SHA_CTX; 23 44 … … 54 75 typedef struct WOLFSSL_SHA224_CTX { 55 76 /* big enough to hold wolfcrypt Sha224, but check on init */ 56 ALIGN16 int holder[34 + (WC_ASYNC_DEV_SIZE / sizeof(int))];77 ALIGN16 void* holder[(272 + WC_ASYNC_DEV_SIZE) / sizeof(void*)]; 57 78 } WOLFSSL_SHA224_CTX; 58 79 … … 81 102 typedef struct WOLFSSL_SHA256_CTX { 82 103 /* big enough to hold wolfcrypt Sha256, but check on init */ 83 ALIGN16 int holder[34 + (WC_ASYNC_DEV_SIZE / sizeof(int))];104 ALIGN16 void* holder[(272 + WC_ASYNC_DEV_SIZE) / sizeof(void*)]; 84 105 } WOLFSSL_SHA256_CTX; 85 106 … … 99 120 #define SHA256_Update wolfSSL_SHA256_Update 100 121 #define SHA256_Final wolfSSL_SHA256_Final 122 #if defined(NO_OLD_SHA_NAMES) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) 123 /* SHA256 is only available in non-fips mode because of SHA256 enum in FIPS 124 * build. */ 125 #define SHA256 wolfSSL_SHA256 126 #endif 101 127 102 128 … … 105 131 typedef struct WOLFSSL_SHA384_CTX { 106 132 /* big enough to hold wolfCrypt Sha384, but check on init */ 107 long long holder[32 + (WC_ASYNC_DEV_SIZE / sizeof(long long))];133 void* holder[(256 + WC_ASYNC_DEV_SIZE) / sizeof(void*)]; 108 134 } WOLFSSL_SHA384_CTX; 109 135 … … 123 149 #define SHA384_Update wolfSSL_SHA384_Update 124 150 #define SHA384_Final wolfSSL_SHA384_Final 125 151 #if defined(NO_OLD_SHA_NAMES) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) 152 /* SHA384 is only available in non-fips mode because of SHA384 enum in FIPS 153 * build. */ 154 #define SHA384 wolfSSL_SHA384 155 #endif 126 156 #endif /* WOLFSSL_SHA384 */ 127 157 … … 130 160 typedef struct WOLFSSL_SHA512_CTX { 131 161 /* big enough to hold wolfCrypt Sha384, but check on init */ 132 long long holder[36 + (WC_ASYNC_DEV_SIZE / sizeof(long long))];162 void* holder[(288 + WC_ASYNC_DEV_SIZE) / sizeof(void*)]; 133 163 } WOLFSSL_SHA512_CTX; 134 164 … … 148 178 #define SHA512_Update wolfSSL_SHA512_Update 149 179 #define SHA512_Final wolfSSL_SHA512_Final 150 180 #if defined(NO_OLD_SHA_NAMES) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) 181 /* SHA512 is only available in non-fips mode because of SHA512 enum in FIPS 182 * build. */ 183 #define SHA512 wolfSSL_SHA512 184 #endif 151 185 #endif /* WOLFSSL_SHA512 */ 152 186 -
asp3_tinet_ecnl_rx/trunk/wolfssl-3.12.2/wolfssl/openssl/ssl.h
r337 r372 31 31 32 32 /* wolfssl_openssl compatibility layer */ 33 #ifndef OPENSSL_EXTRA_SSL_GUARD 34 #define OPENSSL_EXTRA_SSL_GUARD 33 35 #include <wolfssl/ssl.h> 36 #endif /* OPENSSL_EXTRA_SSL_GUARD */ 34 37 35 38 #include <wolfssl/openssl/evp.h> 39 #ifdef OPENSSL_EXTRA 40 #include <wolfssl/openssl/crypto.h> 41 #endif 42 43 #if defined(WOLFSSL_ASIO) || defined(WOLFSSL_HAPROXY) 44 #include <wolfssl/wolfcrypt/asn.h> 45 #endif 36 46 37 47 #ifdef __cplusplus … … 56 66 57 67 typedef WOLFSSL_X509 X509; 68 typedef WOLFSSL_X509 X509_REQ; 58 69 typedef WOLFSSL_X509_NAME X509_NAME; 59 70 typedef WOLFSSL_X509_CHAIN X509_CHAIN; 60 71 72 typedef WOLFSSL_STACK EXTENDED_KEY_USAGE; 73 61 74 62 75 /* redeclare guard */ 63 76 #define WOLFSSL_TYPES_DEFINED 64 77 65 66 typedef WOLFSSL_EVP_PKEY EVP_PKEY;67 78 typedef WOLFSSL_BIO BIO; 68 79 typedef WOLFSSL_BIO_METHOD BIO_METHOD; … … 87 98 #define ASN1_GENERALIZEDTIME WOLFSSL_ASN1_TIME 88 99 89 typedef WOLFSSL_MD4_CTX MD4_CTX;90 100 typedef WOLFSSL_COMP_METHOD COMP_METHOD; 91 101 typedef WOLFSSL_X509_REVOKED X509_REVOKED; … … 94 104 typedef WOLFSSL_X509_STORE_CTX X509_STORE_CTX; 95 105 106 #define EVP_CIPHER_INFO EncryptedInfo 107 108 #define STACK_OF(x) WOLFSSL_STACK 109 96 110 #define CRYPTO_free XFREE 97 111 #define CRYPTO_malloc XMALLOC 112 #define CRYPTO_EX_new WOLFSSL_CRYPTO_EX_new 113 #define CRYPTO_EX_dup WOLFSSL_CRYPTO_EX_dup 114 #define CRYPTO_EX_free WOLFSSL_CRYPTO_EX_free 115 116 /* depreciated */ 117 #define CRYPTO_thread_id wolfSSL_thread_id 118 #define CRYPTO_set_id_callback wolfSSL_set_id_callback 119 120 #define CRYPTO_LOCK 0x01 121 #define CRYPTO_UNLOCK 0x02 122 #define CRYPTO_READ 0x04 123 #define CRYPTO_WRITE 0x08 124 125 #define CRYPTO_set_locking_callback wolfSSL_set_locking_callback 126 #define CRYPTO_set_dynlock_create_callback wolfSSL_set_dynlock_create_callback 127 #define CRYPTO_set_dynlock_lock_callback wolfSSL_set_dynlock_lock_callback 128 #define CRYPTO_set_dynlock_destroy_callback wolfSSL_set_dynlock_destroy_callback 129 #define CRYPTO_num_locks wolfSSL_num_locks 130 #define CRYPTO_dynlock_value WOLFSSL_dynlock_value 131 132 #define CRYPTO_cleanup_all_ex_data wolfSSL_cleanup_all_ex_data 133 134 /* this function was used to set the default malloc, free, and realloc */ 135 #define CRYPTO_malloc_init() /* CRYPTO_malloc_init is not needed */ 98 136 99 137 #define SSL_get_client_random(ssl,out,outSz) \ … … 103 141 #define SSL_get_shared_ciphers(ctx,buf,len) \ 104 142 wolfSSL_get_shared_ciphers((ctx),(buf),(len)) 105 106 #define ERR_print_errors_fp(file) wolfSSL_ERR_dump_errors_fp((file))107 143 108 144 /* at the moment only returns ok */ … … 115 151 #define SSL_use_certificate wolfSSL_use_certificate 116 152 #define SSL_use_certificate_ASN1 wolfSSL_use_certificate_ASN1 117 153 #define d2i_PKCS8_PRIV_KEY_INFO_bio wolfSSL_d2i_PKCS8_PKEY_bio 154 #define d2i_PKCS8PrivateKey_bio wolfSSL_d2i_PKCS8PrivateKey_bio 155 #define PKCS8_PRIV_KEY_INFO_free wolfSSL_EVP_PKEY_free 156 #define d2i_PKCS12_fp wolfSSL_d2i_PKCS12_fp 157 158 #define d2i_PUBKEY wolfSSL_d2i_PUBKEY 159 #define d2i_PUBKEY_bio wolfSSL_d2i_PUBKEY_bio 160 #define d2i_PrivateKey wolfSSL_d2i_PrivateKey 161 #define d2i_AutoPrivateKey wolfSSL_d2i_AutoPrivateKey 118 162 #define SSL_use_PrivateKey wolfSSL_use_PrivateKey 119 163 #define SSL_use_PrivateKey_ASN1 wolfSSL_use_PrivateKey_ASN1 … … 122 166 123 167 #define SSLv23_method wolfSSLv23_method 168 #define SSLv23_client_method wolfSSLv23_client_method 169 #define SSLv2_client_method wolfSSLv2_client_method 170 #define SSLv2_server_method wolfSSLv2_server_method 124 171 #define SSLv3_server_method wolfSSLv3_server_method 125 172 #define SSLv3_client_method wolfSSLv3_client_method 173 #define TLSv1_method wolfTLSv1_method 126 174 #define TLSv1_server_method wolfTLSv1_server_method 127 175 #define TLSv1_client_method wolfTLSv1_client_method 176 #define TLSv1_1_method wolfTLSv1_1_method 128 177 #define TLSv1_1_server_method wolfTLSv1_1_server_method 129 178 #define TLSv1_1_client_method wolfTLSv1_1_client_method 179 #define TLSv1_2_method wolfTLSv1_2_method 130 180 #define TLSv1_2_server_method wolfTLSv1_2_server_method 131 181 #define TLSv1_2_client_method wolfTLSv1_2_client_method 182 #define TLSv1_3_method wolfTLSv1_3_method 183 #define TLSv1_3_server_method wolfTLSv1_3_server_method 184 #define TLSv1_3_client_method wolfTLSv1_3_client_method 185 186 #define X509_FILETYPE_ASN1 SSL_FILETYPE_ASN1 132 187 133 188 #ifdef WOLFSSL_DTLS … … 185 240 #define SSL_CTX_set_cipher_list wolfSSL_CTX_set_cipher_list 186 241 #define SSL_set_cipher_list wolfSSL_set_cipher_list 187 188 #define ERR_error_string wolfSSL_ERR_error_string189 #define ERR_error_string_n wolfSSL_ERR_error_string_n190 #define ERR_reason_error_string wolfSSL_ERR_reason_error_string191 242 192 243 #define SSL_set_ex_data wolfSSL_set_ex_data … … 216 267 #define SSL_SESSION_get_master_key_length wolfSSL_SESSION_get_master_key_length 217 268 218 #define X509_NAME_get_text_by_NID wolfSSL_X509_NAME_get_text_by_NID 219 #define X509_get_ext_d2i wolfSSL_X509_get_ext_d2i 220 #define X509_digest wolfSSL_X509_digest 269 #define DSA_dup_DH wolfSSL_DSA_dup_DH 270 271 #define i2d_X509_bio wolfSSL_i2d_X509_bio 272 #define d2i_X509_bio wolfSSL_d2i_X509_bio 273 #define d2i_X509_fp wolfSSL_d2i_X509_fp 274 #define i2d_X509 wolfSSL_i2d_X509 275 #define d2i_X509 wolfSSL_d2i_X509 276 #define PEM_read_bio_X509 wolfSSL_PEM_read_bio_X509 277 #define PEM_read_bio_X509_AUX wolfSSL_PEM_read_bio_X509_AUX 278 #define PEM_read_X509 wolfSSL_PEM_read_X509 279 #define PEM_write_bio_X509 wolfSSL_PEM_write_bio_X509 280 #define PEM_write_bio_X509_AUX wolfSSL_PEM_write_bio_X509_AUX 281 282 #define i2d_X509_REQ wolfSSL_i2d_X509_REQ 283 #define X509_REQ_new wolfSSL_X509_REQ_new 284 #define X509_REQ_free wolfSSL_X509_REQ_free 285 #define X509_REQ_sign wolfSSL_X509_REQ_sign 286 #define X509_REQ_set_subject_name wolfSSL_X509_REQ_set_subject_name 287 #define X509_REQ_set_pubkey wolfSSL_X509_REQ_set_pubkey 288 #define PEM_write_bio_X509_REQ wolfSSL_PEM_write_bio_X509_REQ 289 290 #define X509_new wolfSSL_X509_new 221 291 #define X509_free wolfSSL_X509_free 222 #define OPENSSL_free wolfSSL_OPENSSL_free 292 #define X509_load_certificate_file wolfSSL_X509_load_certificate_file 293 #define X509_digest wolfSSL_X509_digest 294 #define X509_get_ext_d2i wolfSSL_X509_get_ext_d2i 295 #define X509_get_issuer_name wolfSSL_X509_get_issuer_name 296 #define X509_get_subject_name wolfSSL_X509_get_subject_name 297 #define X509_get_pubkey wolfSSL_X509_get_pubkey 298 #define X509_get_notBefore(cert) (ASN1_TIME*)wolfSSL_X509_notBefore((cert)) 299 #define X509_get_notAfter(cert) (ASN1_TIME*)wolfSSL_X509_notAfter((cert)) 300 #define X509_get_serialNumber wolfSSL_X509_get_serialNumber 301 #define X509_get0_pubkey_bitstr wolfSSL_X509_get0_pubkey_bitstr 302 #define X509_get_ex_new_index wolfSSL_X509_get_ex_new_index 303 #define X509_get_ex_data wolfSSL_X509_get_ex_data 304 #define X509_set_ex_data wolfSSL_X509_set_ex_data 305 #define X509_get1_ocsp wolfSSL_X509_get1_ocsp 306 #ifndef WOLFSSL_HAPROXY 307 #define X509_get_version wolfSSL_X509_get_version 308 #endif 309 #define X509_get_signature_nid wolfSSL_X509_get_signature_nid 310 #define X509_set_subject_name wolfSSL_X509_set_subject_name 311 #define X509_set_pubkey wolfSSL_X509_set_pubkey 312 #define X509_print wolfSSL_X509_print 313 #define X509_verify_cert_error_string wolfSSL_X509_verify_cert_error_string 314 #define X509_verify_cert wolfSSL_X509_verify_cert 315 #define X509_check_private_key wolfSSL_X509_check_private_key 316 #define X509_check_ca wolfSSL_X509_check_ca 317 #define X509_check_host wolfSSL_X509_check_host 318 #define X509_email_free wolfSSL_X509_email_free 319 #define X509_check_issued wolfSSL_X509_check_issued 320 #define X509_dup wolfSSL_X509_dup 321 322 #define sk_X509_new wolfSSL_sk_X509_new 323 #define sk_X509_num wolfSSL_sk_X509_num 324 #define sk_X509_value wolfSSL_sk_X509_value 325 #define sk_X509_push wolfSSL_sk_X509_push 326 #define sk_X509_pop wolfSSL_sk_X509_pop 327 #define sk_X509_pop_free wolfSSL_sk_X509_pop_free 328 #define sk_X509_free wolfSSL_sk_X509_free 329 330 #define i2d_X509_NAME wolfSSL_i2d_X509_NAME 331 #define X509_NAME_new wolfSSL_X509_NAME_new 332 #define X509_NAME_free wolfSSL_X509_NAME_free 333 #define X509_NAME_get_text_by_NID wolfSSL_X509_NAME_get_text_by_NID 334 #define X509_NAME_cmp wolfSSL_X509_NAME_cmp 335 #define X509_NAME_ENTRY_free wolfSSL_X509_NAME_ENTRY_free 336 #define X509_NAME_ENTRY_create_by_NID wolfSSL_X509_NAME_ENTRY_create_by_NID 337 #define X509_NAME_add_entry wolfSSL_X509_NAME_add_entry 338 #define X509_NAME_add_entry_by_txt wolfSSL_X509_NAME_add_entry_by_txt 339 #define X509_NAME_oneline wolfSSL_X509_NAME_oneline 340 #define X509_NAME_get_index_by_NID wolfSSL_X509_NAME_get_index_by_NID 341 #define X509_NAME_print_ex wolfSSL_X509_NAME_print_ex 342 #define X509_NAME_digest wolfSSL_X509_NAME_digest 343 #define X509_cmp_current_time wolfSSL_X509_cmp_current_time 344 345 #define sk_X509_NAME_pop_free wolfSSL_sk_X509_NAME_pop_free 346 #define sk_X509_NAME_num wolfSSL_sk_X509_NAME_num 347 #define sk_X509_NAME_value wolfSSL_sk_X509_NAME_value 348 349 typedef WOLFSSL_X509_NAME_ENTRY X509_NAME_ENTRY; 350 351 #define X509_NAME_entry_count wolfSSL_X509_NAME_entry_count 352 #define X509_NAME_ENTRY_get_object wolfSSL_X509_NAME_ENTRY_get_object 353 #define X509_NAME_get_entry wolfSSL_X509_NAME_get_entry 354 #define X509_NAME_ENTRY_get_data wolfSSL_X509_NAME_ENTRY_get_data 355 #define X509_NAME_ENTRY_get_object wolfSSL_X509_NAME_ENTRY_get_object 356 357 #define X509_V_FLAG_CRL_CHECK WOLFSSL_CRL_CHECK 358 #define X509_V_FLAG_CRL_CHECK_ALL WOLFSSL_CRL_CHECKALL 359 360 #define X509_V_FLAG_USE_CHECK_TIME WOLFSSL_USE_CHECK_TIME 361 #define X509_V_FLAG_NO_CHECK_TIME WOLFSSL_NO_CHECK_TIME 362 #define X509_CHECK_FLAG_NO_WILDCARDS WOLFSSL_NO_WILDCARDS 363 364 #define X509_STORE_CTX_get_current_cert wolfSSL_X509_STORE_CTX_get_current_cert 365 #define X509_STORE_CTX_set_verify_cb wolfSSL_X509_STORE_CTX_set_verify_cb 366 #define X509_STORE_CTX_new wolfSSL_X509_STORE_CTX_new 367 #define X509_STORE_CTX_free wolfSSL_X509_STORE_CTX_free 368 #define X509_STORE_CTX_get_chain wolfSSL_X509_STORE_CTX_get_chain 369 #define X509_STORE_CTX_get_error wolfSSL_X509_STORE_CTX_get_error 370 #define X509_STORE_CTX_get_error_depth wolfSSL_X509_STORE_CTX_get_error_depth 371 #define X509_STORE_CTX_init wolfSSL_X509_STORE_CTX_init 372 #define X509_STORE_CTX_cleanup wolfSSL_X509_STORE_CTX_cleanup 373 #define X509_STORE_CTX_set_error wolfSSL_X509_STORE_CTX_set_error 374 #define X509_STORE_CTX_get_ex_data wolfSSL_X509_STORE_CTX_get_ex_data 375 376 #define X509_STORE_new wolfSSL_X509_STORE_new 377 #define X509_STORE_free wolfSSL_X509_STORE_free 378 #define X509_STORE_add_lookup wolfSSL_X509_STORE_add_lookup 379 #define X509_STORE_add_cert wolfSSL_X509_STORE_add_cert 380 #define X509_STORE_add_crl wolfSSL_X509_STORE_add_crl 381 #define X509_STORE_set_flags wolfSSL_X509_STORE_set_flags 382 #define X509_STORE_get1_certs wolfSSL_X509_STORE_get1_certs 383 #define X509_STORE_get_by_subject wolfSSL_X509_STORE_get_by_subject 384 #define X509_STORE_CTX_get1_issuer wolfSSL_X509_STORE_CTX_get1_issuer 385 #define X509_STORE_CTX_set_time wolfSSL_X509_STORE_CTX_set_time 386 387 #define X509_LOOKUP_add_dir wolfSSL_X509_LOOKUP_add_dir 388 #define X509_LOOKUP_load_file wolfSSL_X509_LOOKUP_load_file 389 #define X509_LOOKUP_hash_dir wolfSSL_X509_LOOKUP_hash_dir 390 #define X509_LOOKUP_file wolfSSL_X509_LOOKUP_file 391 392 #define d2i_X509_CRL wolfSSL_d2i_X509_CRL 393 #define d2i_X509_CRL_fp wolfSSL_d2i_X509_CRL_fp 394 #define PEM_read_X509_CRL wolfSSL_PEM_read_X509_CRL 395 396 #define X509_CRL_free wolfSSL_X509_CRL_free 397 #define X509_CRL_get_lastUpdate wolfSSL_X509_CRL_get_lastUpdate 398 #define X509_CRL_get_nextUpdate wolfSSL_X509_CRL_get_nextUpdate 399 #define X509_CRL_verify wolfSSL_X509_CRL_verify 400 #define X509_CRL_get_REVOKED wolfSSL_X509_CRL_get_REVOKED 401 402 #define sk_X509_REVOKED_num wolfSSL_sk_X509_REVOKED_num 403 #define sk_X509_REVOKED_value wolfSSL_sk_X509_REVOKED_value 404 405 #define X509_OBJECT_free_contents wolfSSL_X509_OBJECT_free_contents 223 406 224 407 #define OCSP_parse_url wolfSSL_OCSP_parse_url 225 #define SSLv23_client_method wolfSSLv23_client_method226 #define SSLv2_client_method wolfSSLv2_client_method227 #define SSLv2_server_method wolfSSLv2_server_method228 408 229 409 #define MD4_Init wolfSSL_MD4_Init … … 260 440 #define BIO_set_flags wolfSSL_BIO_set_flags 261 441 262 #define OpenSSL_add_all_digests()263 #define OpenSSL_add_all_algorithms wolfSSL_add_all_algorithms264 442 #define SSLeay_add_ssl_algorithms wolfSSL_add_all_algorithms 265 443 #define SSLeay_add_all_algorithms wolfSSL_add_all_algorithms … … 271 449 #define RAND_egd wolfSSL_RAND_egd 272 450 #define RAND_seed wolfSSL_RAND_seed 451 #define RAND_cleanup wolfSSL_RAND_Cleanup 273 452 #define RAND_add wolfSSL_RAND_add 453 #define RAND_poll wolfSSL_RAND_poll 454 #define RAND_status wolfSSL_RAND_status 455 #define RAND_bytes wolfSSL_RAND_bytes 456 #define RAND_pseudo_bytes wolfSSL_RAND_pseudo_bytes 274 457 275 458 #define COMP_zlib wolfSSL_COMP_zlib … … 279 462 #define SSL_get_ex_new_index wolfSSL_get_ex_new_index 280 463 281 #define CRYPTO_set_id_callback wolfSSL_set_id_callback 282 #define CRYPTO_set_locking_callback wolfSSL_set_locking_callback 283 #define CRYPTO_set_dynlock_create_callback wolfSSL_set_dynlock_create_callback 284 #define CRYPTO_set_dynlock_lock_callback wolfSSL_set_dynlock_lock_callback 285 #define CRYPTO_set_dynlock_destroy_callback wolfSSL_set_dynlock_destroy_callback 286 #define CRYPTO_num_locks wolfSSL_num_locks 287 288 289 #define CRYPTO_LOCK 1 290 #define CRYPTO_UNLOCK 2 291 #define CRYPTO_READ 4 292 #define CRYPTO_WRITE 8 293 294 #define X509_STORE_CTX_get_current_cert wolfSSL_X509_STORE_CTX_get_current_cert 295 #define X509_STORE_add_cert wolfSSL_X509_STORE_add_cert 296 #define X509_STORE_set_flags wolfSSL_X509_STORE_set_flags 297 #define X509_STORE_CTX_get_chain wolfSSL_X509_STORE_CTX_get_chain 298 #define X509_STORE_CTX_get_error wolfSSL_X509_STORE_CTX_get_error 299 #define X509_STORE_CTX_get_error_depth wolfSSL_X509_STORE_CTX_get_error_depth 300 301 #define X509_NAME_oneline wolfSSL_X509_NAME_oneline 302 #define X509_get_issuer_name wolfSSL_X509_get_issuer_name 303 #define X509_get_subject_name wolfSSL_X509_get_subject_name 304 #define X509_verify_cert_error_string wolfSSL_X509_verify_cert_error_string 305 306 #define X509_LOOKUP_add_dir wolfSSL_X509_LOOKUP_add_dir 307 #define X509_LOOKUP_load_file wolfSSL_X509_LOOKUP_load_file 308 #define X509_LOOKUP_hash_dir wolfSSL_X509_LOOKUP_hash_dir 309 #define X509_LOOKUP_file wolfSSL_X509_LOOKUP_file 310 311 #define X509_STORE_add_lookup wolfSSL_X509_STORE_add_lookup 312 #define X509_STORE_new wolfSSL_X509_STORE_new 313 #define X509_STORE_get_by_subject wolfSSL_X509_STORE_get_by_subject 314 #define X509_STORE_CTX_init wolfSSL_X509_STORE_CTX_init 315 #define X509_STORE_CTX_cleanup wolfSSL_X509_STORE_CTX_cleanup 316 317 #define X509_CRL_get_lastUpdate wolfSSL_X509_CRL_get_lastUpdate 318 #define X509_CRL_get_nextUpdate wolfSSL_X509_CRL_get_nextUpdate 319 320 #define X509_get_pubkey wolfSSL_X509_get_pubkey 321 #define X509_CRL_verify wolfSSL_X509_CRL_verify 322 #define X509_STORE_CTX_set_error wolfSSL_X509_STORE_CTX_set_error 323 #define X509_OBJECT_free_contents wolfSSL_X509_OBJECT_free_contents 324 #define EVP_PKEY_new wolfSSL_PKEY_new 325 #define EVP_PKEY_free wolfSSL_EVP_PKEY_free 326 #define EVP_PKEY_type wolfSSL_EVP_PKEY_type 327 #define EVP_PKEY_base_id wolfSSL_EVP_PKEY_base_id 328 #define X509_cmp_current_time wolfSSL_X509_cmp_current_time 329 #define sk_X509_REVOKED_num wolfSSL_sk_X509_REVOKED_num 330 #define X509_CRL_get_REVOKED wolfSSL_X509_CRL_get_REVOKED 331 #define sk_X509_REVOKED_value wolfSSL_sk_X509_REVOKED_value 332 #define X509_get_notBefore(cert) (ASN1_TIME*)wolfSSL_X509_notBefore((cert)) 333 #define X509_get_notAfter(cert) (ASN1_TIME*)wolfSSL_X509_notAfter((cert)) 334 335 336 #define X509_get_serialNumber wolfSSL_X509_get_serialNumber 337 464 465 typedef WOLFSSL_ASN1_BIT_STRING ASN1_BIT_STRING; 466 467 #define ASN1_TIME_adj wolfSSL_ASN1_TIME_adj 338 468 #define ASN1_TIME_print wolfSSL_ASN1_TIME_print 469 #define ASN1_TIME_to_generalizedtime wolfSSL_ASN1_TIME_to_generalizedtime 339 470 #define ASN1_GENERALIZEDTIME_print wolfSSL_ASN1_GENERALIZEDTIME_print 340 471 #define ASN1_GENERALIZEDTIME_free wolfSSL_ASN1_GENERALIZEDTIME_free 472 473 #define ASN1_tag2str wolfSSL_ASN1_tag2str 474 475 #define i2a_ASN1_INTEGER wolfSSL_i2a_ASN1_INTEGER 476 #define i2c_ASN1_INTEGER wolfSSL_i2c_ASN1_INTEGER 477 #define ASN1_INTEGER_new wolfSSL_ASN1_INTEGER_new 478 #define ASN1_INTEGER_free wolfSSL_ASN1_INTEGER_free 341 479 #define ASN1_INTEGER_cmp wolfSSL_ASN1_INTEGER_cmp 342 480 #define ASN1_INTEGER_get wolfSSL_ASN1_INTEGER_get 343 481 #define ASN1_INTEGER_to_BN wolfSSL_ASN1_INTEGER_to_BN 482 483 #define ASN1_STRING_data wolfSSL_ASN1_STRING_data 484 #define ASN1_STRING_get0_data wolfSSL_ASN1_STRING_data 485 #define ASN1_STRING_length wolfSSL_ASN1_STRING_length 344 486 #define ASN1_STRING_to_UTF8 wolfSSL_ASN1_STRING_to_UTF8 487 #define ASN1_STRING_print_ex wolfSSL_ASN1_STRING_print_ex 488 489 #define ASN1_UTCTIME_pr wolfSSL_ASN1_UTCTIME_pr 490 491 #define ASN1_IA5STRING WOLFSSL_ASN1_STRING 492 493 #define ASN1_OCTET_STRING WOLFSSL_ASN1_STRING 345 494 346 495 #define SSL_load_client_CA_file wolfSSL_load_client_CA_file … … 350 499 #define SSL_CTX_set_cert_store wolfSSL_CTX_set_cert_store 351 500 #define SSL_CTX_get_cert_store wolfSSL_CTX_get_cert_store 352 #define X509_STORE_CTX_get_ex_data wolfSSL_X509_STORE_CTX_get_ex_data353 501 #define SSL_get_ex_data_X509_STORE_CTX_idx wolfSSL_get_ex_data_X509_STORE_CTX_idx 354 502 #define SSL_get_ex_data wolfSSL_get_ex_data … … 357 505 #define SSL_CTX_set_default_passwd_cb wolfSSL_CTX_set_default_passwd_cb 358 506 359 #define SSL_CTX_set_timeout(ctx, to) wolfSSL_CTX_set_timeout(ctx, (unsigned int) to) 507 #define SSL_CTX_set_timeout(ctx, to) \ 508 wolfSSL_CTX_set_timeout(ctx, (unsigned int) to) 360 509 #define SSL_CTX_set_info_callback wolfSSL_CTX_set_info_callback 361 362 #define ERR_peek_error wolfSSL_ERR_peek_error 363 #define ERR_peek_last_error_line wolfSSL_ERR_peek_last_error_line 364 #define ERR_peek_errors_fp wolfSSL_ERR_peek_errors_fp 365 #define ERR_GET_REASON wolfSSL_ERR_GET_REASON 510 #define SSL_CTX_set_alpn_protos wolfSSL_CTX_set_alpn_protos 366 511 367 512 #define SSL_alert_type_string wolfSSL_alert_type_string … … 391 536 392 537 #define SSL_DEFAULT_CIPHER_LIST WOLFSSL_DEFAULT_CIPHER_LIST 393 #define RSA_F4 WOLFSSL_RSA_F4394 538 395 539 #define SSL_CTX_set_psk_client_callback wolfSSL_CTX_set_psk_client_callback … … 405 549 #define SSL_set_psk_server_callback wolfSSL_set_psk_server_callback 406 550 407 #define ERR_get_error_line_data wolfSSL_ERR_get_error_line_data 408 551 /* system file ints for ERR_put_error */ 552 #define SYS_F_ACCEPT WOLFSSL_SYS_ACCEPT 553 #define SYS_F_BIND WOLFSSL_SYS_BIND 554 #define SYS_F_CONNECT WOLFSSL_SYS_CONNECT 555 #define SYS_F_FOPEN WOLFSSL_SYS_FOPEN 556 #define SYS_F_FREAD WOLFSSL_SYS_FREAD 557 #define SYS_F_GETADDRINFO WOLFSSL_SYS_GETADDRINFO 558 #define SYS_F_GETSOCKOPT WOLFSSL_SYS_GETSOCKOPT 559 #define SYS_F_GETSOCKNAME WOLFSSL_SYS_GETSOCKNAME 560 #define SYS_F_OPENDIR WOLFSSL_SYS_OPENDIR 561 #define SYS_F_SETSOCKOPT WOLFSSL_SYS_SETSOCKOPT 562 #define SYS_F_SOCKET WOLFSSL_SYS_SOCKET 563 #define SYS_F_GETHOSTBYNAME WOLFSSL_SYS_GETHOSTBYNAME 564 #define SYS_F_GETNAMEINFO WOLFSSL_SYS_GETNAMEINFO 565 #define SYS_F_GETSERVBYNAME WOLFSSL_SYS_GETSERVBYNAME 566 #define SYS_F_IOCTLSOCKET WOLFSSL_SYS_IOCTLSOCKET 567 #define SYS_F_LISTEN WOLFSSL_SYS_LISTEN 568 569 #define ERR_GET_REASON wolfSSL_ERR_GET_REASON 570 571 #define ERR_put_error wolfSSL_ERR_put_error 572 #define ERR_peek_error wolfSSL_ERR_peek_error 573 #define ERR_peek_errors_fp wolfSSL_ERR_peek_errors_fp 574 #define ERR_peek_error_line_data wolfSSL_ERR_peek_error_line_data 575 #define ERR_peek_last_error wolfSSL_ERR_peek_last_error 576 #define ERR_peek_last_error_line wolfSSL_ERR_peek_last_error_line 577 #define ERR_get_error_line wolfSSL_ERR_get_error_line 578 #define ERR_get_error_line_data wolfSSL_ERR_get_error_line_data 409 579 #define ERR_get_error wolfSSL_ERR_get_error 580 #define ERR_print_errors_fp(file) wolfSSL_ERR_dump_errors_fp((file)) 410 581 #define ERR_clear_error wolfSSL_ERR_clear_error 411 412 #define RAND_status wolfSSL_RAND_status 413 #define RAND_bytes wolfSSL_RAND_bytes 582 #define ERR_free_strings wolfSSL_ERR_free_strings 583 #define ERR_remove_state wolfSSL_ERR_remove_state 584 #define ERR_remove_thread_state wolfSSL_ERR_remove_thread_state 585 #define ERR_error_string wolfSSL_ERR_error_string 586 #define ERR_error_string_n wolfSSL_ERR_error_string_n 587 #define ERR_reason_error_string wolfSSL_ERR_reason_error_string 588 #define ERR_load_BIO_strings wolfSSL_ERR_load_BIO_strings 589 414 590 #define SSLv23_server_method wolfSSLv23_server_method 415 591 #define SSL_CTX_set_options wolfSSL_CTX_set_options 416 #define SSL_CTX_check_private_key wolfSSL_CTX_check_private_key 417 418 #define ERR_free_strings wolfSSL_ERR_free_strings 419 #define ERR_remove_state wolfSSL_ERR_remove_state 420 #define EVP_cleanup wolfSSL_EVP_cleanup 421 422 #define CRYPTO_cleanup_all_ex_data wolfSSL_cleanup_all_ex_data 592 #define SSL_CTX_get_options wolfSSL_CTX_get_options 593 #define SSL_CTX_clear_options wolfSSL_CTX_clear_options 594 595 #define SSL_CTX_check_private_key wolfSSL_CTX_check_private_key 596 #define SSL_check_private_key wolfSSL_check_private_key 597 423 598 #define SSL_CTX_set_mode wolfSSL_CTX_set_mode 424 599 #define SSL_CTX_get_mode wolfSSL_CTX_get_mode … … 430 605 #define SSL_CTX_set_session_id_context wolfSSL_CTX_set_session_id_context 431 606 #define SSL_get_peer_certificate wolfSSL_get_peer_certificate 607 #define SSL_get_peer_cert_chain wolfSSL_get_peer_cert_chain 432 608 433 609 #define SSL_want_read wolfSSL_want_read … … 435 611 436 612 #define BIO_prf wolfSSL_BIO_prf 437 #define ASN1_UTCTIME_pr wolfSSL_ASN1_UTCTIME_pr438 613 439 614 #define sk_num wolfSSL_sk_num 440 615 #define sk_value wolfSSL_sk_value 441 #define sk_X509_pop wolfSSL_sk_X509_pop 442 #define sk_X509_free wolfSSL_sk_X509_free 443 #define d2i_X509_bio wolfSSL_d2i_X509_bio 616 617 #define d2i_PKCS12_bio wolfSSL_d2i_PKCS12_bio 618 #define d2i_PKCS12_fp wolfSSL_d2i_PKCS12_fp 619 620 #define d2i_RSAPublicKey wolfSSL_d2i_RSAPublicKey 621 #define d2i_RSAPrivateKey wolfSSL_d2i_RSAPrivateKey 622 #define i2d_RSAPrivateKey wolfSSL_i2d_RSAPrivateKey 623 #define i2d_RSAPublicKey wolfSSL_i2d_RSAPublicKey 444 624 445 625 #define SSL_CTX_get_ex_data wolfSSL_CTX_get_ex_data … … 455 635 #define SSL_SESSION_get_time wolfSSL_SESSION_get_time 456 636 #define SSL_CTX_get_ex_new_index wolfSSL_CTX_get_ex_new_index 457 #define PEM_read_bio_X509 wolfSSL_PEM_read_bio_X509 458 #define PEM_read_bio_X509_AUX wolfSSL_PEM_read_bio_X509_AUX 637 #define PEM_read wolfSSL_PEM_read 638 #define PEM_write wolfSSL_PEM_write 639 #define PEM_get_EVP_CIPHER_INFO wolfSSL_PEM_get_EVP_CIPHER_INFO 640 #define PEM_do_header wolfSSL_PEM_do_header 459 641 460 642 /*#if OPENSSL_API_COMPAT < 0x10100000L*/ … … 467 649 #define SSL_set_tmp_rsa(ssl,rsa) 1 468 650 /*#endif*/ 651 469 652 #define CONF_modules_unload(a) 470 653 … … 474 657 #define SSL_get_default_timeout(ctx) 500 475 658 476 /* Lighthttp compatibility */477 478 #if defined(HAVE_LIGHTY) || defined(WOLFSSL_MYSQL_COMPATIBLE) || \479 defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || \480 defined(HAVE_POCO_LIB) || defined(WOLFSSL_HAPROXY)481 typedef WOLFSSL_X509_NAME_ENTRY X509_NAME_ENTRY;482 483 #define X509_NAME_free wolfSSL_X509_NAME_free484 659 #define SSL_CTX_use_certificate wolfSSL_CTX_use_certificate 485 660 #define SSL_CTX_use_PrivateKey wolfSSL_CTX_use_PrivateKey 486 661 #define BIO_read_filename wolfSSL_BIO_read_filename 487 662 #define BIO_s_file wolfSSL_BIO_s_file 488 #define OBJ_nid2sn wolfSSL_OBJ_nid2sn489 #define OBJ_obj2nid wolfSSL_OBJ_obj2nid490 #define OBJ_sn2nid wolfSSL_OBJ_sn2nid491 663 #define SSL_CTX_set_verify_depth wolfSSL_CTX_set_verify_depth 492 664 #define SSL_set_verify_depth wolfSSL_set_verify_depth 493 665 #define SSL_get_app_data wolfSSL_get_app_data 494 666 #define SSL_set_app_data wolfSSL_set_app_data 495 #define X509_NAME_entry_count wolfSSL_X509_NAME_entry_count496 #define X509_NAME_ENTRY_get_object wolfSSL_X509_NAME_ENTRY_get_object497 #define X509_NAME_get_entry wolfSSL_X509_NAME_get_entry498 #define ASN1_STRING_data wolfSSL_ASN1_STRING_data499 #define ASN1_STRING_length wolfSSL_ASN1_STRING_length500 #define X509_NAME_get_index_by_NID wolfSSL_X509_NAME_get_index_by_NID501 #define X509_NAME_ENTRY_get_data wolfSSL_X509_NAME_ENTRY_get_data502 #define sk_X509_NAME_pop_free wolfSSL_sk_X509_NAME_pop_free503 667 #define SHA1 wolfSSL_SHA1 504 #define X509_check_private_key wolfSSL_X509_check_private_key 668 505 669 #define SSL_dup_CA_list wolfSSL_dup_CA_list 506 670 507 #define NID_commonName 0x03 /* matchs ASN_COMMON_NAME in asn.h */ 508 509 #define OBJ_nid2ln wolfSSL_OBJ_nid2ln 510 #define OBJ_txt2nid wolfSSL_OBJ_txt2nid 671 enum { 672 GEN_DNS = 0x02, /* ASN_DNS_TYPE */ 673 GEN_EMAIL = 0x01, /* ASN_RFC822_TYPE */ 674 GEN_URI = 0x06 /* ASN_URI_TYPE */ 675 }; 676 511 677 #define PEM_read_bio_DHparams wolfSSL_PEM_read_bio_DHparams 512 678 #define PEM_read_bio_DSAparams wolfSSL_PEM_read_bio_DSAparams 513 #define PEM_write_bio_X509 wolfSSL_PEM_write_bio_X509 514 515 516 #ifdef WOLFSSL_HAPROXY 679 680 #if defined(OPENSSL_ALL) || defined(WOLFSSL_HAPROXY) 517 681 #define SSL_get_rbio wolfSSL_SSL_get_rbio 518 682 #define SSL_get_wbio wolfSSL_SSL_get_wbio … … 520 684 #define SSL_get_ciphers(x) wolfSSL_get_ciphers_compat(x) 521 685 #define SSL_SESSION_get_id wolfSSL_SESSION_get_id 522 #define ASN1_STRING_get0_data wolfSSL_ASN1_STRING_data523 #define SSL_get_cipher_bits(s,np)wolfSSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)686 #define SSL_get_cipher_bits(s,np) \ 687 wolfSSL_CIPHER_get_bits(SSL_get_current_cipher(s),np) 524 688 #define sk_SSL_CIPHER_num wolfSSL_sk_SSL_CIPHER_num 525 689 #define sk_SSL_COMP_zero wolfSSL_sk_SSL_COMP_zero 526 690 #define sk_SSL_CIPHER_value wolfSSL_sk_SSL_CIPHER_value 527 #endif /* WOLFSSL_HAPROXY */ 528 #endif /* HAVE_STUNNEL || HAVE_LIGHTY || WOLFSSL_MYSQL_COMPATIBLE || WOLFSSL_NGINX || HAVE_POCO_LIB || WOLFSSL_HAPROXY */ 691 #endif /* OPENSSL_ALL || WOLFSSL_HAPROXY */ 692 693 #if defined(OPENSSL_ALL) || defined(WOLFSSL_ASIO) 694 #include <wolfssl/openssl/pem.h> 695 696 typedef STACK_OF(WOLFSSL_ASN1_OBJECT) GENERAL_NAMES; 697 #define SSL_CTRL_CHAIN 88 698 #define BIO_CTRL_WPENDING 13 699 #define GEN_IPADD 7 700 #define ERR_LIB_SSL 20 701 #define SSL_R_SHORT_READ 10 702 #define ERR_R_PEM_LIB 9 703 #define V_ASN1_IA5STRING 22 704 #define SSL_CTRL_MODE 33 705 706 #define SSL_CTX_clear_chain_certs(ctx) SSL_CTX_set0_chain(ctx,NULL) 707 #define d2i_RSAPrivateKey_bio wolfSSL_d2i_RSAPrivateKey_bio 708 #define SSL_CTX_use_RSAPrivateKey wolfSSL_CTX_use_RSAPrivateKey 709 #define d2i_PrivateKey_bio wolfSSL_d2i_PrivateKey_bio 710 #define BIO_new_bio_pair wolfSSL_BIO_new_bio_pair 711 #define SSL_get_verify_callback wolfSSL_get_verify_callback 712 #define GENERAL_NAMES_free(GENERAL_NAMES)NULL 713 714 #define SSL_set_mode(ssl,op) wolfSSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL) 715 716 #define SSL_CTX_use_certificate_ASN1 wolfSSL_CTX_use_certificate_ASN1 717 #define SSL_CTX_set0_chain(ctx,sk) \ 718 wolfSSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN,0,(char *)(sk)) 719 #define SSL_CTX_get_app_data(ctx) wolfSSL_CTX_get_ex_data(ctx,0) 720 #define SSL_CTX_set_app_data(ctx,arg) wolfSSL_CTX_set_ex_data(ctx,0, \ 721 (char *)(arg)) 722 #endif /* OPENSSL_ALL || WOLFSSL_ASIO */ 529 723 530 724 #define SSL_CTX_set_tmp_dh wolfSSL_CTX_set_tmp_dh … … 533 727 #define BIO_ctrl wolfSSL_BIO_ctrl 534 728 #define BIO_ctrl_pending wolfSSL_BIO_ctrl_pending 729 #define BIO_wpending wolfSSL_BIO_wpending 535 730 #define BIO_get_mem_ptr wolfSSL_BIO_get_mem_ptr 536 731 #define BIO_int_ctrl wolfSSL_BIO_int_ctrl … … 551 746 #define BIO_set_mem_eof_return wolfSSL_BIO_set_mem_eof_return 552 747 748 #define TLSEXT_STATUSTYPE_ocsp 1 749 553 750 #define SSL_set_options wolfSSL_set_options 554 751 #define SSL_get_options wolfSSL_get_options 752 #define SSL_clear_options wolfSSL_clear_options 555 753 #define SSL_set_tmp_dh wolfSSL_set_tmp_dh 556 754 #define SSL_clear_num_renegotiations wolfSSL_clear_num_renegotiations … … 561 759 #define SSL_get_tlsext_status_ids wolfSSL_get_tlsext_status_ids 562 760 #define SSL_set_tlsext_status_ids wolfSSL_set_tlsext_status_ids 563 #define SSL_get_tlsext_status_ocsp_resp wolfSSL_get_tlsext_status_ocsp_resp 761 #define SSL_get_tlsext_status_ocsp_res wolfSSL_get_tlsext_status_ocsp_resp 762 #define SSL_set_tlsext_status_ocsp_res wolfSSL_set_tlsext_status_ocsp_resp 564 763 #define SSL_set_tlsext_status_ocsp_resp wolfSSL_set_tlsext_status_ocsp_resp 764 #define SSL_get_tlsext_status_ocsp_resp wolfSSL_get_tlsext_status_ocsp_resp 565 765 566 766 #define SSL_CTX_add_extra_chain_cert wolfSSL_CTX_add_extra_chain_cert … … 615 815 #define SSL_CTX_ctrl wolfSSL_CTX_ctrl 616 816 617 #define X509_V_FLAG_CRL_CHECK WOLFSSL_CRL_CHECK 618 #define X509_V_FLAG_CRL_CHECK_ALL WOLFSSL_CRL_CHECKALL 619 620 #if defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) 817 #define SSL3_RANDOM_SIZE 32 /* same as RAN_LEN in internal.h */ 818 #if defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || defined(OPENSSL_EXTRA) \ 819 || defined(OPENSSL_ALL) 621 820 #include <wolfssl/openssl/asn1.h> 622 821 … … 628 827 #define SSL3_ST_SR_CLNT_HELLO_A (0x110|0x2000) 629 828 #define ASN1_STRFLGS_ESC_MSB 4 630 #define X509_V_ERR_CERT_REJECTED 28631 829 632 830 #define SSL_MAX_MASTER_KEY_LENGTH WOLFSSL_MAX_MASTER_KEY_LENGTH … … 635 833 #define SSL_alert_type_string_long wolfSSL_alert_type_string_long 636 834 #define SSL_CIPHER_get_bits wolfSSL_CIPHER_get_bits 637 #define sk_X509_NAME_num wolfSSL_sk_X509_NAME_num 638 #define sk_X509_num wolfSSL_sk_X509_num 639 #define X509_NAME_print_ex wolfSSL_X509_NAME_print_ex 640 #define X509_get0_pubkey_bitstr wolfSSL_X509_get0_pubkey_bitstr 835 #define sk_GENERAL_NAME_num wolfSSL_sk_GENERAL_NAME_num 641 836 #define SSL_CTX_get_options wolfSSL_CTX_get_options 642 837 643 838 #define SSL_CTX_flush_sessions wolfSSL_flush_sessions 644 839 #define SSL_CTX_add_session wolfSSL_CTX_add_session 645 #define SSL_get_SSL_CTX wolfSSL_get_SSL_CTX646 840 #define SSL_version wolfSSL_version 647 841 #define SSL_get_state wolfSSL_get_state 648 842 #define SSL_state_string_long wolfSSL_state_string_long 649 #define SSL_get_peer_cert_chain wolfSSL_get_peer_cert_chain 650 #define sk_X509_NAME_value wolfSSL_sk_X509_NAME_value 651 #define sk_X509_value wolfSSL_sk_X509_value 843 844 #define sk_GENERAL_NAME_value wolfSSL_sk_GENERAL_NAME_value 652 845 #define SSL_SESSION_get_ex_data wolfSSL_SESSION_get_ex_data 653 846 #define SSL_SESSION_set_ex_data wolfSSL_SESSION_set_ex_data 654 847 #define SSL_SESSION_get_ex_new_index wolfSSL_SESSION_get_ex_new_index 655 848 #define SSL_SESSION_get_id wolfSSL_SESSION_get_id 656 #define CRYPTO_dynlock_value WOLFSSL_dynlock_value 657 typedef WOLFSSL_ASN1_BIT_STRING ASN1_BIT_STRING; 658 #define X509_STORE_get1_certs wolfSSL_X509_STORE_get1_certs 659 #define sk_X509_pop_free wolfSSL_sk_X509_pop_free 660 849 #define sk_GENERAL_NAME_pop_free wolfSSL_sk_GENERAL_NAME_pop_free 850 #define GENERAL_NAME_free NULL 851 852 #define SSL3_AL_FATAL 2 661 853 #define SSL_TLSEXT_ERR_OK 0 662 854 #define SSL_TLSEXT_ERR_ALERT_FATAL alert_fatal … … 673 865 #define PSK_MAX_PSK_LEN 256 674 866 #define PSK_MAX_IDENTITY_LEN 128 675 #define ERR_remove_thread_state WOLFSSL_ERR_remove_thread_state676 867 #define SSL_CTX_clear_options wolfSSL_CTX_clear_options 677 868 … … 680 871 #define SSL_CTX_get_default_passwd_cb wolfSSL_CTX_get_default_passwd_cb 681 872 #define SSL_CTX_get_default_passwd_cb_userdata wolfSSL_CTX_get_default_passwd_cb_userdata 682 683 /* certificate extension NIDs */684 #define NID_basic_constraints 133685 #define NID_key_usage 129 /* 2.5.29.15 */686 #define NID_ext_key_usage 151 /* 2.5.29.37 */687 #define NID_subject_key_identifier 128688 #define NID_authority_key_identifier 149689 #define NID_private_key_usage_period 130 /* 2.5.29.16 */690 #define NID_subject_alt_name 131691 #define NID_issuer_alt_name 132692 #define NID_info_access 69693 #define NID_sinfo_access 79 /* id-pe 11 */694 #define NID_name_constraints 144 /* 2.5.29.30 */695 #define NID_certificate_policies 146696 #define NID_policy_mappings 147697 #define NID_policy_constraints 150698 #define NID_inhibit_any_policy 168 /* 2.5.29.54 */699 #define NID_tlsfeature 92 /* id-pe 24 */700 701 873 702 874 #define SSL_CTX_set_msg_callback wolfSSL_CTX_set_msg_callback … … 705 877 #define SSL_set_msg_callback_arg wolfSSL_set_msg_callback_arg 706 878 707 /* certificate extension NIDs */ 708 #define NID_basic_constraints 133 709 #define NID_key_usage 129 /* 2.5.29.15 */ 710 #define NID_ext_key_usage 151 /* 2.5.29.37 */ 711 #define NID_subject_key_identifier 128 712 #define NID_authority_key_identifier 149 713 #define NID_private_key_usage_period 130 /* 2.5.29.16 */ 714 #define NID_subject_alt_name 131 715 #define NID_issuer_alt_name 132 716 #define NID_info_access 69 717 #define NID_sinfo_access 79 /* id-pe 11 */ 718 #define NID_name_constraints 144 /* 2.5.29.30 */ 719 #define NID_certificate_policies 146 720 #define NID_policy_mappings 147 721 #define NID_policy_constraints 150 722 #define NID_inhibit_any_policy 168 /* 2.5.29.54 */ 723 #define NID_tlsfeature 92 /* id-pe 24 */ 724 879 880 /* Nginx uses this to determine if reached end of certs in file. 881 * PEM_read_bio_X509 is called and the return error is lost. 882 * The error that needs to be detected is: SSL_NO_PEM_HEADER. 883 */ 884 #define ERR_GET_LIB(l) (int)((((unsigned long)l)>>24L)&0xffL) 885 #define PEM_R_NO_START_LINE 108 886 #define ERR_LIB_PEM 9 887 #define ERR_LIB_X509 10 725 888 726 889 #if defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) || \ 727 defined(WOLFSSL_MYSQL_COMPATIBLE) 890 defined(WOLFSSL_MYSQL_COMPATIBLE) || defined(OPENSSL_ALL) || \ 891 defined(HAVE_LIGHTY) 728 892 729 893 #include <wolfssl/error-ssl.h> … … 754 918 #define SSL_R_WRONG_VERSION_NUMBER VERSION_ERROR 755 919 #define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC ENCRYPT_ERROR 756 757 /* Nginx uses this to determine if reached end of certs in file. 758 * PEM_read_bio_X509 is called and the return error is lost. 759 * The error that needs to be detected is: SSL_NO_PEM_HEADER. 760 */ 761 #define ERR_GET_LIB(l) (int)((((unsigned long)l)>>24L)&0xffL) 762 #define PEM_R_NO_START_LINE 108 763 #define ERR_LIB_PEM 9 920 #define SSL_R_HTTPS_PROXY_REQUEST PARSE_ERROR 921 #define SSL_R_HTTP_REQUEST PARSE_ERROR 922 #define SSL_R_UNSUPPORTED_PROTOCOL VERSION_ERROR 923 764 924 765 925 #ifdef HAVE_SESSION_TICKET … … 769 929 770 930 #define OPENSSL_config wolfSSL_OPENSSL_config 771 #define X509_get_ex_new_index wolfSSL_X509_get_ex_new_index 772 #define X509_get_ex_data wolfSSL_X509_get_ex_data 773 #define X509_set_ex_data wolfSSL_X509_set_ex_data 774 #define X509_NAME_digest wolfSSL_X509_NAME_digest 931 #define OPENSSL_memdup wolfSSL_OPENSSL_memdup 775 932 #define SSL_CTX_get_timeout wolfSSL_SSL_CTX_get_timeout 776 933 #define SSL_CTX_set_tmp_ecdh wolfSSL_SSL_CTX_set_tmp_ecdh … … 781 938 #define SSL_in_init wolfSSL_SSL_in_init 782 939 #define SSL_get0_session wolfSSL_SSL_get0_session 783 #define X509_check_host wolfSSL_X509_check_host784 #define i2a_ASN1_INTEGER wolfSSL_i2a_ASN1_INTEGER785 #define ERR_peek_error_line_data wolfSSL_ERR_peek_error_line_data786 940 #define SSL_CTX_set_tlsext_ticket_key_cb wolfSSL_CTX_set_tlsext_ticket_key_cb 787 #define X509_email_free wolfSSL_X509_email_free788 #define X509_get1_ocsp wolfSSL_X509_get1_ocsp789 941 #define SSL_CTX_set_tlsext_status_cb wolfSSL_CTX_set_tlsext_status_cb 790 #define X509_check_issued wolfSSL_X509_check_issued791 #define X509_dup wolfSSL_X509_dup792 #define X509_STORE_CTX_new wolfSSL_X509_STORE_CTX_new793 #define X509_STORE_CTX_free wolfSSL_X509_STORE_CTX_free794 942 #define SSL_CTX_get_extra_chain_certs wolfSSL_CTX_get_extra_chain_certs 795 #define X509_STORE_CTX_get1_issuer wolfSSL_X509_STORE_CTX_get1_issuer796 943 #define sk_OPENSSL_STRING_value wolfSSL_sk_WOLFSSL_STRING_value 797 944 #define SSL_get0_alpn_selected wolfSSL_get0_alpn_selected … … 804 951 #define SSL_CTX_set1_curves_list wolfSSL_CTX_set1_curves_list 805 952 806 #endif /* WOLFSSL_NGINX || WOLFSSL_HAPROXY */ 953 #endif /* WOLFSSL_NGINX || WOLFSSL_HAPROXY || WOLFSSL_MYSQL_COMPATIBLE || 954 OPENSSL_ALL || HAVE_LIGHTY */ 955 956 #ifdef OPENSSL_EXTRA 957 #define SSL_CTX_add_client_CA wolfSSL_CTX_add_client_CA 958 #define SSL_CTX_set_srp_password wolfSSL_CTX_set_srp_password 959 #define SSL_CTX_set_srp_username wolfSSL_CTX_set_srp_username 960 #define SSL_get_SSL_CTX wolfSSL_get_SSL_CTX 961 962 #define ERR_NUM_ERRORS 16 963 #define EVP_PKEY_RSA 6 964 #define EVP_PKEY_RSA2 19 965 #define SN_pkcs9_emailAddress "Email" 966 #define LN_pkcs9_emailAddress "emailAddress" 967 #define NID_pkcs9_emailAddress 48 968 #define OBJ_pkcs9_emailAddress 1L,2L,840L,113539L,1L,9L,1L 969 970 #define SSL_get_rbio wolfSSL_SSL_get_rbio 971 #define SSL_get_wbio wolfSSL_SSL_get_wbio 972 #define SSL_do_handshake wolfSSL_SSL_do_handshake 973 #endif /* OPENSSL_EXTRA */ 807 974 808 975 #ifdef __cplusplus … … 810 977 #endif 811 978 812 813 979 #endif /* wolfSSL_openssl_h__ */
Note:
See TracChangeset
for help on using the changeset viewer.