[tls] Parse X.509 validity times into seconds since the Epoch

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2012-03-19 22:49:09 +00:00
parent 5da712385e
commit 0610bcb1d2
2 changed files with 17 additions and 24 deletions

View File

@@ -11,6 +11,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <stdint.h>
#include <stddef.h>
#include <time.h>
#include <ipxe/asn1.h>
/** ASN.1 OID for joint-iso-itu-t(2) ds(5) attributeType(4) */
@@ -70,18 +71,8 @@ struct x509_issuer {
/** An X.509 time */
struct x509_time {
/** Year */
uint16_t year;
/** Month */
uint8_t month;
/** Day */
uint8_t day;
/** Hour */
uint8_t hour;
/** Minute */
uint8_t minute;
/** Second */
uint8_t second;
/** Seconds since the Epoch */
time_t time;
};
/** An X.509 certificate validity period */