From 853167f231fa10e61d7747b6f028087e76d0eaa6 Mon Sep 17 00:00:00 2001 From: beck <> Date: Sat, 6 May 2017 17:12:59 +0000 Subject: Add ASN1_TIME_set_tm to set an asn1 from a struct tm * ok jsing@ --- src/lib/libcrypto/man/ASN1_time_parse.3 | 34 ++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/man/ASN1_time_parse.3') diff --git a/src/lib/libcrypto/man/ASN1_time_parse.3 b/src/lib/libcrypto/man/ASN1_time_parse.3 index 77f8b129e2..f14ada5369 100644 --- a/src/lib/libcrypto/man/ASN1_time_parse.3 +++ b/src/lib/libcrypto/man/ASN1_time_parse.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ASN1_time_parse.3,v 1.3 2016/11/05 09:13:56 jmc Exp $ +.\" $OpenBSD: ASN1_time_parse.3,v 1.4 2017/05/06 17:12:59 beck Exp $ .\" .\" Copyright (c) 2016 Bob Beck .\" @@ -14,12 +14,13 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 5 2016 $ +.Dd $Mdocdate: May 6 2017 $ .Dt ASN1_TIME_PARSE 3 .Os .Sh NAME .Nm ASN1_time_parse , -.Nm ASN1_time_tm_cmp +.Nm ASN1_time_tm_cmp, +.Nm ASN1_TIME_set_tm .Nd LibreSSL utilities for ASN.1 time types .Sh SYNOPSIS .In openssl/asn1.h @@ -27,6 +28,8 @@ .Fn ASN1_time_parse "const char *bytes" "size_t len" "struct tm *tm" "int mode" .Ft int .Fn ASN1_time_tm_cmp "struct tm *tm1" "struct tm *tm2" +.Ft ASN1_TIME * +.Fn ASN1_TIME_set_tm "ASN1_TIME *s" "struct tm *tm" .Sh DESCRIPTION The .Fn ASN1_time_parse @@ -62,6 +65,24 @@ function compares two times in .Ar tm1 and .Ar tm2 . +.Pp +The function +.Fn ASN1_TIME_set_tm +sets the +.Vt ASN1_TIME +structure +.Fa s +to the time represented by the +.Vt strict tm +value pointed to by +.Fa tm . +If +.Fa s +is +.Dv NULL , +a new +.Vt ASN1_TIME +structure is allocated and returned. .Sh RETURN VALUES .Fn ASN1_parse_time returns @@ -97,3 +118,10 @@ is greater than is the same as .Ar tm2 . .El +.Pp +.Fn ASN1_TIME_set_tm +returns a pointer to an +.Vt ASN1_TIME +structure or +.Dv NULL +if an error occurred. -- cgit v1.2.3-55-g6feb