diff libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.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/utctime/der_encode_utctime.c	Thu Feb 08 23:11:40 2018 +0800
+++ b/libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.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"
 
@@ -17,7 +15,7 @@
 
 #ifdef LTC_DER
 
-static const char *baseten = "0123456789";
+static const char * const baseten = "0123456789";
 
 #define STORE_V(y) \
     out[x++] = der_ia5_char_encode(baseten[(y/10) % 10]); \
@@ -30,12 +28,12 @@
   @param outlen       [in/out] The length of the DER encoding
   @return CRYPT_OK if successful
 */
-int der_encode_utctime(ltc_utctime *utctime, 
+int der_encode_utctime(ltc_utctime *utctime,
                        unsigned char *out,   unsigned long *outlen)
 {
     unsigned long x, tmplen;
     int           err;
- 
+
     LTC_ARGCHK(utctime != NULL);
     LTC_ARGCHK(out     != NULL);
     LTC_ARGCHK(outlen  != NULL);
@@ -47,7 +45,7 @@
         *outlen = tmplen;
         return CRYPT_BUFFER_OVERFLOW;
     }
-    
+
     /* store header */
     out[0] = 0x17;
 
@@ -70,7 +68,7 @@
 
     /* store length */
     out[1] = (unsigned char)(x - 2);
-   
+
     /* all good let's return */
     *outlen = x;
     return CRYPT_OK;
@@ -78,6 +76,6 @@
 
 #endif
 
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref:         $Format:%D$ */
+/* git commit:  $Format:%H$ */
+/* commit time: $Format:%ai$ */