Merge pull request #1076 from Netrvin:patch5

This commit is contained in:
RHQYZ 2025-12-04 17:18:01 +08:00 committed by GitHub
commit 0da533bb01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: