diff libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents f849a5ca2efc
children
line wrap: on
line diff
--- a/libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c	Thu Feb 08 23:11:40 2018 +0800
+++ b/libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c	Fri Feb 09 21:44:05 2018 +0800
@@ -5,8 +5,6 @@
  *
  * The library is free for all purposes without any express
  * guarantee it works.
- *
- * Tom St Denis, [email protected], http://libtom.org
  */
 #include "tomcrypt.h"
 
@@ -18,8 +16,8 @@
 
 #ifdef LTC_DER
 /**
-  Gets length of DER encoding of num 
-  @param num    The int to get the size of 
+  Gets length of DER encoding of num
+  @param num    The int to get the size of
   @param outlen [out] The length of the DER encoding for the given integer
   @return CRYPT_OK if successful
 */
@@ -46,7 +44,6 @@
    } else {
       /* it's negative */
       /* find power of 2 that is a multiple of eight and greater than count bits */
-      leading_zero = 0;
       z = mp_count_bits(num);
       z = z + (8 - (z & 7));
       if (((mp_cnt_lsb(num)+1)==mp_count_bits(num)) && ((mp_count_bits(num)&7)==0)) --z;
@@ -71,12 +68,12 @@
    ++len;
 
    /* return length */
-   *outlen = len; 
+   *outlen = len;
    return CRYPT_OK;
 }
 
 #endif
 
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref:         $Format:%D$ */
+/* git commit:  $Format:%H$ */
+/* commit time: $Format:%ai$ */