Skip to content

Instantly share code, notes, and snippets.

@scalone
Last active September 26, 2018 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scalone/c4db4f04b12a3bc744ec93d69d1aa4fc to your computer and use it in GitHub Desktop.
Save scalone/c4db4f04b12a3bc744ec93d69d1aa4fc to your computer and use it in GitHub Desktop.
tcp = TCPSocket.new(host, port)
entropy = PolarSSL::Entropy.new
ctr_drbg = PolarSSL::CtrDrbg.new entropy
s_ssl = PolarSSL::SSL.new
s_ssl.set_endpoint PolarSSL::SSL::SSL_IS_CLIENT
s_ssl.set_rng ctr_drbg
s_ssl.set_socket tcp
s_ssl.handshake
http = SimpleHttp.new("https", endpoint)
http.socket = s_ssl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment