Mariano Cano 7 anni fa
parent
commit
975cb75fbd
2 ha cambiato i file con 8 aggiunte e 8 eliminazioni
  1. 4 4
      ca/mutable_tls_config.go
  2. 4 4
      ca/tls_options.go

+ 4 - 4
ca/mutable_tls_config.go

@@ -76,15 +76,15 @@ func (c *mutableTLSConfig) Reload() {
 	c.Unlock()
 	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.Lock()
 	c.clientCerts = append(c.clientCerts, cert)
 	c.clientCerts = append(c.clientCerts, cert)
 	c.Unlock()
 	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.Lock()
 	c.rootCerts = append(c.rootCerts, cert)
 	c.rootCerts = append(c.rootCerts, cert)
 	c.Unlock()
 	c.Unlock()

+ 4 - 4
ca/tls_options.go

@@ -48,7 +48,7 @@ func (ctx *TLSOptionCtx) apply(options []TLSOption) error {
 				ctx.Config.RootCAs = x509.NewCertPool()
 				ctx.Config.RootCAs = x509.NewCertPool()
 			}
 			}
 			ctx.Config.RootCAs.AddCert(root)
 			ctx.Config.RootCAs.AddCert(root)
-			ctx.mutableConfig.AddInmutableRootCACert(root)
+			ctx.mutableConfig.AddImmutableRootCACert(root)
 		}
 		}
 
 
 		if !ctx.hasClientCA && ctx.Config.ClientAuth != tls.NoClientCert {
 		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 = x509.NewCertPool()
 			}
 			}
 			ctx.Config.ClientCAs.AddCert(root)
 			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 = x509.NewCertPool()
 		}
 		}
 		ctx.Config.RootCAs.AddCert(cert)
 		ctx.Config.RootCAs.AddCert(cert)
-		ctx.mutableConfig.AddInmutableRootCACert(cert)
+		ctx.mutableConfig.AddImmutableRootCACert(cert)
 		return nil
 		return nil
 	}
 	}
 }
 }
@@ -130,7 +130,7 @@ func AddClientCA(cert *x509.Certificate) TLSOption {
 			ctx.Config.ClientCAs = x509.NewCertPool()
 			ctx.Config.ClientCAs = x509.NewCertPool()
 		}
 		}
 		ctx.Config.ClientCAs.AddCert(cert)
 		ctx.Config.ClientCAs.AddCert(cert)
-		ctx.mutableConfig.AddInmutableClientCACert(cert)
+		ctx.mutableConfig.AddImmutableClientCACert(cert)
 		return nil
 		return nil
 	}
 	}
 }
 }