~ubuntu-branches/debian/lenny/dropbear/lenny

« back to all changes in this revision

Viewing changes to libtomcrypt/tim_exptmod.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape
  • Date: 2005-05-25 22:38:17 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050525223817-fdl653extybmz1zb
Tags: 0.45-3
* debian/dropbear.init: init script prints human readable message in case
  it's disabled (closes: #309099).
* debian/dropbear.postinst: configure: restart service through init script
  instead of start.
* debian/dropbear.prerm: set -u -> set -e.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
   }
35
35
 
36
36
   /* pick random r */ 
37
 
   rtmp = XMALLOC(MAX_RSA_SIZE/8);
 
37
   rlen = mp_unsigned_bin_size(n);
 
38
   rtmp = XMALLOC(rlen);
38
39
   if (rtmp == NULL) {
39
40
      return CRYPT_MEM;
40
41
   }
41
42
 
42
 
 
43
 
   rlen = mp_unsigned_bin_size(n);
 
43
   /* read in random value "r" */
44
44
   if (prng_descriptor[prng_idx].read(rtmp, rlen, prng) != rlen) {
45
45
      XFREE(rtmp);
46
46
      return CRYPT_ERROR_READPRNG;