summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Yang <kaishen.yy@antfin.com>2020-01-13 14:26:11 +0800
committerPaul Yang <kaishen.yy@antfin.com>2020-01-17 11:30:33 +0800
commitfe4309b0de64502398116f648cc7f2068e1a1537 (patch)
treea4bc6f6fe4b87f1984ae05e94fe1ff2e5362a0c6 /doc
parent83c51006759437b8643264c5fb748030fd6aaef5 (diff)
Add duplication APIs to ASN1_TIME and related types
Fixes #10600. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10823)
Diffstat (limited to 'doc')
-rw-r--r--doc/man3/ASN1_TIME_set.pod14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/man3/ASN1_TIME_set.pod b/doc/man3/ASN1_TIME_set.pod
index ddae0fa326..fc2b9308af 100644
--- a/doc/man3/ASN1_TIME_set.pod
+++ b/doc/man3/ASN1_TIME_set.pod
@@ -13,7 +13,8 @@ ASN1_TIME_print, ASN1_UTCTIME_print, ASN1_GENERALIZEDTIME_print,
ASN1_TIME_diff,
ASN1_TIME_cmp_time_t, ASN1_UTCTIME_cmp_time_t,
ASN1_TIME_compare,
-ASN1_TIME_to_generalizedtime - ASN.1 Time functions
+ASN1_TIME_to_generalizedtime,
+ASN1_TIME_dup, ASN1_UTCTIME_dup, ASN1_GENERALIZEDTIME_dup - ASN.1 Time functions
=head1 SYNOPSIS
@@ -58,6 +59,10 @@ ASN1_TIME_to_generalizedtime - ASN.1 Time functions
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t,
ASN1_GENERALIZEDTIME **out);
+ ASN1_TIME *ASN1_TIME_dup(const ASN1_TIME *t);
+ ASN1_UTCTIME *ASN1_UTCTIME_dup(const ASN1_UTCTIME *t);
+ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_dup(const ASN1_GENERALIZEDTIME *t);
+
=head1 DESCRIPTION
The ASN1_TIME_set(), ASN1_UTCTIME_set() and ASN1_GENERALIZEDTIME_set()
@@ -131,6 +136,10 @@ The ASN1_TIME_to_generalizedtime() function converts an B<ASN1_TIME> to an
B<ASN1_GENERALIZEDTIME>, regardless of year. If either I<out> or
I<*out> are NULL, then a new object is allocated and must be freed after use.
+The ASN1_TIME_dup(), ASN1_UTCTIME_dup() and ASN1_GENERALIZEDTIME_dup() functions
+duplicate the time structure I<t> and return the duplicated result
+correspondingly.
+
=head1 NOTES
The B<ASN1_TIME> structure corresponds to the ASN.1 structure B<Time>
@@ -210,6 +219,9 @@ or 1 if I<a> is after I<b>. -2 is returned on error.
ASN1_TIME_to_generalizedtime() returns a pointer to the appropriate time
structure on success or NULL if an error occurred.
+ASN1_TIME_dup(), ASN1_UTCTIME_dup() and ASN1_GENERALIZEDTIME_dup() return a
+pointer to a time structure or NULL if an error occurred.
+
=head1 EXAMPLES
Set a time structure to one hour after the current time and print it out: