- Timestamp:
- Feb 7, 2019, 8:36:33 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.