Use the following snippet to test your Scala environment:
import javax.net.ssl.{SSLContext, SSLSocket, SSLSocketFactory}
import java.net.Socket
import java.security.cert.X509Certificate
def testConnection(hostname: String): Unit = {
val port = 443...
Use the following snippet to test your Python environment:
import ssl, socket
def test_connection(hostname):
port = 443
context = ssl.create_default_context()
try:
with socket.create_connection((hostname, port)) as sock:
with c...
Use the following snippet to test your Java connection:import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.net.Socket;
import java.security.cert.X509Certificate;
public class SslTest {
...