diff options
author | Paul Yang <yang.yang@baishancloud.com> | 2017-07-11 03:01:24 +0800 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2017-07-24 08:27:27 +1000 |
commit | 3d0f1cb9fdd630c6c920bc97bf496538717e7705 (patch) | |
tree | 9158a0ff2ce5d7385fd441d6ecd5eb05bcd1d63a /crypto/asn1/asn1_locl.h | |
parent | a1099821f9937717f92464056d80f2e303a73a4d (diff) | |
download | openssl-3d0f1cb9fdd630c6c920bc97bf496538717e7705.zip openssl-3d0f1cb9fdd630c6c920bc97bf496538717e7705.tar.gz openssl-3d0f1cb9fdd630c6c920bc97bf496538717e7705.tar.bz2 |
Add asn1_time_to_tm function and check days in month
Based on discussion in PR #3566. Reduce duplicated code in original
asn1_utctime_to_tm and asn1_generalizedtime_to_tm, and introduce a new
internal function asn1_time_to_tm. This function also checks if the days
in the input time string is valid or not for the corresponding month.
Test cases are also added.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/3905)
Diffstat (limited to 'crypto/asn1/asn1_locl.h')
-rw-r--r-- | crypto/asn1/asn1_locl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/asn1_locl.h b/crypto/asn1/asn1_locl.h index 9470c7d..bf095ea 100644 --- a/crypto/asn1/asn1_locl.h +++ b/crypto/asn1/asn1_locl.h @@ -9,6 +9,7 @@ /* Internal ASN1 structures and functions: not for application use */ +int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d); int asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d); int asn1_generalizedtime_to_tm(struct tm *tm, const ASN1_GENERALIZEDTIME *d); |