Package co.elastic.clients.transport
Class TransportUtils
java.lang.Object
co.elastic.clients.transport.TransportUtils
public class TransportUtils
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description TransportUtils()
-
Method Summary
Modifier and Type Method Description static javax.net.ssl.SSLContext
sslContextFromCaFingerprint(java.lang.String fingerPrint)
Creates anSSLContext
from the SHA-256 fingerprint of self-signedhttp_ca.crt
certificate output by Elasticsearch at startup time.static javax.net.ssl.SSLContext
sslContextFromHttpCaCrt(java.io.File file)
Creates anSSLContext
from the self-signedhttp_ca.crt
certificate created by Elasticsearch during its first start.static javax.net.ssl.SSLContext
sslContextFromHttpCaCrt(java.io.InputStream in)
Creates anSSLContext
from the self-signedhttp_ca.crt
certificate created by Elasticsearch during its first start.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TransportUtils
public TransportUtils()
-
-
Method Details
-
sslContextFromHttpCaCrt
public static javax.net.ssl.SSLContext sslContextFromHttpCaCrt(java.io.File file) throws java.io.IOExceptionCreates anSSLContext
from the self-signedhttp_ca.crt
certificate created by Elasticsearch during its first start.- Throws:
java.io.IOException
- See Also:
- Elasticsearch documentation
-
sslContextFromHttpCaCrt
public static javax.net.ssl.SSLContext sslContextFromHttpCaCrt(java.io.InputStream in)Creates anSSLContext
from the self-signedhttp_ca.crt
certificate created by Elasticsearch during its first start.- See Also:
- Elasticsearch documentation
-
sslContextFromCaFingerprint
public static javax.net.ssl.SSLContext sslContextFromCaFingerprint(java.lang.String fingerPrint)Creates anSSLContext
from the SHA-256 fingerprint of self-signedhttp_ca.crt
certificate output by Elasticsearch at startup time.- Parameters:
fingerPrint
- the SHA-256 fingerprint. Can be uppercase or lowercase, with or without colons separating bytes- See Also:
- Elasticsearch documentation
-