forked from TrueCloudLab/certificates
Fix typo.
This commit is contained in:
parent
3c06d6f9bc
commit
975cb75fbd
2 changed files with 8 additions and 8 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue