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

    r352 r372  
    225225    else if (*status) {
    226226#ifndef NO_ASN_TIME
    227         if (ValidateDate((*status)->thisDate, (*status)->thisDateFormat, BEFORE)
     227        if (XVALIDATE_DATE((*status)->thisDate,
     228                                             (*status)->thisDateFormat, BEFORE)
    228229        &&  ((*status)->nextDate[0] != 0)
    229         &&  ValidateDate((*status)->nextDate, (*status)->nextDateFormat, AFTER))
     230        &&  XVALIDATE_DATE((*status)->nextDate,
     231                                             (*status)->nextDateFormat, AFTER))
    230232#endif
    231233        {
     
    417419                                        ssl->ocspIOCtx : ocsp->cm->ocspIOCtx;
    418420
    419 #if defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
     421#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
    420422    if (ocsp->statusCb != NULL && ssl != NULL) {
    421423        ret = ocsp->statusCb(ssl, ioCtx);
     
    460462    }
    461463    if (responseSz == WOLFSSL_CBIO_ERR_WANT_READ) {
    462         ret = WANT_READ;
     464        ret = OCSP_WANT_READ;
    463465    }
    464466
     
    477479}
    478480
    479 #if defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
     481#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
    480482
    481483int wolfSSL_OCSP_resp_find_status(WOLFSSL_OCSP_BASICRESP *bs,
     
    605607        return WOLFSSL_SUCCESS;
    606608
     609#ifdef OPENSSL_EXTRA
     610    if (bs->verifyError != OCSP_VERIFY_ERROR_NONE)
     611        return WOLFSSL_FAILURE;
     612#endif
     613
    607614    InitDecodedCert(&cert, bs->cert, bs->certSz, NULL);
    608615    if (ParseCertRelative(&cert, CERT_TYPE, VERIFY, st->cm) < 0)
     
    634641        return NULL;
    635642
    636     if (bio->type == BIO_MEMORY) {
     643    if (bio->type == WOLFSSL_BIO_MEMORY) {
    637644        len = wolfSSL_BIO_get_mem_data(bio, &data);
    638645        if (len <= 0 || data == NULL) {
     
    640647        }
    641648    }
    642     else if (bio->type == BIO_FILE) {
     649#ifndef NO_FILESYSTEM
     650    else if (bio->type == WOLFSSL_BIO_FILE) {
    643651        long i;
    644652        long l;
     
    647655        if (i < 0)
    648656            return NULL;
    649         XFSEEK(bio->file, 0, SEEK_END);
     657        if(XFSEEK(bio->file, 0, SEEK_END) != 0)
     658            return NULL;
    650659        l = XFTELL(bio->file);
    651660        if (l < 0)
    652661            return NULL;
    653         XFSEEK(bio->file, i, SEEK_SET);
    654 
    655         /* check calulated length */
     662        if (XFSEEK(bio->file, i, SEEK_SET) != 0)
     663            return NULL;
     664
     665        /* check calculated length */
    656666        if (l - i <= 0)
    657667            return NULL;
     
    664674        len = wolfSSL_BIO_read(bio, (char *)data, (int)l);
    665675    }
     676#endif
    666677    else
    667678        return NULL;
Note: See TracChangeset for help on using the changeset viewer.