Changeset 372 for asp3_tinet_ecnl_arm/trunk/wolfssl-3.12.2/src/ocsp.c
- Timestamp:
- Feb 7, 2019, 8:36:33 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/wolfssl-3.12.2/src/ocsp.c
r352 r372 225 225 else if (*status) { 226 226 #ifndef NO_ASN_TIME 227 if (ValidateDate((*status)->thisDate, (*status)->thisDateFormat, BEFORE) 227 if (XVALIDATE_DATE((*status)->thisDate, 228 (*status)->thisDateFormat, BEFORE) 228 229 && ((*status)->nextDate[0] != 0) 229 && ValidateDate((*status)->nextDate, (*status)->nextDateFormat, AFTER)) 230 && XVALIDATE_DATE((*status)->nextDate, 231 (*status)->nextDateFormat, AFTER)) 230 232 #endif 231 233 { … … 417 419 ssl->ocspIOCtx : ocsp->cm->ocspIOCtx; 418 420 419 #if defined( WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)421 #if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) 420 422 if (ocsp->statusCb != NULL && ssl != NULL) { 421 423 ret = ocsp->statusCb(ssl, ioCtx); … … 460 462 } 461 463 if (responseSz == WOLFSSL_CBIO_ERR_WANT_READ) { 462 ret = WANT_READ;464 ret = OCSP_WANT_READ; 463 465 } 464 466 … … 477 479 } 478 480 479 #if defined( WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)481 #if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) 480 482 481 483 int wolfSSL_OCSP_resp_find_status(WOLFSSL_OCSP_BASICRESP *bs, … … 605 607 return WOLFSSL_SUCCESS; 606 608 609 #ifdef OPENSSL_EXTRA 610 if (bs->verifyError != OCSP_VERIFY_ERROR_NONE) 611 return WOLFSSL_FAILURE; 612 #endif 613 607 614 InitDecodedCert(&cert, bs->cert, bs->certSz, NULL); 608 615 if (ParseCertRelative(&cert, CERT_TYPE, VERIFY, st->cm) < 0) … … 634 641 return NULL; 635 642 636 if (bio->type == BIO_MEMORY) {643 if (bio->type == WOLFSSL_BIO_MEMORY) { 637 644 len = wolfSSL_BIO_get_mem_data(bio, &data); 638 645 if (len <= 0 || data == NULL) { … … 640 647 } 641 648 } 642 else if (bio->type == BIO_FILE) { 649 #ifndef NO_FILESYSTEM 650 else if (bio->type == WOLFSSL_BIO_FILE) { 643 651 long i; 644 652 long l; … … 647 655 if (i < 0) 648 656 return NULL; 649 XFSEEK(bio->file, 0, SEEK_END); 657 if(XFSEEK(bio->file, 0, SEEK_END) != 0) 658 return NULL; 650 659 l = XFTELL(bio->file); 651 660 if (l < 0) 652 661 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 */ 656 666 if (l - i <= 0) 657 667 return NULL; … … 664 674 len = wolfSSL_BIO_read(bio, (char *)data, (int)l); 665 675 } 676 #endif 666 677 else 667 678 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.