-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Increased MBEDTLS_BEFORE_COLON (size of temporary buffer) to 32 #10433
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
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1744,7 +1744,7 @@ static int x509_info_cert_policies(char **buf, size_t *size, | |
| /* | ||
| * Return an informational string about the certificate. | ||
| */ | ||
| #define MBEDTLS_BEFORE_COLON 18 | ||
| #define MBEDTLS_BEFORE_COLON 32 | ||
| #define MBEDTLS_BEFORE_COLON_STR "18" | ||
| int mbedtls_x509_crt_info(char *buf, size_t size, const char *prefix, | ||
| const mbedtls_x509_crt *crt) | ||
|
|
@@ -1807,6 +1807,7 @@ int mbedtls_x509_crt_info(char *buf, size_t size, const char *prefix, | |
| /* Key size */ | ||
| if ((ret = mbedtls_x509_key_size_helper(key_size_str, MBEDTLS_BEFORE_COLON, | ||
| mbedtls_pk_get_name(&crt->pk))) != 0) { | ||
| assert(ret != MBEDTLS_ERR_X509_BUFFER_TOO_SMALL); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't use
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The purpose of assert()ions is to signal errors in the internal logic of some software. In this case, supplying an insuffently sized buffer to Just remove it from my contribution, if you don't want to use this extra instrumentation in your code.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Like several libraries, we have a rule not to use
The way our review process works is that PR authors are supposed to make changes if needed. We don't normally merge patches that will need to be modified later. |
||
| return ret; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.