Allow for TLS connections to ElasticSearch (#1398)

* Allow for TLS connections to ElasticSearch

Extremely similar implementation to the HTTP JSON module's
implementation of the same code.

* Changelog update
This commit is contained in:
Mike Glazer
2016-06-22 17:23:49 +02:00
committed by Cameron Sparr
parent 25848c545a
commit e3448153e1
5 changed files with 61 additions and 14 deletions

View File

@@ -133,8 +133,8 @@ func GetTLSConfig(
cert, err := tls.LoadX509KeyPair(SSLCert, SSLKey)
if err != nil {
return nil, errors.New(fmt.Sprintf(
"Could not load TLS client key/certificate: %s",
err))
"Could not load TLS client key/certificate from %s:%s: %s",
SSLKey, SSLCert, err))
}
t.Certificates = []tls.Certificate{cert}