func (s *Server) AppendCert(certFile, keyFile string) error {
	if len(certFile) == 0 && len(keyFile) == 0 {
		return errNoCertOrKeyProvided
	}

	cert, err := tls.LoadX509KeyPair(certFile, keyFile)
	if err != nil {
		return fmt.Errorf("cannot load TLS key pair from certFile=%q and keyFile=%q: %s", certFile, keyFile, err)
	}

	s.configTLS()

	s.tlsConfig.Certificates = append(s.tlsConfig.Certificates, cert)
	return nil
}
func (s *Server) AppendCert(certFile, keyFile string) error {
	if len(certFile) == 0 && len(keyFile) == 0 {
		return errNoCertOrKeyProvided
	}

	cert, err := tls.LoadX509KeyPair(certFile, keyFile)
	if err != nil {
		return fmt.Errorf("cannot load TLS key pair from certFile=%q and keyFile=%q: %s", certFile, keyFile, err)
	}

	s.configTLS()

	s.tlsConfig.Certificates = append(s.tlsConfig.Certificates, cert)
	return nil
}
func ( s * Server ) AppendCert ( certFile , keyFile string ) error { if len ( certFile ) == 0 && len ( keyFile ) == 0 { return errNoCertOrKeyProvided } cert , err := tls . LoadX509KeyPair ( certFile , keyFile ) if err != nil { return fmt . Errorf ( " " , certFile , keyFile , err ) } s . configTLS ( ) s . tlsConfig . Certificates = append ( s . tlsConfig . Certificates , cert ) return nil }
// AppendCert appends certificate and keyfile to TLS Configuration.
//
// This function allows programmer to handle multiple domains
// in one server structure. See examples/multidomain
AppendCert appends certificate and keyfile to TLS Configuration . This function allows programmer to handle multiple domains in one server structure . See examples / multidomain