1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
6 * The library is free for all purposes without any express
12 @file der_length_utctime.c
13 ASN.1 DER, get length of UTCTIME, Tom St Denis
19 Gets length of DER encoding of UTCTIME
20 @param utctime The UTC time structure to get the size of
21 @param outlen [out] The length of the DER encoding
22 @return CRYPT_OK if successful
24 int der_length_utctime(ltc_utctime *utctime, unsigned long *outlen)
26 LTC_ARGCHK(outlen != NULL);
27 LTC_ARGCHK(utctime != NULL);
29 if (utctime->off_hh == 0 && utctime->off_mm == 0) {
30 /* we encode as YYMMDDhhmmssZ */
33 /* we encode as YYMMDDhhmmss{+|-}hh'mm' */
42 /* ref: $Format:%D$ */
43 /* git commit: $Format:%H$ */
44 /* commit time: $Format:%ai$ */