Ignore:
Timestamp:
Feb 7, 2019, 8:36:33 AM (5 years ago)
Author:
coas-nagasima
Message:

wolfsslを3.15.7にバージョンアップ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_arm/trunk/wolfssl-3.12.2/wolfssl/openssl/sha.h

    r352 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
    122/* sha.h for openssl */
    223
     
    1940typedef struct WOLFSSL_SHA_CTX {
    2041    /* 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*)];
    2243} WOLFSSL_SHA_CTX;
    2344
     
    5475typedef struct WOLFSSL_SHA224_CTX {
    5576    /* 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*)];
    5778} WOLFSSL_SHA224_CTX;
    5879
     
    81102typedef struct WOLFSSL_SHA256_CTX {
    82103    /* 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*)];
    84105} WOLFSSL_SHA256_CTX;
    85106
     
    99120#define SHA256_Update wolfSSL_SHA256_Update
    100121#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
    101127
    102128
     
    105131typedef struct WOLFSSL_SHA384_CTX {
    106132    /* 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*)];
    108134} WOLFSSL_SHA384_CTX;
    109135
     
    123149#define SHA384_Update wolfSSL_SHA384_Update
    124150#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
    126156#endif /* WOLFSSL_SHA384 */
    127157
     
    130160typedef struct WOLFSSL_SHA512_CTX {
    131161    /* 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*)];
    133163} WOLFSSL_SHA512_CTX;
    134164
     
    148178#define SHA512_Update wolfSSL_SHA512_Update
    149179#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
    151185#endif /* WOLFSSL_SHA512 */
    152186
Note: See TracChangeset for help on using the changeset viewer.