summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.c')
-rw-r--r--libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.c b/libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.c
index f8d0c56..c6c8464 100644
--- a/libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.c
+++ b/libtomcrypt/src/pk/asn1/der/utctime/der_encode_utctime.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"
@@ -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 @@ static const char *baseten = "0123456789";
@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 @@ int der_encode_utctime(ltc_utctime *utctime,
*outlen = tmplen;
return CRYPT_BUFFER_OVERFLOW;
}
-
+
/* store header */
out[0] = 0x17;
@@ -70,7 +68,7 @@ int der_encode_utctime(ltc_utctime *utctime,
/* store length */
out[1] = (unsigned char)(x - 2);
-
+
/* all good let's return */
*outlen = x;
return CRYPT_OK;
@@ -78,6 +76,6 @@ int der_encode_utctime(ltc_utctime *utctime,
#endif
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref: $Format:%D$ */
+/* git commit: $Format:%H$ */
+/* commit time: $Format:%ai$ */