-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[MBEDTLS_PRIVATE] Add accessor for session and ciphersuite_id #8888
[MBEDTLS_PRIVATE] Add accessor for session and ciphersuite_id #8888
Conversation
Signed-off-by: Minos Galanakis <[email protected]>
Signed-off-by: Minos Galanakis <[email protected]>
Signed-off-by: Minos Galanakis <[email protected]>
0ad9589
to
a058c4e
Compare
Signed-off-by: Minos Galanakis <[email protected]>
417517f
to
32426cb
Compare
|
||
/* Test setting a reference id for tls1.3 and tls1.2 */ | ||
ciphersuite_info = mbedtls_ssl_ciphersuite_from_id(ciphersuite_id); | ||
if (ciphersuite_info != NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In certain configurations the ssl_ciphersuite_from_id
will return NULL. Testing this function is outside of the scope so we only test the getter for the other cases where it will create a ciphersuite_info
stucture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One typo, one nit, LGTM otherwise
32426cb
to
0338122
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of small typos but otherwise it looks good.
tests/suites/test_suite_ssl.data
Outdated
@@ -961,6 +961,14 @@ TLS 1.3: SRV: session serialization: Wrong config | |||
depends_on:MBEDTLS_SSL_PROTO_TLS1_3:MBEDTLS_SSL_SRV_C | |||
ssl_session_serialize_version_check:0:0:0:1:MBEDTLS_SSL_IS_SERVER:MBEDTLS_SSL_VERSION_TLS1_3 | |||
|
|||
Test Session id & Ciphersuite accesors TLS 1.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Session id & Ciphersuite accesors TLS 1.2 | |
Test Session id & Ciphersuite accessors TLS 1.2 |
tests/suites/test_suite_ssl.data
Outdated
depends_on:MBEDTLS_SSL_PROTO_TLS1_2 | ||
ssl_session_id_accessors_check:MBEDTLS_SSL_VERSION_TLS1_2 | ||
|
||
Test Session id & Ciphersuite accesors TLS 1.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Session id & Ciphersuite accesors TLS 1.3 | |
Test Session id & Ciphersuite accessors TLS 1.3 |
Signed-off-by: Minos Galanakis <[email protected]>
0338122
to
f9a6893
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now - thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Description
The ps is adding accessors for the following members of the
mbedtls_ssl_session
int MBEDTLS_PRIVATE(ciphersuite)
->mbedtls_ssl_session_get_ciphersuite_id()
size_t MBEDTLS_PRIVATE(id_len)
->mbedtls_ssl_session_get_id_len()
-
unsigned char MBEDTLS_PRIVATE(id)[32
->mbedtls_ssl_session_get_id()
As well as one accessor for the
mbedtls_ssl_ciphersuite_t
structuint8_t MBEDTLS_PRIVATE(cipher)
->mbedtls_ssl_ciphersuite_get_id()
Resolves #8529
PR checklist
Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")