summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-02-09 21:44:05 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-02-09 21:44:05 +0800
commit4f2eb1914bdac3ed3ee504ad86061281dbe0d074 (patch)
tree078293375c3f3ee2d485cf9559a08d65d460786a /libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c
parentd72f50ff3284e15124a0f233c26339229fe305ac (diff)
Update to libtomcrypt 1.18.1, merged with Dropbear changes
Diffstat (limited to 'libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c')
-rw-r--r--libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c b/libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c
index 9d49683..753ef0e 100644
--- a/libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c
+++ b/libtomcrypt/src/pk/asn1/der/integer/der_length_integer.c
@@ -5,8 +5,6 @@
*
* The library is free for all purposes without any express
* guarantee it works.
- *
- * Tom St Denis, tomstdenis@gmail.com, 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 @@ int der_length_integer(void *num, unsigned long *outlen)
} 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 @@ int der_length_integer(void *num, unsigned long *outlen)
++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$ */