-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
extmod/modssl_mbedtls: Add cert time validation. #11896
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code size report:
|
Codecov Report
@@ Coverage Diff @@
## master #11896 +/- ##
==========================================
+ Coverage 98.38% 98.41% +0.02%
==========================================
Files 158 158
Lines 20898 20962 +64
==========================================
+ Hits 20561 20629 +68
+ Misses 337 333 -4
|
This was referenced Jul 4, 2023
7f2d947
to
a1533ae
Compare
76af29c
to
d85c05e
Compare
f08c2a8
to
926b4c2
Compare
This commit adds a `# MICROPY_SSL_MBEDTLS_EXTRAS` macro that enables: 1) Methods to SSLContext class that match CPython signature: - `SSLContext.load_cert_chain(certfile, keyfile=)` - `SSLContext.load_verify_locations(cadata=)` - `SSLContext.get_ciphers()` --> ["CIPHERSUITE"] - `SSLContext.set_ciphers(["CIPHERSUITE"])` 2) `sslsocket.cipher()` to get current ciphersuite and protocol version. 3) `ssl.MBEDTLS_VERSION` string constant 4) Tests in `net_inet` and `multi_net` Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
This enables cert time validation in unix and esp32 port. In esp32 port MBEDTLS_PLATFORM_TIME_ALT macro is needed due to esp32 using EPOCH 1/1/2000 to get current time in seconds which is not what mbedtls expects. MBEDTLS_PLATFORM_TIME_ALT gives the option to define an alternative function to get current time. Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
926b4c2
to
431ad8b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This enables cert time validation in unix and esp32 port.
In esp32 port
MBEDTLS_PLATFORM_TIME_ALT
macro is needed due to esp32 using EPOCH 1/1/2000 to get current time inseconds which is not what mbedtls expects.
MBEDTLS_PLATFORM_TIME_ALT
gives the option to definean alternative function to get current time.
Follow-up to: