# Ruby DH openssl warning

**URL:** <https://www.ruby-forum.com/t/ruby-dh-openssl-warning/101285>\
**Category:** Ruby\
**Created:** [August 4, 2006, 1:01am UTC](https://www.ruby-forum.com/t/ruby-dh-openssl-warning/101285 "2006-08-04T01:01:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![katerman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/779978/32.png) [@katerman](https://www.ruby-forum.com/u/katerman)\
**Post date:** [August 4, 2006, 1:01am UTC](https://www.ruby-forum.com/t/ruby-dh-openssl-warning/101285/1 "2006-08-04T01:01:05Z")

</div>

I get the following warning when this code is run (extracted from  
net/https)

require ‘timeout’  
require ‘socket’  
require ‘openssl’  
s = timeout(10) { TCPSocket.open(‘[mail.google.com](http://mail.google.com)’, ‘443’) }  
ssl\_context = OpenSSL::SSL::SSLContext.new  
s = OpenSSL::SSL::SSLSocket.new(s, ssl\_context)

warning: using default DH parameters.

Does anyone know how to resolve this? I know you have to setup some  
pre-generated DH numbers on the context, but I haven’t seen any examples  
how to do this.

thanks,  
eric

---

<div class="post-metadata">

**Author:** ![katerman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/779978/32.png) [@katerman](https://www.ruby-forum.com/u/katerman)\
**Post date:** [August 7, 2006, 6:32am UTC](https://www.ruby-forum.com/t/ruby-dh-openssl-warning/101285/2 "2006-08-07T06:32:54Z")

</div>

On Aug 3, 2006, at 6:01 PM, Eric Kolve wrote:

> warning: using default DH parameters.
> 
> Does anyone know how to resolve this? I know you have to setup some  
> pre-generated DH numbers on the context, but I haven’t seen any  
> examples  
> how to do this.

The OpenSSL library puts out a lot of warnings, and in most cases  
there doesn’t seem to be a way to get rid of them. I don’t know if  
I’ve specifically submitted a bug on this one, but I try to submit  
bugs on cases where I find warnings that I can’t seem to get rid of.  
It’s probably a good idea to submit a bug on this, since I can’t find  
any evidence of harm and it’s pretty annoying getting this warning.
