mirror of
https://github.com/certimate-go/certimate.git
synced 2026-06-30 21:05:12 +08:00
Merge pull request #1076 from Netrvin:patch5
This commit is contained in:
commit
0da533bb01
@ -194,7 +194,11 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*dep
|
||||
const algRSA = "RSA"
|
||||
const algECC = "ECC"
|
||||
|
||||
privkeyAlg, _, _ := xcryptokey.GetPrivateKeyAlgorithm(privkeyPEM)
|
||||
privkey, err := xcert.ParsePrivateKeyFromPEM(privkeyPEM)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not parse private key: %w", err)
|
||||
}
|
||||
privkeyAlg, _, _ := xcryptokey.GetPrivateKeyAlgorithm(privkey)
|
||||
privkeyAlgStr := ""
|
||||
switch privkeyAlg {
|
||||
case x509.RSA:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user