ssl - How to set SSLContext options in Ruby -


i need create sslsocket in ruby 1.8+ talk encrypted service. want set ssl options on sslcontext object (it calls ssl_ctx_set_options in underlying openssl library). not seeing obvious way this.

this using openssl::ssl::sslcontext interface.

as point of reference, analogous calling set_options() in python's pyopenssl library.

example:

ctx = openssl::ssl::sslcontext.new  ctx.set_params(:options => openssl::ssl::op_ephemeral_rsa | openssl::ssl::op_no_sslv2) # or ctx.options = openssl::ssl::op_ephemeral_rsa | openssl::ssl::op_no_sslv2 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -