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

Introduce WOLFSSL_ASN_ALLOW_0_SERIAL #7893

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

gojimmypi
Copy link
Contributor

Description

While working on wolfSSL "Certificate Bundles" in support of improved integration in the Espressif ESP-IDF, I noticed there are several certs in the (current default) mbedTLS bundle that do not have a serial number. For example the Go Daddy Class 2 CA.

By default, wolfSSL does not allow a missing serial number per RFC 5280 section 4.1.2.4. Although this could be resolved by enabling WOLFSSL_NO_ASN_STRICT, I did not want to completely disable all of the other strict ASN checking just because a few certs in a bundle many be missing a serial number.

This PR introduces WOLFSSL_ASN_ALLOW_0_SERIAL that regardless of having WOLFSSL_NO_ASN_STRICT or not, will allow a missing serial number.

Note that it must be a valid missing serial number: The length must be exactly one byte and the data is zero.

If there's a zero for the length and a zero for the data, this will still be considered to have always failed the ASN check regardless of WOLFSSL_NO_ASN_STRICT and/or WOLFSSL_ASN_ALLOW_0_SERIAL.

See my WIP ESP-IDF 5.2.2 branch and my esp_http_client_example for the WIP Certificate Bundle support.

Some minor spelling corrections also included.

Fixes zd#

Does not fix, but see related related tickets including 18469 and 18228.

Testing

How did you test?

Tested only in Espressif ESP32 environment.

Checklist

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

@julek-wolfssl julek-wolfssl removed their assignment Aug 22, 2024
@douzzer
Copy link
Contributor

douzzer commented Aug 23, 2024

retest this please

@douzzer douzzer merged commit 3f0ba97 into wolfSSL:master Aug 24, 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