diff options
author | Todd Short <tshort@akamai.com> | 2017-08-04 11:24:03 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2017-08-04 11:24:03 +1000 |
commit | cf37aaa335965902c6a022bc3c3e0162f59c0f3a (patch) | |
tree | b00a60fd9a70836f4d97478432cd4d9ddaae73fa /include/openssl/asn1.h | |
parent | 2326bba0e5cbe98f4d00855a6909b1f14b6f5427 (diff) | |
download | openssl-cf37aaa335965902c6a022bc3c3e0162f59c0f3a.tar.gz |
Consolidate to a single asn1_time_from_tm() function
Add missing ASN1_TIME functions
Do some cleanup of the ASN1_TIME code.
Add ASN1_TIME_normalize() to normalize ASN1_TIME structures.
Add ASN1_TIME_compare() to compare two ASN1_TIME structures.
Add ASN1_TIME_cmp_time_t() to compare an ASN1_TIME to time_t
(generic version of ASN1_UTCTIME_cmp_time_t()).
Replace '0' .. '9' compares with isdigit()
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2753)
Diffstat (limited to 'include/openssl/asn1.h')
-rw-r--r-- | include/openssl/asn1.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h index 60409926ad..54aa038067 100644 --- a/include/openssl/asn1.h +++ b/include/openssl/asn1.h @@ -590,6 +590,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, time_t t, int offset_day, long offset_sec); int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str); + int ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, const ASN1_TIME *to); @@ -632,6 +633,9 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t, int ASN1_TIME_set_string(ASN1_TIME *s, const char *str); int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str); int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm); +int ASN1_TIME_normalize(ASN1_TIME *s); +int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t); +int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b); int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a); int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size); |