~ubuntu-branches/ubuntu/natty/gnupg2/natty

« back to all changes in this revision

Viewing changes to g10/skclist.c

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2009-03-08 22:46:47 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090308224647-gq17gatcl71lrc2k
Tags: 2.0.11-1
* New upstream release. (Closes: #496663)
* debian/control: Make the description a little more distinctive than
  gnupg v1's. Thanks Jari Aalto. (Closes: #496323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
int
42
42
random_is_faked (void)
43
43
{
44
 
  /* We use a runtime check to allow for slow migrattion of libgcrypt.
45
 
     We can't use the constant becuase that one is actually an enum
46
 
     value.  */
47
 
  gpg_error_t err = gcry_control ( 51 /*GCRYCTL_FAKED_RANDOM_P*/, 0);
48
 
 
49
 
  if (!err)
50
 
    return 0;
51
 
  if (gpg_err_code (err) != GPG_ERR_INV_OP)
52
 
    return 1;
53
 
  log_info ("WARNING: libgcrypt too old.\n");
54
 
  log_info ("         can't check whether we are in faked RNG mode\n");
55
 
  return 0; /* Need to return false.  */
 
44
  return !!gcry_control ( GCRYCTL_FAKED_RANDOM_P, 0);
56
45
}
57
46
 
58
47