1.1 --- a/src/map_asn1.h Wed Oct 05 15:38:42 2016 +0200
1.2 +++ b/src/map_asn1.h Wed Oct 05 18:18:41 2016 +0200
1.3 @@ -4,6 +4,7 @@
1.4 #include "identity_list.h"
1.5 #include "../asn.1/Identity.h"
1.6 #include "../asn.1/IdentityList.h"
1.7 +#include "../asn.1/GeneralizedTime.h"
1.8
1.9 #ifdef __cplusplus
1.10 extern "C" {
1.11 @@ -74,6 +75,44 @@
1.12
1.13 identity_list *IdentityList_to_identity_list(IdentityList_t *list, identity_list *result);
1.14
1.15 +// GeneralizedTime_to_timestamp() - convert ASN.1 GeneralizedTime to timestamp
1.16 +//
1.17 +// params:
1.18 +// asntime (in) ASN.1 GeneralizedTime to convert
1.19 +// result (inout) timestamp to update or NULL to alloc a new one
1.20 +//
1.21 +// return value:
1.22 +// pointer to allocated timestamp
1.23 +//
1.24 +// caveat:
1.25 +// if a new timestamp is allocated, the ownership goes to the caller
1.26 +
1.27 +timestamp *GeneralizedTime_to_timestamp(GeneralizedTime_t * asntime, timestamp *result);
1.28 +
1.29 +// GeneralizedTime_to_time_t() - convert ASN.1 GeneralizedTime to time_t
1.30 +//
1.31 +// params:
1.32 +// asntime (in) ASN.1 GeneralizedTime to convert
1.33 +//
1.34 +// return value:
1.35 +// resulting time_t
1.36 +//
1.37 +
1.38 +time_t GeneralizedTime_to_time_t(GeneralizedTime_t * asntime);
1.39 +
1.40 +// timestamp_GeneralizedTime_to() - convert ASN.1 timestamp to GeneralizedTime
1.41 +//
1.42 +// params:
1.43 +// ts (in) timestam to convert
1.44 +// result (inout) GeneralizedTime_t to update or NULL to alloc a new one
1.45 +//
1.46 +// return value:
1.47 +// pointer to allocated ASN.1 GeneralizedTime
1.48 +//
1.49 +// caveat:
1.50 +// if a new GeneralizedTime is allocated, the ownership goes to the caller
1.51 +
1.52 +GeneralizedTime_t *timestamp_to_GeneralizedTime(timestamp * ts, GeneralizedTime_t *result);
1.53
1.54 #ifdef __cplusplus
1.55 }