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/wolfcrypt/src/hmac.c

    r352 r372  
    1 /* hmac.h
     1/* hmac.c
    22 *
    33 * Copyright (C) 2006-2017 wolfSSL Inc.
     
    3030#ifndef NO_HMAC
    3131
     32#if defined(HAVE_FIPS) && \
     33    defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)
     34
     35    /* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */
     36    #define FIPS_NO_WRAPPERS
     37
     38    #ifdef USE_WINDOWS_API
     39        #pragma code_seg(".fipsA$b")
     40        #pragma const_seg(".fipsB$b")
     41    #endif
     42#endif
     43
    3244#include <wolfssl/wolfcrypt/hmac.h>
    3345
     
    4153
    4254/* fips wrapper calls, user can call direct */
    43 #ifdef HAVE_FIPS
     55/* If building for old FIPS. */
     56#if defined(HAVE_FIPS) && \
     57    (!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION < 2))
     58
    4459    /* does init */
    4560    int wc_HmacSetKey(Hmac* hmac, int type, const byte* key, word32 keySz)
     
    4762        if (hmac == NULL || (key == NULL && keySz != 0) ||
    4863           !(type == WC_MD5 || type == WC_SHA || type == WC_SHA256 ||
    49                 type == WC_SHA384 || type == WC_SHA512 || type == BLAKE2B_ID)) {
     64                type == WC_SHA384 || type == WC_SHA512 ||
     65                type == BLAKE2B_ID)) {
    5066            return BAD_FUNC_ARG;
    5167        }
     
    101117    #endif /* HAVE_HKDF */
    102118
    103 #else /* else build without fips */
    104 
    105 
    106 #include <wolfssl/wolfcrypt/error-crypt.h>
     119#else /* else build without fips, or for new fips */
    107120
    108121
     
    111124    int ret;
    112125
    113     if (!(type == WC_MD5 || type == WC_SHA || type == WC_SHA224 ||
    114             type == WC_SHA256 || type == WC_SHA384 || type == WC_SHA512 ||
     126    if (!(type == WC_MD5 || type == WC_SHA ||
     127            type == WC_SHA224 || type == WC_SHA256 ||
     128            type == WC_SHA384 || type == WC_SHA512 ||
     129            type == WC_SHA3_224 || type == WC_SHA3_256 ||
     130            type == WC_SHA3_384 || type == WC_SHA3_512 ||
    115131            type == BLAKE2B_ID)) {
    116132        return BAD_FUNC_ARG;
     
    142158    #endif /* !NO_SHA256 */
    143159
    144     #ifdef WOLFSSL_SHA512
    145160    #ifdef WOLFSSL_SHA384
    146161        case WC_SHA384:
     
    148163            break;
    149164    #endif /* WOLFSSL_SHA384 */
     165    #ifdef WOLFSSL_SHA512
    150166        case WC_SHA512:
    151167            ret = WC_SHA512_DIGEST_SIZE;
     
    159175    #endif /* HAVE_BLAKE2 */
    160176
     177    #ifdef WOLFSSL_SHA3
     178        case WC_SHA3_224:
     179            ret = WC_SHA3_224_DIGEST_SIZE;
     180            break;
     181
     182        case WC_SHA3_256:
     183            ret = WC_SHA3_256_DIGEST_SIZE;
     184            break;
     185
     186        case WC_SHA3_384:
     187            ret = WC_SHA3_384_DIGEST_SIZE;
     188            break;
     189
     190        case WC_SHA3_512:
     191            ret = WC_SHA3_512_DIGEST_SIZE;
     192            break;
     193
     194    #endif
     195
    161196        default:
    162197            ret = BAD_FUNC_ARG;
     
    167202}
    168203
    169 static int _InitHmac(Hmac* hmac, int type, void* heap)
     204int _InitHmac(Hmac* hmac, int type, void* heap)
    170205{
    171206    int ret = 0;
     
    196231    #endif /* !NO_SHA256 */
    197232
    198     #ifdef WOLFSSL_SHA512
    199233    #ifdef WOLFSSL_SHA384
    200234        case WC_SHA384:
     
    202236            break;
    203237    #endif /* WOLFSSL_SHA384 */
     238    #ifdef WOLFSSL_SHA512
    204239        case WC_SHA512:
    205240            ret = wc_InitSha512(&hmac->hash.sha512);
     
    212247            break;
    213248    #endif /* HAVE_BLAKE2 */
     249
     250    #ifdef WOLFSSL_SHA3
     251        case WC_SHA3_224:
     252            ret = wc_InitSha3_224(&hmac->hash.sha3, heap, INVALID_DEVID);
     253            break;
     254        case WC_SHA3_256:
     255            ret = wc_InitSha3_256(&hmac->hash.sha3, heap, INVALID_DEVID);
     256            break;
     257        case WC_SHA3_384:
     258            ret = wc_InitSha3_384(&hmac->hash.sha3, heap, INVALID_DEVID);
     259            break;
     260        case WC_SHA3_512:
     261            ret = wc_InitSha3_512(&hmac->hash.sha3, heap, INVALID_DEVID);
     262            break;
     263    #endif
    214264
    215265        default:
     
    238288
    239289    if (hmac == NULL || (key == NULL && length != 0) ||
    240         !(type == WC_MD5 || type == WC_SHA || type == WC_SHA224 ||
    241             type == WC_SHA256 || type == WC_SHA384 || type == WC_SHA512 ||
     290       !(type == WC_MD5 || type == WC_SHA ||
     291            type == WC_SHA224 || type == WC_SHA256 ||
     292            type == WC_SHA384 || type == WC_SHA512 ||
     293            type == WC_SHA3_224 || type == WC_SHA3_256 ||
     294            type == WC_SHA3_384 || type == WC_SHA3_512 ||
    242295            type == BLAKE2B_ID)) {
    243296        return BAD_FUNC_ARG;
    244297    }
    245298
     299    /* if set key has already been run then make sure and free existing */
     300    if (hmac->macType != 0) {
     301        wc_HmacFree(hmac);
     302        }
     303
    246304    hmac->innerHashKeyed = 0;
    247305    hmac->macType = (byte)type;
    248 
    249 #if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC)
    250     if (hmac->asyncDev.marker == WOLFSSL_ASYNC_MARKER_HMAC) {
    251     #if defined(HAVE_CAVIUM)
    252         if (length > HMAC_BLOCK_SIZE) {
    253             return WC_KEY_SIZE_E;
    254         }
    255 
    256         if (key != NULL) {
    257             XMEMCPY(hmac->ipad, key, length);
    258         }
    259         hmac->keyLen = (word16)length;
    260 
    261         return 0; /* nothing to do here */
    262     #endif /* HAVE_CAVIUM */
    263     }
    264 #endif /* WOLFSSL_ASYNC_CRYPT */
    265306
    266307    ret = _InitHmac(hmac, type, heap);
     
    362403    #endif /* !NO_SHA256 */
    363404
    364     #ifdef WOLFSSL_SHA512
    365405    #ifdef WOLFSSL_SHA384
    366406        case WC_SHA384:
     
    383423            break;
    384424    #endif /* WOLFSSL_SHA384 */
     425    #ifdef WOLFSSL_SHA512
    385426        case WC_SHA512:
    386427            hmac_block_size = WC_SHA512_BLOCK_SIZE;
     
    424465    #endif /* HAVE_BLAKE2 */
    425466
     467    #ifdef WOLFSSL_SHA3
     468        case WC_SHA3_224:
     469            hmac_block_size = WC_SHA3_224_BLOCK_SIZE;
     470            if (length <= WC_SHA3_224_BLOCK_SIZE) {
     471                if (key != NULL) {
     472                    XMEMCPY(ip, key, length);
     473                }
     474            }
     475            else {
     476                ret = wc_Sha3_224_Update(&hmac->hash.sha3, key, length);
     477                if (ret != 0)
     478                    break;
     479                ret = wc_Sha3_224_Final(&hmac->hash.sha3, ip);
     480                if (ret != 0)
     481                    break;
     482
     483                length = WC_SHA3_224_DIGEST_SIZE;
     484            }
     485            break;
     486        case WC_SHA3_256:
     487            hmac_block_size = WC_SHA3_256_BLOCK_SIZE;
     488            if (length <= WC_SHA3_256_BLOCK_SIZE) {
     489                if (key != NULL) {
     490                    XMEMCPY(ip, key, length);
     491                }
     492            }
     493            else {
     494                ret = wc_Sha3_256_Update(&hmac->hash.sha3, key, length);
     495                if (ret != 0)
     496                    break;
     497                ret = wc_Sha3_256_Final(&hmac->hash.sha3, ip);
     498                if (ret != 0)
     499                    break;
     500
     501                length = WC_SHA3_256_DIGEST_SIZE;
     502            }
     503            break;
     504        case WC_SHA3_384:
     505            hmac_block_size = WC_SHA3_384_BLOCK_SIZE;
     506            if (length <= WC_SHA3_384_BLOCK_SIZE) {
     507                if (key != NULL) {
     508                    XMEMCPY(ip, key, length);
     509                }
     510            }
     511            else {
     512                ret = wc_Sha3_384_Update(&hmac->hash.sha3, key, length);
     513                if (ret != 0)
     514                    break;
     515                ret = wc_Sha3_384_Final(&hmac->hash.sha3, ip);
     516                if (ret != 0)
     517                    break;
     518
     519                length = WC_SHA3_384_DIGEST_SIZE;
     520            }
     521            break;
     522        case WC_SHA3_512:
     523            hmac_block_size = WC_SHA3_512_BLOCK_SIZE;
     524            if (length <= WC_SHA3_512_BLOCK_SIZE) {
     525                if (key != NULL) {
     526                    XMEMCPY(ip, key, length);
     527                }
     528            }
     529            else {
     530                ret = wc_Sha3_512_Update(&hmac->hash.sha3, key, length);
     531                if (ret != 0)
     532                    break;
     533                ret = wc_Sha3_512_Final(&hmac->hash.sha3, ip);
     534                if (ret != 0)
     535                    break;
     536
     537                length = WC_SHA3_512_DIGEST_SIZE;
     538            }
     539            break;
     540    #endif /* WOLFSSL_SHA3 */
     541
    426542        default:
    427543            return BAD_FUNC_ARG;
     
    430546#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC)
    431547    if (hmac->asyncDev.marker == WOLFSSL_ASYNC_MARKER_HMAC) {
    432     #if defined(HAVE_INTEL_QA)
     548    #if defined(HAVE_INTEL_QA) || defined(HAVE_CAVIUM)
     549        #ifdef HAVE_INTEL_QA
     550        if (IntelQaHmacGetType(hmac->macType, NULL) == 0)
     551        #endif
     552        {
    433553        if (length > hmac_block_size)
    434554            length = hmac_block_size;
     
    437557
    438558        return ret;
     559        }
    439560        /* no need to pad below */
    440561    #endif
     
    489610    #endif /* !NO_SHA256 */
    490611
    491     #ifdef WOLFSSL_SHA512
    492612    #ifdef WOLFSSL_SHA384
    493613        case WC_SHA384:
     
    496616            break;
    497617    #endif /* WOLFSSL_SHA384 */
     618    #ifdef WOLFSSL_SHA512
    498619        case WC_SHA512:
    499620            ret = wc_Sha512Update(&hmac->hash.sha512, (byte*)hmac->ipad,
     
    508629            break;
    509630    #endif /* HAVE_BLAKE2 */
     631
     632    #ifdef WOLFSSL_SHA3
     633        case WC_SHA3_224:
     634            ret = wc_Sha3_224_Update(&hmac->hash.sha3, (byte*)hmac->ipad,
     635                                                       WC_SHA3_224_BLOCK_SIZE);
     636            break;
     637        case WC_SHA3_256:
     638            ret = wc_Sha3_256_Update(&hmac->hash.sha3, (byte*)hmac->ipad,
     639                                                       WC_SHA3_256_BLOCK_SIZE);
     640            break;
     641        case WC_SHA3_384:
     642            ret = wc_Sha3_384_Update(&hmac->hash.sha3, (byte*)hmac->ipad,
     643                                                       WC_SHA3_384_BLOCK_SIZE);
     644            break;
     645        case WC_SHA3_512:
     646            ret = wc_Sha3_512_Update(&hmac->hash.sha3, (byte*)hmac->ipad,
     647                                                       WC_SHA3_512_BLOCK_SIZE);
     648            break;
     649    #endif /* WOLFSSL_SHA3 */
    510650
    511651        default:
     
    533673        return NitroxHmacUpdate(hmac, msg, length);
    534674    #elif defined(HAVE_INTEL_QA)
     675        if (IntelQaHmacGetType(hmac->macType, NULL) == 0) {
    535676        return IntelQaHmac(&hmac->asyncDev, hmac->macType,
    536677            (byte*)hmac->ipad, hmac->keyLen, NULL, msg, length);
     678        }
    537679    #endif
    538680    }
     
    570712    #endif /* !NO_SHA256 */
    571713
    572     #ifdef WOLFSSL_SHA512
    573714    #ifdef WOLFSSL_SHA384
    574715        case WC_SHA384:
     
    576717            break;
    577718    #endif /* WOLFSSL_SHA384 */
     719    #ifdef WOLFSSL_SHA512
    578720        case WC_SHA512:
    579721            ret = wc_Sha512Update(&hmac->hash.sha512, msg, length);
     
    586728            break;
    587729    #endif /* HAVE_BLAKE2 */
     730
     731    #ifdef WOLFSSL_SHA3
     732        case WC_SHA3_224:
     733            ret = wc_Sha3_224_Update(&hmac->hash.sha3, msg, length);
     734            break;
     735        case WC_SHA3_256:
     736            ret = wc_Sha3_256_Update(&hmac->hash.sha3, msg, length);
     737            break;
     738        case WC_SHA3_384:
     739            ret = wc_Sha3_384_Update(&hmac->hash.sha3, msg, length);
     740            break;
     741        case WC_SHA3_512:
     742            ret = wc_Sha3_512_Update(&hmac->hash.sha3, msg, length);
     743            break;
     744    #endif /* WOLFSSL_SHA3 */
    588745
    589746        default:
     
    610767
    611768    #if defined(HAVE_CAVIUM)
    612         return NitroxHmacFinal(hmac, hmac->macType, hash, hashLen);
     769        return NitroxHmacFinal(hmac, hash, hashLen);
    613770    #elif defined(HAVE_INTEL_QA)
     771        if (IntelQaHmacGetType(hmac->macType, NULL) == 0) {
    614772        return IntelQaHmac(&hmac->asyncDev, hmac->macType,
    615773            (byte*)hmac->ipad, hmac->keyLen, hash, NULL, hashLen);
     774        }
    616775    #endif
    617776    }
     
    697856    #endif /* !NO_SHA256 */
    698857
    699     #ifdef WOLFSSL_SHA512
    700858    #ifdef WOLFSSL_SHA384
    701859        case WC_SHA384:
     
    714872            break;
    715873    #endif /* WOLFSSL_SHA384 */
     874    #ifdef WOLFSSL_SHA512
    716875        case WC_SHA512:
    717876            ret = wc_Sha512Final(&hmac->hash.sha512, (byte*)hmac->innerHash);
     
    748907    #endif /* HAVE_BLAKE2 */
    749908
     909    #ifdef WOLFSSL_SHA3
     910        case WC_SHA3_224:
     911            ret = wc_Sha3_224_Final(&hmac->hash.sha3, (byte*)hmac->innerHash);
     912            if (ret != 0)
     913                break;
     914            ret = wc_Sha3_224_Update(&hmac->hash.sha3, (byte*)hmac->opad,
     915                                                       WC_SHA3_224_BLOCK_SIZE);
     916            if (ret != 0)
     917                break;
     918            ret = wc_Sha3_224_Update(&hmac->hash.sha3, (byte*)hmac->innerHash,
     919                                                          WC_SHA3_224_DIGEST_SIZE);
     920            if (ret != 0)
     921                break;
     922            ret = wc_Sha3_224_Final(&hmac->hash.sha3, hash);
     923            break;
     924        case WC_SHA3_256:
     925            ret = wc_Sha3_256_Final(&hmac->hash.sha3, (byte*)hmac->innerHash);
     926            if (ret != 0)
     927                break;
     928            ret = wc_Sha3_256_Update(&hmac->hash.sha3, (byte*)hmac->opad,
     929                                                       WC_SHA3_256_BLOCK_SIZE);
     930            if (ret != 0)
     931                break;
     932            ret = wc_Sha3_256_Update(&hmac->hash.sha3, (byte*)hmac->innerHash,
     933                                                          WC_SHA3_256_DIGEST_SIZE);
     934            if (ret != 0)
     935                break;
     936            ret = wc_Sha3_256_Final(&hmac->hash.sha3, hash);
     937            break;
     938        case WC_SHA3_384:
     939            ret = wc_Sha3_384_Final(&hmac->hash.sha3, (byte*)hmac->innerHash);
     940            if (ret != 0)
     941                break;
     942            ret = wc_Sha3_384_Update(&hmac->hash.sha3, (byte*)hmac->opad,
     943                                                       WC_SHA3_384_BLOCK_SIZE);
     944            if (ret != 0)
     945                break;
     946            ret = wc_Sha3_384_Update(&hmac->hash.sha3, (byte*)hmac->innerHash,
     947                                                          WC_SHA3_384_DIGEST_SIZE);
     948            if (ret != 0)
     949                break;
     950            ret = wc_Sha3_384_Final(&hmac->hash.sha3, hash);
     951            break;
     952        case WC_SHA3_512:
     953            ret = wc_Sha3_512_Final(&hmac->hash.sha3, (byte*)hmac->innerHash);
     954            if (ret != 0)
     955                break;
     956            ret = wc_Sha3_512_Update(&hmac->hash.sha3, (byte*)hmac->opad,
     957                                                       WC_SHA3_512_BLOCK_SIZE);
     958            if (ret != 0)
     959                break;
     960            ret = wc_Sha3_512_Update(&hmac->hash.sha3, (byte*)hmac->innerHash,
     961                                                          WC_SHA3_512_DIGEST_SIZE);
     962            if (ret != 0)
     963                break;
     964            ret = wc_Sha3_512_Final(&hmac->hash.sha3, hash);
     965            break;
     966    #endif /* WOLFSSL_SHA3 */
     967
    750968        default:
    751969            ret = BAD_FUNC_ARG;
     
    774992#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC)
    775993    hmac->keyLen = 0;
    776     #ifdef HAVE_CAVIUM
    777         hmac->dataLen = 0;
    778         hmac->data    = NULL;        /* buffered input data */
    779     #endif /* HAVE_CAVIUM */
    780994
    781995    ret = wolfAsync_DevCtxInit(&hmac->asyncDev, WOLFSSL_ASYNC_MARKER_HMAC,
     
    7941008        return;
    7951009
     1010    switch (hmac->macType) {
     1011    #ifndef NO_MD5
     1012        case WC_MD5:
     1013            wc_Md5Free(&hmac->hash.md5);
     1014            break;
     1015    #endif /* !NO_MD5 */
     1016
     1017    #ifndef NO_SHA
     1018        case WC_SHA:
     1019            wc_ShaFree(&hmac->hash.sha);
     1020            break;
     1021    #endif /* !NO_SHA */
     1022
     1023    #ifdef WOLFSSL_SHA224
     1024        case WC_SHA224:
     1025            wc_Sha224Free(&hmac->hash.sha224);
     1026            break;
     1027    #endif /* WOLFSSL_SHA224 */
     1028
     1029    #ifndef NO_SHA256
     1030        case WC_SHA256:
     1031            wc_Sha256Free(&hmac->hash.sha256);
     1032            break;
     1033    #endif /* !NO_SHA256 */
     1034
     1035    #ifdef WOLFSSL_SHA384
     1036        case WC_SHA384:
     1037            wc_Sha384Free(&hmac->hash.sha384);
     1038            break;
     1039    #endif /* WOLFSSL_SHA384 */
     1040    #ifdef WOLFSSL_SHA512
     1041        case WC_SHA512:
     1042            wc_Sha512Free(&hmac->hash.sha512);
     1043            break;
     1044    #endif /* WOLFSSL_SHA512 */
     1045
     1046    #ifdef HAVE_BLAKE2
     1047        case BLAKE2B_ID:
     1048            break;
     1049    #endif /* HAVE_BLAKE2 */
     1050
     1051    #ifdef WOLFSSL_SHA3
     1052        case WC_SHA3_224:
     1053            wc_Sha3_224_Free(&hmac->hash.sha3);
     1054            break;
     1055        case WC_SHA3_256:
     1056            wc_Sha3_256_Free(&hmac->hash.sha3);
     1057            break;
     1058        case WC_SHA3_384:
     1059            wc_Sha3_384_Free(&hmac->hash.sha3);
     1060            break;
     1061        case WC_SHA3_512:
     1062            wc_Sha3_512_Free(&hmac->hash.sha3);
     1063            break;
     1064    #endif /* WOLFSSL_SHA3 */
     1065
     1066        default:
     1067            break;
     1068    }
     1069
    7961070#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC)
    7971071    wolfAsync_DevCtxFree(&hmac->asyncDev, WOLFSSL_ASYNC_MARKER_HMAC);
    798 
    799 #ifdef HAVE_CAVIUM
    800     XFREE(hmac->data, hmac->heap, DYNAMIC_TYPE_HMAC);
    801     hmac->data = NULL;
    802 #endif /* HAVE_CAVIUM */
    8031072#endif /* WOLFSSL_ASYNC_CRYPT */
     1073
     1074    switch (hmac->macType) {
     1075    #ifndef NO_MD5
     1076        case WC_MD5:
     1077            wc_Md5Free(&hmac->hash.md5);
     1078            break;
     1079    #endif /* !NO_MD5 */
     1080
     1081    #ifndef NO_SHA
     1082        case WC_SHA:
     1083            wc_ShaFree(&hmac->hash.sha);
     1084            break;
     1085    #endif /* !NO_SHA */
     1086
     1087    #ifdef WOLFSSL_SHA224
     1088        case WC_SHA224:
     1089            wc_Sha224Free(&hmac->hash.sha224);
     1090            break;
     1091    #endif /* WOLFSSL_SHA224 */
     1092
     1093    #ifndef NO_SHA256
     1094        case WC_SHA256:
     1095            wc_Sha256Free(&hmac->hash.sha256);
     1096            break;
     1097    #endif /* !NO_SHA256 */
     1098
     1099    #ifdef WOLFSSL_SHA512
     1100    #ifdef WOLFSSL_SHA384
     1101        case WC_SHA384:
     1102            wc_Sha384Free(&hmac->hash.sha384);
     1103            break;
     1104    #endif /* WOLFSSL_SHA384 */
     1105        case WC_SHA512:
     1106            wc_Sha512Free(&hmac->hash.sha512);
     1107            break;
     1108    #endif /* WOLFSSL_SHA512 */
     1109    }
    8041110}
    8051111
    8061112int wolfSSL_GetHmacMaxSize(void)
    8071113{
    808     return MAX_DIGEST_SIZE;
     1114    return WC_MAX_DIGEST_SIZE;
    8091115}
    8101116
     
    8241130                        const byte* inKey, word32 inKeySz, byte* out)
    8251131    {
    826         byte   tmp[MAX_DIGEST_SIZE]; /* localSalt helper */
     1132        byte   tmp[WC_MAX_DIGEST_SIZE]; /* localSalt helper */
    8271133        Hmac   myHmac;
    8281134        int    ret;
     
    8691175                       const byte* info, word32 infoSz, byte* out, word32 outSz)
    8701176    {
    871         byte   tmp[MAX_DIGEST_SIZE];
     1177        byte   tmp[WC_MAX_DIGEST_SIZE];
    8721178        Hmac   myHmac;
    8731179        int    ret = 0;
     
    9301236                       byte* out,         word32 outSz)
    9311237    {
    932         byte   prk[MAX_DIGEST_SIZE];
     1238        byte   prk[WC_MAX_DIGEST_SIZE];
    9331239        int    hashSz = wc_HmacSizeByType(type);
    9341240        int    ret;
Note: See TracChangeset for help on using the changeset viewer.