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

Base64 encode p12 cert is missing padding #33

Closed
JimPaine opened this issue Mar 4, 2019 · 3 comments · Fixed by #34
Closed

Base64 encode p12 cert is missing padding #33

JimPaine opened this issue Mar 4, 2019 · 3 comments · Fixed by #34

Comments

@JimPaine
Copy link
Contributor

JimPaine commented Mar 4, 2019

When trying to use the base64 encoded string in Azure it fails due to the base64 string missing its padding.

After doing some digging it looks like the Encode method being used here is specifically stripping the padding out.

It also looks like it may be a simple fix to change as documented here The RawStdEncoding excludes the padding and the method StdEncoding keeps it.

I am happy to make the change and raise a PR but am aware this provider will be used across providers, who may or may not behave differently to Azure. It may be worth including both with and without padding or even removing it completely and letting the consuming generate it as required.

Happy to discuss then pick up the relevant work.

@vancluever
Copy link
Owner

@JimPaine if you want to make the PR I'd be happy to review.

I don't think we need separate fields, AFAIK Azure (and Microsoft, historically) is the only vendor that uses P12 cert formats, everyone else uses PEM. So I'd rather just have the one field and optimize it for Azure.

@JimPaine
Copy link
Contributor Author

JimPaine commented Mar 4, 2019

@vancluever will do, just need to setup an AWS environment to run the tests :) and I will raise the PR later this evening

@vancluever
Copy link
Owner

Hey all, this has now been merged and should be going out for release early next week. Thanks @JimPaine for the PR!

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 a pull request may close this issue.

2 participants