summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ssl.c
diff options
context:
space:
mode:
authortechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-27 01:50:50 +0000
committertechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-27 01:50:50 +0000
commit55180306ddab6b92c8af08f76e3c6287823e1cce (patch)
treec6e0f948ae825a619410b79444704276819acfb8 /ext/openssl/ossl_ssl.c
parenta4afe2df99a73b5c4f1decda23bb462bd9710743 (diff)
* ext/openssl/ossl_ssl.c: Only show a warning if the default
DH callback is actually used. * ext/openssl/ossl_rand.c: New method: random_add(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_ssl.c')
-rw-r--r--ext/openssl/ossl_ssl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 76423b773b..17353bbd76 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -260,6 +260,8 @@ ossl_tmp_dh_callback(SSL *ssl, int is_export, int keylength)
static DH*
ossl_default_tmp_dh_callback(SSL *ssl, int is_export, int keylength)
{
+ rb_warning("using default DH parameters.");
+
switch(keylength){
case 512:
return OSSL_DEFAULT_DH_512;
@@ -453,7 +455,6 @@ ossl_sslctx_setup(VALUE self)
SSL_CTX_set_tmp_dh_callback(ctx, ossl_tmp_dh_callback);
}
else{
- rb_warning("using default DH parameters.");
SSL_CTX_set_tmp_dh_callback(ctx, ossl_default_tmp_dh_callback);
}
#endif