mirror of
https://github.com/slackhq/nebula.git
synced 2026-01-04 08:12:44 -08:00
Remove x509 config loading code (#685)
This commit is contained in:
parent
1a7c575011
commit
527f953c2c
1 changed files with 0 additions and 10 deletions
10
cert.go
10
cert.go
|
|
@ -51,11 +51,6 @@ func NewCertStateFromConfig(c *config.C) (*CertState, error) {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
privPathOrPEM := c.GetString("pki.key", "")
|
privPathOrPEM := c.GetString("pki.key", "")
|
||||||
if privPathOrPEM == "" {
|
|
||||||
// Support backwards compat with the old x509
|
|
||||||
//TODO: remove after this is rolled out everywhere - NB 2018/02/23
|
|
||||||
privPathOrPEM = c.GetString("x509.key", "")
|
|
||||||
}
|
|
||||||
|
|
||||||
if privPathOrPEM == "" {
|
if privPathOrPEM == "" {
|
||||||
return nil, errors.New("no pki.key path or PEM data provided")
|
return nil, errors.New("no pki.key path or PEM data provided")
|
||||||
|
|
@ -79,11 +74,6 @@ func NewCertStateFromConfig(c *config.C) (*CertState, error) {
|
||||||
var rawCert []byte
|
var rawCert []byte
|
||||||
|
|
||||||
pubPathOrPEM := c.GetString("pki.cert", "")
|
pubPathOrPEM := c.GetString("pki.cert", "")
|
||||||
if pubPathOrPEM == "" {
|
|
||||||
// Support backwards compat with the old x509
|
|
||||||
//TODO: remove after this is rolled out everywhere - NB 2018/02/23
|
|
||||||
pubPathOrPEM = c.GetString("x509.cert", "")
|
|
||||||
}
|
|
||||||
|
|
||||||
if pubPathOrPEM == "" {
|
if pubPathOrPEM == "" {
|
||||||
return nil, errors.New("no pki.cert path or PEM data provided")
|
return nil, errors.New("no pki.cert path or PEM data provided")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue