feat: configurable cert key type #264

This commit is contained in:
Jacky 2024-02-13 14:15:02 +08:00
parent a095c88fd2
commit 22d62e420b
12 changed files with 115 additions and 28 deletions

View file

@ -32,9 +32,10 @@ const (
)
type ConfigPayload struct {
ServerName []string `json:"server_name"`
ChallengeMethod string `json:"challenge_method"`
DNSCredentialID int `json:"dns_credential_id"`
ServerName []string `json:"server_name"`
ChallengeMethod string `json:"challenge_method"`
DNSCredentialID int `json:"dns_credential_id"`
KeyType certcrypto.KeyType `json:"key_type"`
}
func IssueCert(payload *ConfigPayload, logChan chan string, errChan chan error) {
@ -93,7 +94,7 @@ func IssueCert(payload *ConfigPayload, logChan chan string, errChan chan error)
}
}
config.Certificate.KeyType = certcrypto.RSA2048
config.Certificate.KeyType = payload.KeyType
l.Println("[INFO] [Nginx UI] Creating client facilitates communication with the CA server")
// A client facilitates communication with the CA server.