aboutsummaryrefslogtreecommitdiffstats
path: root/g10/skclist.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2008-09-29 15:02:55 +0000
committerWerner Koch <[email protected]>2008-09-29 15:02:55 +0000
commit7d63aa42e5d2c086810e3d7eca64a01f366b4e88 (patch)
tree7dccaebaa7f86d56fef8beb00eb9c2bc583ede20 /g10/skclist.c
parent2008-09-28 Marcus Brinkmann <[email protected]> (diff)
downloadgnupg-7d63aa42e5d2c086810e3d7eca64a01f366b4e88.tar.gz
gnupg-7d63aa42e5d2c086810e3d7eca64a01f366b4e88.zip
Remove hacks which are not anymore needed since we now require Libgcrypt 1.4
Diffstat (limited to 'g10/skclist.c')
-rw-r--r--g10/skclist.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/g10/skclist.c b/g10/skclist.c
index 405f3f516..22f2c0c8d 100644
--- a/g10/skclist.c
+++ b/g10/skclist.c
@@ -41,18 +41,7 @@
int
random_is_faked (void)
{
- /* We use a runtime check to allow for slow migrattion of libgcrypt.
- We can't use the constant becuase that one is actually an enum
- value. */
- gpg_error_t err = gcry_control ( 51 /*GCRYCTL_FAKED_RANDOM_P*/, 0);
-
- if (!err)
- return 0;
- if (gpg_err_code (err) != GPG_ERR_INV_OP)
- return 1;
- log_info ("WARNING: libgcrypt too old.\n");
- log_info (" can't check whether we are in faked RNG mode\n");
- return 0; /* Need to return false. */
+ return !!gcry_control ( GCRYCTL_FAKED_RANDOM_P, 0);
}