Skip to content

Instantly share code, notes, and snippets.

@niw
Created April 20, 2010 18:59
Show Gist options
  • Save niw/372894 to your computer and use it in GitHub Desktop.
Save niw/372894 to your computer and use it in GitHub Desktop.
--- source/ext/openssl/openssl_missing.h.orig 2010-04-20 11:15:48.000000000 -0700
+++ source/ext/openssl/openssl_missing.h 2010-04-20 11:16:05.000000000 -0700
@@ -164,11 +164,11 @@
#endif
#if !defined(HAVE_BN_RAND_RANGE)
-int BN_rand_range(BIGNUM *r, BIGNUM *range);
+int BN_rand_range(BIGNUM *r, const BIGNUM *range);
#endif
#if !defined(HAVE_BN_PSEUDO_RAND_RANGE)
-int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range);
+int BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range);
#endif
#if !defined(HAVE_CONF_GET1_DEFAULT_CONFIG_FILE)
--- source/ext/openssl/openssl_missing.c.orig 2010-04-20 11:28:19.000000000 -0700
+++ source/ext/openssl/openssl_missing.c 2010-04-20 11:28:32.000000000 -0700
@@ -265,7 +265,7 @@
#if !defined(HAVE_BN_RAND_RANGE)
int
-BN_rand_range(BIGNUM *r, BIGNUM *range)
+BN_rand_range(BIGNUM *r, const BIGNUM *range)
{
return bn_rand_range(0, r, range);
}
@@ -273,7 +273,7 @@
#if !defined(HAVE_BN_PSEUDO_RAND_RANGE)
int
-BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range)
+BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range)
{
return bn_rand_range(1, r, range);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment