func loadX509KeyPair(certFile, keyFile string) (tls.Certificate, error) {
	certPEMBlock, err := ioutil.ReadFile(certFile)
	if err != nil {
		return tls.Certificate{}, err
	}
	keyPEMBlock, err := ioutil.ReadFile(keyFile)
	if err != nil {
		return tls.Certificate{}, err
	}
	return tls.X509KeyPair(certPEMBlock, keyPEMBlock)
}
// loadX509KeyPair reads and parses a public/private key pair from a pair
// of files. The files must contain PEM encoded data. The certificate file
// may contain intermediate certificates following the leaf certificate to
// form a certificate chain. On successful return, Certificate.Leaf will
// be nil because the parsed form of the certificate is not retained.
loadX509KeyPair reads and parses a public/private key pair from a pair
of files. The files must contain PEM encoded data. The certificate file
may contain intermediate certificates following the leaf certificate to
form a certificate chain. On successful return, Certificate.Leaf will
be nil because the parsed form of the certificate is not retained.
// loadX509KeyPair reads and parses a public / private key pair from a pair // of files . The files must contain PEM encoded data . The certificate file // may contain intermediate certificates following the leaf certificate to // form a certificate chain . On successful return Certificate . Leaf will // be nil because the parsed form of the certificate is not retained .
func loadX509KeyPair(certFile, keyFile string) (tls.Certificate, error) {
	certPEMBlock, err := ioutil.ReadFile(certFile)
	if err != nil {
		return tls.Certificate{}, err
	}
	keyPEMBlock, err := ioutil.ReadFile(keyFile)
	if err != nil {
		return tls.Certificate{}, err
	}
	return tls.X509KeyPair(certPEMBlock, keyPEMBlock)
}
func loadX509KeyPair ( certFile , keyFile string ) ( tls . Certificate , error ) { certPEMBlock , err := ioutil . ReadFile ( certFile ) if err != nil { return tls . Certificate { } , err } keyPEMBlock , err := ioutil . ReadFile ( keyFile ) if err != nil { return tls . Certificate { } , err } return tls . X509KeyPair ( certPEMBlock , keyPEMBlock ) }
loadX509KeyPair reads and parses a public/private key pair from a pair
of files.
loadX509KeyPair reads and parses a public / private key pair from a pair of files .