aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Yang <yang.yang@baishancloud.com>2017-07-11 03:01:24 +0800
committerPauli <paul.dale@oracle.com>2017-07-24 08:27:27 +1000
commit3d0f1cb9fdd630c6c920bc97bf496538717e7705 (patch)
tree9158a0ff2ce5d7385fd441d6ecd5eb05bcd1d63a /doc
parenta1099821f9937717f92464056d80f2e303a73a4d (diff)
downloadopenssl-3d0f1cb9fdd630c6c920bc97bf496538717e7705.tar.gz
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 'doc')
-rw-r--r--doc/man3/ASN1_TIME_set.pod6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/man3/ASN1_TIME_set.pod b/doc/man3/ASN1_TIME_set.pod
index 5f041a575c..379f28a4af 100644
--- a/doc/man3/ASN1_TIME_set.pod
+++ b/doc/man3/ASN1_TIME_set.pod
@@ -55,8 +55,10 @@ an error.
ASN1_TIME_to_tm() converts the time B<s> to the standard B<tm> structure.
If B<s> is NULL, then the current time is converted. The output time is GMT.
-Only the B<tm_sec>, B<tm_min>, B<tm_hour>, B<tm_mday>, B<tm_mon> and B<tm_year>
-fields are updated.
+The B<tm_sec>, B<tm_min>, B<tm_hour>, B<tm_mday>, B<tm_mon> and B<tm_year>
+fields of B<tm> structure are set to proper values, whereas all other fields
+are set to 0. If B<tm> is NULL this function performs a format check on B<s>
+only.
ASN1_TIME_diff() sets B<*pday> and B<*psec> to the time difference between
B<from> and B<to>. If B<to> represents a time later than B<from> then