summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ssl.c
diff options
context:
space:
mode:
authortechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 11:31:51 +0000
committertechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 11:31:51 +0000
commit42643e482e1c58cd353d88d0c317d091df80cd3d (patch)
tree52bdce8a8a457f6cfda0c7f5de46b5f1dd7fa6b5 /ext/openssl/ossl_ssl.c
parenta99c3a6e9d0ff69e08602061d7a24b3a2ffbe424 (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/trunk@14696 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 c345a3fdc7..7b2620e4b2 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -270,6 +270,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;
@@ -463,7 +465,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