Skip to content
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

Remove an empty line for /pki/ca_chain #5779

Merged
merged 1 commit into from
Dec 12, 2018
Merged

Remove an empty line for /pki/ca_chain #5779

merged 1 commit into from
Dec 12, 2018

Conversation

ljagiello
Copy link
Contributor

This PR fix #5778.

Easy test case to reproduce the problem:
https://play.golang.org/p/CAMdrOHT7C1

Since certStr is empty string during first iteration strings.Join()
will merge empty line with first CA cert.

Extra strings.TrimSpace call will remove that empty line, before
certificate will be return.

This PR fix #5778.

Easy test case to reproduce the problem:
https://play.golang.org/p/CAMdrOHT7C1

Since `certStr` is empty string during first iteration `strings.Join()`
will merge empty line with first CA cert.

Extra `strings.TrimSpace` call will remove that empty line, before
certificate will be return.
@jefferai jefferai added this to the 1.0.1 milestone Dec 12, 2018
@jefferai
Copy link
Member

Looks good, thanks!

@jefferai jefferai merged commit 6dc872c into hashicorp:master Dec 12, 2018
@ljagiello ljagiello deleted the remove-empty-line-for-ca-chain branch December 13, 2018 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PKI CA chain starts with an empty line (invalid CA by Android)
2 participants