extmod/modssl_mbedtls: Add cert time validation. - #11896
Closed
Carglglz wants to merge 2 commits into
Closed
Conversation
|
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
Carglglz
force-pushed
the
ssl-cert-time
branch
3 times, most recently
from
July 7, 2023 15:13
7f2d947 to
a1533ae
Compare
Carglglz
force-pushed
the
ssl-cert-time
branch
2 times, most recently
from
July 15, 2023 17:08
76af29c to
d85c05e
Compare
Carglglz
force-pushed
the
ssl-cert-time
branch
3 times, most recently
from
August 14, 2023 13:31
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>
Carglglz
force-pushed
the
ssl-cert-time
branch
from
August 14, 2023 15:48
926b4c2 to
431ad8b
Compare
Contributor
Author
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
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_ALTmacro is needed due to esp32 using EPOCH 1/1/2000 to get current time inseconds which is not what mbedtls expects.
MBEDTLS_PLATFORM_TIME_ALTgives the option to definean alternative function to get current time.
Follow-up to: