@@ -8348,7 +8348,7 @@ int wolfSSL_X509_LOOKUP_load_file(WOLFSSL_X509_LOOKUP* lookup,
83488348 do {
83498349 /* get PEM header and footer based on type */
83508350 if (wc_PemGetHeaderFooter(CRL_TYPE, &header, &footer) == 0 &&
8351- XSTRNSTR((char*)curr, header, (unsigned int) sz) != NULL) {
8351+ XSTRNSTR((char*)curr, header, sz) != NULL) {
83528352#ifdef HAVE_CRL
83538353 WOLFSSL_CERT_MANAGER* cm = lookup->store->cm;
83548354
@@ -8365,15 +8365,15 @@ int wolfSSL_X509_LOOKUP_load_file(WOLFSSL_X509_LOOKUP* lookup,
83658365 if (ret != WOLFSSL_SUCCESS)
83668366 goto end;
83678367#endif
8368- curr = (byte*)XSTRNSTR((char*)curr, footer, (unsigned int) sz);
8368+ curr = (byte*)XSTRNSTR((char*)curr, footer, sz);
83698369 }
83708370 else if (wc_PemGetHeaderFooter(CERT_TYPE, &header, &footer) == 0 &&
8371- XSTRNSTR((char*)curr, header, (unsigned int) sz) != NULL) {
8371+ XSTRNSTR((char*)curr, header, sz) != NULL) {
83728372 ret = X509StoreLoadCertBuffer(lookup->store, curr,
83738373 (word32)sz, WOLFSSL_FILETYPE_PEM);
83748374 if (ret != WOLFSSL_SUCCESS)
83758375 goto end;
8376- curr = (byte*)XSTRNSTR((char*)curr, footer, (unsigned int) sz);
8376+ curr = (byte*)XSTRNSTR((char*)curr, footer, sz);
83778377 }
83788378 else
83798379 goto end;
@@ -13765,13 +13765,12 @@ int wolfSSL_write_X509_CRL(WOLFSSL_X509_CRL* crl, const char* path, int type)
1376513765 while (i < l && wolfSSL_BIO_read(bio, &pem[i], 1) == 1) {
1376613766 i++;
1376713767 if (!header) {
13768- header = XSTRNSTR(pem, "-----BEGIN ", (unsigned int) i);
13768+ header = XSTRNSTR(pem, "-----BEGIN ", i);
1376913769 }
1377013770 else if (!headerEnd) {
1377113771 headerEnd = XSTRNSTR(header + XSTR_SIZEOF("-----BEGIN "),
1377213772 "-----",
13773- (unsigned int)
13774- (i - (header + XSTR_SIZEOF("-----BEGIN ") - pem)));
13773+ i - (header + XSTR_SIZEOF("-----BEGIN ") - pem));
1377513774 if (headerEnd) {
1377613775 headerEnd += XSTR_SIZEOF("-----");
1377713776 /* Read in the newline */
@@ -13788,12 +13787,12 @@ int wolfSSL_write_X509_CRL(WOLFSSL_X509_CRL* crl, const char* path, int type)
1378813787 }
1378913788 else if (!footer) {
1379013789 footer = XSTRNSTR(headerEnd, "-----END ",
13791- (unsigned int)( i - (headerEnd - pem) ));
13790+ i - (headerEnd - pem));
1379213791 }
1379313792 else if (!footerEnd) {
1379413793 footerEnd = XSTRNSTR(footer + XSTR_SIZEOF("-----"),
13795- "-----", (unsigned int)(i -
13796- (footer + XSTR_SIZEOF("-----") - pem) ));
13794+ "-----",
13795+ i - (footer + XSTR_SIZEOF("-----") - pem));
1379713796 if (footerEnd) {
1379813797 footerEnd += XSTR_SIZEOF("-----");
1379913798 /* Now check that footer matches header */
0 commit comments