-
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
Add accessor to get der from mbedtls_pem_context #5504
Add accessor to get der from mbedtls_pem_context #5504
Conversation
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. I left a note about naming, I'm having doubts but I think the name is good enough, so I'm approving as is for now, and will wait to see that the second reviewer thinks.
MSVC does not seem to like the new function:
I think it's actually about the |
a4afa2f
to
fa66ba8
Compare
Thank you for fixing up the testing (#5508). If we change the function name to |
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.
Ok for the code, but I'd like some documentation improvements.
6b65826
to
7f53da7
Compare
I changed the name of the inline function to |
7f53da7
to
15d9d44
Compare
15d9d44
to
7acf564
Compare
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com> Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
Currently all cases were negative, so the block that exercised mbedtls_pem_get_der() would never be reached. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
7acf564
to
1df23b9
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 for cherry-picking the test extensions.
minor nit: I see the use of both |
For future reference, please don't mark other people's review comments as resolved. It's up to the reviewer to decide whether they've been resolved satisfactorily. We use the convention that the “rocket” reaction belongs to the submitter and can mean “I've handled this in my working copy” or “I've commited a fix” or “I've pushed a fix” as you prefer. |
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.
The test code could be made a little more robust, but I'm approving anyway in the interest of moving on.
TEST_EQUAL( use_len, out->len ); | ||
TEST_ASSERT( memcmp( out->x, buf, out->len ) == 0 ); |
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.
We have a macro for this.
TEST_EQUAL( use_len, out->len ); | |
TEST_ASSERT( memcmp( out->x, buf, out->len ) == 0 ); | |
ASSERT_COMPARE( out->x, out->len, buf, use_len ); |
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.
@mpg FYI
With my approval, Manuel's approval here and Andrzej's approval of #5508, we have two trusted approvers. |
Sorry. I was not aware of this convention here. Thanks for letting me know. (meta: it would be nice if github had a way for reviewer and reviewee to independently indicate when each thinks a thread is resolved.) |
Description
Add accessor to get der from mbedtls_pem_context
closes #5414 Allow access to result of PEM decoding
Status
READY
Requires Backporting
NO
Migrations
NO
Todos