Add intermediate cert to P12 chain if ca.crt is empty#3146
Conversation
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: meyskens The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/kind bug |
|
There's a |
I had a quick look. Yes it should be possible, but the tests currently generate a single self-sigend certificate as the CA. But it looks like this is a known issue: golang/go#14015 and the work around is to use Or update to latest version of the package from SSLMate which has a DecodeChain function https://godoc.org/software.sslmate.com/src/go-pkcs12#DecodeChain |
This new version includes a [pkcs12.DecodeChain](https://godoc.org/software.sslmate.com/src/go-pkcs12#DecodeChain) which will help in testing cert-manager#3146 Signed-off-by: Richard Wall <richard.wall@jetstack.io>
|
/close @wallrj will submit a new one with added testing |
|
@meyskens: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
If ACME (or any other that has no CA.crt) issues an intermediate certificate it is dropped from our pkcs12 keystore.
This was due to the logic being inside an if statement that checked the CA.crt secret.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #fixes #3039
Release note: