* Fixed wolfSSL_CTX_load_verify_locations to continue loading if there is an error (ZD 4265).
* Added new `wolfSSL_CTX_load_verify_locations_ex` that supports flags `WOLFSSL_LOAD_FLAG_IGNORE_ERR`, `WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY` and `WOLFSSL_LOAD_FLAG_PEM_CA_ONLY`. * Fix for `PemToDer` to handle PEM which may include a null terminator in length at end of file length causing wrong error code to be returned. Added test case for this. (ZD 4278) * Added macro to override default flags for `wolfSSL_CTX_load_verify_locations` using `WOLFSSL_LOAD_VERIFY_DEFAULT_FLAGS`. * Added tests for loading CA PEM's from directory using `wolfSSL_CTX_load_verify_locations` and `wolfSSL_CTX_load_verify_locations_ex` with flags. * Added tests for `wolfSSL_CertManagerLoadCABuffer`. * Updated the expired test certs and added them to `./certs/test/gen-testcerts.sh` script.
This commit is contained in:
@@ -8389,9 +8389,12 @@ int PemToDer(const unsigned char* buff, long longSz, int type,
|
||||
|
||||
consumedEnd = footerEnd + XSTRLEN(footer);
|
||||
|
||||
if (consumedEnd < bufferEnd) { /* handle no end of line on last line */
|
||||
if (consumedEnd < bufferEnd) { /* handle no end of line on last line */
|
||||
/* eat end of line characters */
|
||||
consumedEnd = SkipEndOfLineChars(consumedEnd, bufferEnd);
|
||||
/* skip possible null term */
|
||||
if (consumedEnd < bufferEnd && consumedEnd[0] == '\0')
|
||||
consumedEnd++;
|
||||
}
|
||||
|
||||
if (info)
|
||||
|
||||
@@ -247,10 +247,10 @@ int wolfCrypt_Cleanup(void)
|
||||
!defined(WOLFSSL_NUCLEUS) && !defined(WOLFSSL_NUCLEUS_1_2)
|
||||
|
||||
/* File Handling Helpers */
|
||||
/* returns 0 if file found, -1 if no files or negative error */
|
||||
/* returns 0 if file found, WC_READDIR_NOFILE if no files or negative error */
|
||||
int wc_ReadDirFirst(ReadDirCtx* ctx, const char* path, char** name)
|
||||
{
|
||||
int ret = -1; /* default to no files found */
|
||||
int ret = WC_READDIR_NOFILE; /* default to no files found */
|
||||
int pathLen = 0;
|
||||
int dnameLen = 0;
|
||||
|
||||
@@ -329,10 +329,10 @@ int wc_ReadDirFirst(ReadDirCtx* ctx, const char* path, char** name)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* returns 0 if file found, -1 if no more files */
|
||||
/* returns 0 if file found, WC_READDIR_NOFILE if no more files */
|
||||
int wc_ReadDirNext(ReadDirCtx* ctx, const char* path, char** name)
|
||||
{
|
||||
int ret = -1; /* default to no file found */
|
||||
int ret = WC_READDIR_NOFILE; /* default to no file found */
|
||||
int pathLen = 0;
|
||||
int dnameLen = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user