Skip to content

leave certificate name untouched in decode()#2640

Closed
vladak wants to merge 1 commit intocurl:masterfrom
vladak:mk_ca_bundle_decode_fix
Closed

leave certificate name untouched in decode()#2640
vladak wants to merge 1 commit intocurl:masterfrom
vladak:mk_ca_bundle_decode_fix

Conversation

@vladak
Copy link
Contributor

@vladak vladak commented Jun 7, 2018

When running mk-ca-bundle.pl with the -v option, it fails to report the certificate name. This is happening due to the decode() call from Encode module having CHECK set without the Encode::LEAVE_SRC bit.

https://perldoc.perl.org/Encode.html#LEAVE_SRC says:

If the Encode::LEAVE_SRC bit is not set but CHECK is set, then the source string to encode() or decode() will be overwritten in place. If you're not interested in this, then bitwise-OR it with the bitmask.

This simple change adds the bit and also reports skipped certificates (which is handy in the light of https://www.imperialviolet.org/2012/01/30/mozillaroots.html).

Thank you.

@bagder
Copy link
Member

bagder commented Jun 8, 2018

Thanks!

@bagder bagder closed this in 9ff67f7 Jun 8, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants