aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_rand.c
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2015-03-25 21:33:52 -0700
committerZachary Scott <e@zzak.io>2015-03-25 21:33:52 -0700
commit30b43508092659adc0a9f7f038c5e0f9f4435de3 (patch)
treee28946b3d63f89b5b7de3442d220f1fe50d35eba /ext/openssl/ossl_rand.c
parent86eb72136fdbc11c125d13c675759b380132be03 (diff)
downloadruby-openssl-30b43508092659adc0a9f7f038c5e0f9f4435de3.tar.gz
Upstream the following commits from trunk ruby:
- r49681: 97f9589c4b0641141af32244021dd9eba001b3c7 - r49682: c5d781dded856a86609ebd9fd4904c3e9f3474fd - r49948: aaf2d070a8351dc3118422bae478978f3d3e3966 - r49954: ddf2558a167652cfec6a901b2116b832221e6e83b - r49955: 9941f348e056a5e717cb943cee37ba8ba2396e6f Fixes #6 and #7
Diffstat (limited to 'ext/openssl/ossl_rand.c')
-rw-r--r--ext/openssl/ossl_rand.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c
index 29cbf8c3..27466fe2 100644
--- a/ext/openssl/ossl_rand.c
+++ b/ext/openssl/ossl_rand.c
@@ -148,6 +148,7 @@ ossl_rand_pseudo_bytes(VALUE self, VALUE len)
return str;
}
+#ifdef HAVE_RAND_EGD
/*
* call-seq:
* egd(filename) -> true
@@ -186,6 +187,7 @@ ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len)
}
return Qtrue;
}
+#endif /* HAVE_RAND_EGD */
/*
* call-seq:
@@ -219,8 +221,10 @@ Init_ossl_rand(void)
rb_define_module_function(mRandom, "write_random_file", ossl_rand_write_file, 1);
rb_define_module_function(mRandom, "random_bytes", ossl_rand_bytes, 1);
rb_define_module_function(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1);
+#ifdef HAVE_RAND_EGD
rb_define_module_function(mRandom, "egd", ossl_rand_egd, 1);
rb_define_module_function(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2);
+#endif /* HAVE_RAND_EGD */
rb_define_module_function(mRandom, "status?", ossl_rand_status, 0);
}