CryptoAuthLib
Atmel CryptoAuthentication Library
atcacert_date.c File Reference

Date handling with regard to certificates. More...

#include "atcacert_date.h"
#include <string.h>

Functions

int atcacert_date_enc (atcacert_date_format_t format, const atcacert_tm_utc_t *timestamp, uint8_t *formatted_date, size_t *formatted_date_size)
 Format a timestamp according to the format type. More...
 
int atcacert_date_dec (atcacert_date_format_t format, const uint8_t *formatted_date, size_t formatted_date_size, atcacert_tm_utc_t *timestamp)
 Parse a formatted timestamp according to the specified format. More...
 
int atcacert_date_get_max_date (atcacert_date_format_t format, atcacert_tm_utc_t *timestamp)
 Return the maximum date available for the given format. More...
 
int atcacert_date_enc_iso8601_sep (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_ISO8601_SEP_SIZE])
 
int atcacert_date_dec_iso8601_sep (const uint8_t formatted_date[DATEFMT_ISO8601_SEP_SIZE], atcacert_tm_utc_t *timestamp)
 
int atcacert_date_enc_rfc5280_utc (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_RFC5280_UTC_SIZE])
 
int atcacert_date_dec_rfc5280_utc (const uint8_t formatted_date[DATEFMT_RFC5280_UTC_SIZE], atcacert_tm_utc_t *timestamp)
 
int atcacert_date_enc_rfc5280_gen (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_RFC5280_GEN_SIZE])
 
int atcacert_date_dec_rfc5280_gen (const uint8_t formatted_date[DATEFMT_RFC5280_GEN_SIZE], atcacert_tm_utc_t *timestamp)
 
int atcacert_date_enc_posix_uint32_be (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_POSIX_UINT32_BE_SIZE])
 
int atcacert_date_dec_posix_uint32_be (const uint8_t formatted_date[DATEFMT_POSIX_UINT32_BE_SIZE], atcacert_tm_utc_t *timestamp)
 
int atcacert_date_enc_posix_uint32_le (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_POSIX_UINT32_LE_SIZE])
 
int atcacert_date_dec_posix_uint32_le (const uint8_t formatted_date[DATEFMT_POSIX_UINT32_LE_SIZE], atcacert_tm_utc_t *timestamp)
 
int atcacert_date_enc_compcert (const atcacert_tm_utc_t *issue_date, uint8_t expire_years, uint8_t enc_dates[3])
 Encode the issue and expire dates in the format used by the compressed certificate. More...
 
int atcacert_date_dec_compcert (const uint8_t enc_dates[3], atcacert_date_format_t expire_date_format, atcacert_tm_utc_t *issue_date, atcacert_tm_utc_t *expire_date)
 Decode the issue and expire dates from the format used by the compressed certificate. More...
 

Detailed Description

Date handling with regard to certificates.

Copyright (c) 2015 Atmel Corporation. All rights reserved.