Skip to content

Commit

Permalink
Support key encoding in private ACM
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonbondon committed Aug 19, 2019
1 parent 5d4a03e commit 3605b7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/issuer/privateACM/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (a *PrivateACM) Issue(ctx context.Context, crt *v1alpha1.Certificate) (*iss
klog.V(4).Infof("Storing new certificate private key for %s/%s", crt.Namespace, crt.Name)
a.Recorder.Eventf(crt, corev1.EventTypeNormal, "Generated", "Generated new private key")

keyPem, err := pki.EncodePrivateKey(signeeKey)
keyPem, err := pki.EncodePrivateKey(signeeKey, crt.Spec.KeyEncoding)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -138,7 +138,7 @@ func (a *PrivateACM) Issue(ctx context.Context, crt *v1alpha1.Certificate) (*iss
certificate := []byte(*certOutput.Certificate)

// Encode output private key and CA cert ready for return
keyPem, err := pki.EncodePrivateKey(signeeKey)
keyPem, err := pki.EncodePrivateKey(signeeKey, crt.Spec.KeyEncoding)
if err != nil {
a.Recorder.Eventf(crt, corev1.EventTypeWarning, "ErrorPrivateKey", "Error encoding private key: %v", err)
return nil, err
Expand Down

0 comments on commit 3605b7b

Please sign in to comment.