Skip to content

Commit

Permalink
feat: update library usage to migrate to new Modern2023 implementatio…
Browse files Browse the repository at this point in the history
…n of pkcs12

Signed-off-by: Christopher Phillips <[email protected]>
  • Loading branch information
spiffcs committed Nov 6, 2023
1 parent 62261fe commit 914957c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/quill/cli/commands/p12_attach_chain.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package commands

import (
"crypto/rand"
"crypto/x509"
"fmt"
"os"
Expand Down Expand Up @@ -104,7 +103,7 @@ func writeP12WithChain(p12Path, password, keychainPath string, failWithoutFullCh
}
certs = append(certs, remainingCerts...)

p12Bytes, err := pkcs12.Encode(rand.Reader, p12Contents.PrivateKey, p12Contents.Certificate, certs, password)
p12Bytes, err := pkcs12.Modern2023.Encode(p12Contents.PrivateKey, p12Contents.Certificate, certs, password)
if err != nil {
return "", fmt.Errorf("unable to encode p12 file: %w", err)
}
Expand Down

0 comments on commit 914957c

Please sign in to comment.