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

Use verify callback before checking dates #7895

Merged
merged 1 commit into from
Aug 29, 2024
Merged

Conversation

embhorn
Copy link
Member

@embhorn embhorn commented Aug 23, 2024

Description

In wolfSSL_X509_verify_cert, after an error has been set is can be overwritten by the subsequent date check. If the callback is being used to override date errors, then the invalid cert gets treated as verified. This change adds a call to the verify callback before the date check. This way the application can handle the error(s) appropriately.

Fixes zd18433

Testing

Set system time to before cert validity of ./certs/intermediate/ca-int2-cert.pem. Call X509_verify_cert, similar to test_X509_STORE_untrusted_certs test. Observe ASN_SIGNER_ERROR being overwritten with date error.

Checklist

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

@embhorn embhorn self-assigned this Aug 23, 2024
@embhorn embhorn assigned julek-wolfssl and unassigned embhorn Aug 23, 2024
@embhorn
Copy link
Member Author

embhorn commented Aug 23, 2024

retest this please
Failing on

Build [PRB-generic-config-parser #5515](https://cloud.wolfssl-test.com/jenkins/job/PRB-generic-config-parser/5515/) completed: FAILURE
[Pipeline] }
[PRB-generic-config-parser #5515](https://cloud.wolfssl-test.com/jenkins/job/PRB-generic-config-parser/5515/) completed with status FAILURE (propagate: false to ignore)
org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 3f1c96d4-ce62-4660-9068-00cafc9d37ae
Setting overall build result to FAILURE

@douzzer douzzer merged commit 41449fa into wolfSSL:master Aug 29, 2024
127 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.

4 participants