From 975cb75fbd591f3263d04dd3c09852fb66ffb274 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 5 Feb 2019 17:33:16 -0800 Subject: [PATCH] Fix typo. --- ca/mutable_tls_config.go | 8 ++++---- ca/tls_options.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ca/mutable_tls_config.go b/ca/mutable_tls_config.go index 7aca1603..16ceaab2 100644 --- a/ca/mutable_tls_config.go +++ b/ca/mutable_tls_config.go @@ -76,15 +76,15 @@ func (c *mutableTLSConfig) Reload() { c.Unlock() } -// AddFixedClientCACert add an in-mutable cert to ClientCAs. -func (c *mutableTLSConfig) AddInmutableClientCACert(cert *x509.Certificate) { +// AddImmutableClientCACert add an in-mutable cert to ClientCAs. +func (c *mutableTLSConfig) AddImmutableClientCACert(cert *x509.Certificate) { c.Lock() c.clientCerts = append(c.clientCerts, cert) c.Unlock() } -// AddInmutableRootCACert add an in-mutable cert to RootCas. -func (c *mutableTLSConfig) AddInmutableRootCACert(cert *x509.Certificate) { +// AddImmutableRootCACert add an in-mutable cert to RootCas. +func (c *mutableTLSConfig) AddImmutableRootCACert(cert *x509.Certificate) { c.Lock() c.rootCerts = append(c.rootCerts, cert) c.Unlock() diff --git a/ca/tls_options.go b/ca/tls_options.go index 80c57d0e..b3b2d057 100644 --- a/ca/tls_options.go +++ b/ca/tls_options.go @@ -48,7 +48,7 @@ func (ctx *TLSOptionCtx) apply(options []TLSOption) error { ctx.Config.RootCAs = x509.NewCertPool() } ctx.Config.RootCAs.AddCert(root) - ctx.mutableConfig.AddInmutableRootCACert(root) + ctx.mutableConfig.AddImmutableRootCACert(root) } if !ctx.hasClientCA && ctx.Config.ClientAuth != tls.NoClientCert { @@ -56,7 +56,7 @@ func (ctx *TLSOptionCtx) apply(options []TLSOption) error { ctx.Config.ClientCAs = x509.NewCertPool() } ctx.Config.ClientCAs.AddCert(root) - ctx.mutableConfig.AddInmutableClientCACert(root) + ctx.mutableConfig.AddImmutableClientCACert(root) } } @@ -116,7 +116,7 @@ func AddRootCA(cert *x509.Certificate) TLSOption { ctx.Config.RootCAs = x509.NewCertPool() } ctx.Config.RootCAs.AddCert(cert) - ctx.mutableConfig.AddInmutableRootCACert(cert) + ctx.mutableConfig.AddImmutableRootCACert(cert) return nil } } @@ -130,7 +130,7 @@ func AddClientCA(cert *x509.Certificate) TLSOption { ctx.Config.ClientCAs = x509.NewCertPool() } ctx.Config.ClientCAs.AddCert(cert) - ctx.mutableConfig.AddInmutableClientCACert(cert) + ctx.mutableConfig.AddImmutableClientCACert(cert) return nil } }