Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CRL_REPORT_LOAD_ERRORS option #6591

Merged
merged 1 commit into from
Jul 21, 2023
Merged

Conversation

embhorn
Copy link
Member

@embhorn embhorn commented Jul 10, 2023

Description

When CRL_REPORT_LOAD_ERRORS is defined at compile time, any error encountered when loading CRL's will be returned.

Fixes zd16296

Testing

Customer confirmed.

Automated tests will fail with CRL_REPORT_LOAD_ERRORS since CRL tests include invalid CRL's.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

src/crl.c Outdated
if (!skip && ProcessFile(NULL, name, type, CRL_TYPE, NULL, 0, crl,
VERIFY) != WOLFSSL_SUCCESS) {
WOLFSSL_MSG("CRL file load failed, continuing");
}
#else
if (!skip) {
int temp = ProcessFile(NULL, name, type, CRL_TYPE, NULL, 0, crl,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using ret instead of creating a new int temp. Everything else looks good.

@tmael tmael removed their assignment Jul 20, 2023
@embhorn embhorn requested a review from tmael July 21, 2023 14:30
src/crl.c Outdated
ret = ProcessFile(NULL, name, type, CRL_TYPE, NULL, 0, crl, VERIFY);
if (ret != WOLFSSL_SUCCESS) {
WOLFSSL_MSG("CRL file load failed");
return(ret);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use return ret; for consistency with the rest of the code

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed.

tmael
tmael previously approved these changes Jul 21, 2023
@JacobBarthelmeh JacobBarthelmeh merged commit c2a3f53 into wolfSSL:master Jul 21, 2023
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants