fix: use provider keytype instead of account keytype.

This commit is contained in:
Michael 2020-10-08 12:58:04 +02:00 committed by GitHub
parent a4df4b028e
commit 556f7608db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 1 deletions

View file

@ -516,6 +516,34 @@ certificatesResolvers:
# ... # ...
``` ```
### `keyType`
_Optional, Default="RSA4096"_
KeyType used for generating certificate private key. Allow value 'EC256', 'EC384', 'RSA2048', 'RSA4096', 'RSA8192'.
```toml tab="File (TOML)"
[certificatesResolvers.myresolver.acme]
# ...
keyType = "RSA4096"
# ...
```
```yaml tab="File (YAML)"
certificatesResolvers:
myresolver:
acme:
# ...
keyType: 'RSA4096'
# ...
```
```bash tab="CLI"
# ...
--certificatesresolvers.myresolver.acme.keyType="RSA4096"
# ...
```
## Fallback ## Fallback
If Let's Encrypt is not reachable, the following certificates will apply: If Let's Encrypt is not reachable, the following certificates will apply:

View file

@ -220,7 +220,7 @@ func (p *Provider) getClient() (*lego.Client, error) {
config := lego.NewConfig(account) config := lego.NewConfig(account)
config.CADirURL = caServer config.CADirURL = caServer
config.Certificate.KeyType = account.KeyType config.Certificate.KeyType = GetKeyType(ctx, p.KeyType)
config.UserAgent = fmt.Sprintf("containous-traefik/%s", version.Version) config.UserAgent = fmt.Sprintf("containous-traefik/%s", version.Version)
client, err := lego.NewClient(config) client, err := lego.NewClient(config)