mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-30 15:00:51 +02:00
config: use getters for certificates (#2001)
* config: use getters for certificates * update log message
This commit is contained in:
parent
36eeff296a
commit
853d2dd478
8 changed files with 101 additions and 51 deletions
|
@ -23,11 +23,16 @@ func (cfg *Config) Clone() *Config {
|
|||
}
|
||||
|
||||
// AllCertificates returns all the certificates in the config.
|
||||
func (cfg *Config) AllCertificates() []tls.Certificate {
|
||||
func (cfg *Config) AllCertificates() ([]tls.Certificate, error) {
|
||||
optionCertificates, err := cfg.Options.GetCertificates()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var certs []tls.Certificate
|
||||
certs = append(certs, cfg.Options.Certificates...)
|
||||
certs = append(certs, optionCertificates...)
|
||||
certs = append(certs, cfg.AutoCertificates...)
|
||||
return certs
|
||||
return certs, nil
|
||||
}
|
||||
|
||||
// Checksum returns the config checksum.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue