This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import javax.net.ssl.*; | |
/* | |
* This example demostrates how to use a SSLSocket as client to | |
* send a HTTP request and get response from an HTTPS server. | |
* It assumes that the client is not behind a firewall | |
* https://docs.oracle.com/javase/10/security/sample-code-illustrating-secure-socket-connection-client-and-server.htm | |
* | |
* Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/x509" | |
"encoding/pem" | |
"io/ioutil" | |
"log" | |
"os" | |
) |
OlderNewer