~ubuntu-branches/ubuntu/vivid/gnupg/vivid

« back to all changes in this revision

Viewing changes to cipher/random.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-12-20 08:17:09 UTC
  • mfrom: (1.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20131220081709-uylvbzvk4m7dej37
Tags: 1.4.15-2ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Disable mlock() test since it fails with ulimit 0 (on buildds).
  - Set gpg (or gpg2) and gpgsm to use a passphrase agent by default.
  - Only suggest gnupg-curl and libldap; recommendations are pulled into
    minimal, and we don't need the keyserver utilities in a minimal Ubuntu
    system.
  - Remove the Win32 build.
  - Build using dh-autoreconf
  - Disable inline assembler for ppc64el.
* Moved CVE-2013-4576 patch to the right directory, and added to series
  file so it actually gets applied.

Show diffs side-by-side

added added

removed removed

Lines of Context:
284
284
}
285
285
 
286
286
 
 
287
/* Randomize the MPI by setting it to NBITS of random of quality LEVEL.  */
 
288
void
 
289
randomize_mpi (MPI mpi, size_t nbits, int level)
 
290
{
 
291
  unsigned char *buffer;
 
292
 
 
293
  buffer = get_random_bits (nbits, level, mpi_is_secure (mpi));
 
294
  mpi_set_buffer (mpi, buffer, (nbits+7)/8, 0);
 
295
  xfree (buffer);
 
296
}
 
297
 
 
298
 
287
299
int
288
300
random_is_faked()
289
301
{