-
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
Allow access to result of PEM decoding #5414
Comments
How does this look? Should it be named
|
Also, should the accessor be a static inline function in |
|
I also prefer I think a Would you like to open a PR with the above patch (plus a ChangeLog entry)? Aw, I looked at the state of our testing of PEM and it's not looking great. For Would you be OK with extending the testing in that direction? If not, I can look at doing it myself, it's not your fault that we have testing gaps in areas where you want to contribute. (The bigger picture is there are other tests where PEM decoding succeeds, for example in |
Writing tests is a good thing. "Testing" a struct member accessor function is not complicated, but is little more than code coverage, which has its own value. Given the desire for more than trivial code coverage, I think that you are in a better position to choose how much effort to invest in extending the pem tests, and that might be done in a separate issue, on which this issue can depend. (To put it another way, I do not think I will have more time to spend in this area.) |
Sure, I'll take care of improving testing. |
I submitted #5504 with a trivial addition to tests to add code coverage for FYI: PR #5504 will not be useful to lighttpd until other more important PRs are addressed. In the meantime, lighttpd 1.4.64 disables ALPN "acme-tls/1" support in lighttpd mod_mbedtls when used with mbedtls 3.0.0. #5413 Allow per-context SNI callback (state) |
The
mbedtls_pem_read_buffer()
function decodes PEM data and store the decoded data into the providedmbedtls_pem_context
object. However, there's no way for an application to access that decoded data from the context except by accessing the fields of the context structure, which we made private in 3.0. As a result,mbedtls_pem_read_buffer()
became unusable by applications in 3.0.This should be fixed, either by making the
buf
andbuflen
fields public, or by adding a simple getter function (with appropriate documentation about ownership and lifetime).The text was updated successfully, but these errors were encountered: