summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2016-11-04 22:53:26 +0000
committerschwarze <>2016-11-04 22:53:26 +0000
commit49cb3319f65bc48b430b2572648be013e6ea6391 (patch)
tree7c544c5c5ebc62f616cfd64bf1cd1af82d3236a4 /src/lib
parent52b13e057580dc493876cd2725b67a4ba85a8c88 (diff)
downloadopenbsd-49cb3319f65bc48b430b2572648be013e6ea6391.tar.gz
openbsd-49cb3319f65bc48b430b2572648be013e6ea6391.tar.bz2
openbsd-49cb3319f65bc48b430b2572648be013e6ea6391.zip
tweak previous
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/ASN1_time_parse.373
1 files changed, 39 insertions, 34 deletions
diff --git a/src/lib/libcrypto/man/ASN1_time_parse.3 b/src/lib/libcrypto/man/ASN1_time_parse.3
index e70a292f6d..03d37ae00a 100644
--- a/src/lib/libcrypto/man/ASN1_time_parse.3
+++ b/src/lib/libcrypto/man/ASN1_time_parse.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: ASN1_time_parse.3,v 1.1 2016/11/04 18:07:23 beck Exp $ 1.\" $OpenBSD: ASN1_time_parse.3,v 1.2 2016/11/04 22:53:26 schwarze Exp $
2.\" 2.\"
3.\" Copyright (c) 2016 Bob Beck <beck@@openbsd.org> 3.\" Copyright (c) 2016 Bob Beck <beck@openbsd.org>
4.\" 4.\"
5.\" Permission to use, copy, modify, and distribute this software for any 5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above 6.\" purpose with or without fee is hereby granted, provided that the above
@@ -20,75 +20,80 @@
20.Sh NAME 20.Sh NAME
21.Nm ASN1_time_parse, 21.Nm ASN1_time_parse,
22.Nm ASN1_time_tm_cmp 22.Nm ASN1_time_tm_cmp
23.Nd LibreSSL utilities for asn1 format time. 23.Nd LibreSSL utilities for ASN1 format time
24.Sh SYNOPSIS 24.Sh SYNOPSIS
25.In asn1.h 25.In openssl/asn1.h
26.Ft "int" 26.Ft int
27.Fn ASN1_time_parse "const char *bytes" "size_t len" "struct tm *tm" "int mode 27.Fn ASN1_time_parse "const char *bytes" "size_t len" "struct tm *tm" "int mode"
28.Ft "int" 28.Ft int
29.Fn ASN1_time_tm_cmp "struct tm *tm1" "struct tm *tm2" 29.Fn ASN1_time_tm_cmp "struct tm *tm1" "struct tm *tm2"
30.Sh DESCRIPTION 30.Sh DESCRIPTION
31The 31The
32.Nm ASN1_time_parse 32.Fn ASN1_time_parse
33function parses an asn1 time string of 33function parses an ASN1 time string of
34.Ar len 34.Ar len
35bytes starting at 35bytes starting at
36.Ar bytes . 36.Ar bytes .
37The resulting time is stored in 37The resulting time is stored in
38.Ar tm 38.Ar tm
39if 39if
40.Ar tm 40.Ar tm
41is non NULL. 41is not
42.Dv NULL .
42.Pp 43.Pp
43The 44The
44.Ar mode 45.Ar mode
45parameter must be one of 46parameter must be one of
46.Bl -bullet -offset four 47.Bl -bullet -offset four
47.It 48.It
48.Ar 0 490 to parse a time as specified in RFC 5280 for an X509 object,
49to parse a time as specified in RFC 5280 for an X509 object, 50which may be either a UTC time or a Generalized time.
50which may be either a UTC time or a Generalized time.
51.It 51.It
52.Ar V_ASN1_UTCTIME 52.Dv V_ASN1_UTCTIME
53to parse an RFC 5280 format UTC time. 53to parse an RFC 5280 format UTC time.
54.It 54.It
55.Ar V_ASN1_GENERALIZEDTIME 55.Dv V_ASN1_GENERALIZEDTIME
56to parse an RFC 5280 format Generalized time. 56to parse an RFC 5280 format Generalized time.
57.El 57.El
58.Pp 58.Pp
59The 59The
60.Nm ASN1_time_tm_cmp 60.Fn ASN1_time_tm_cmp
61function compares two times in 61function compares two times in
62.Ar tm1 62.Ar tm1
63and 63and
64.Ar tm2 64.Ar tm2 .
65.Sh RETURN VALUES 65.Sh RETURN VALUES
66.Nm ASN1_parse_time 66.Fn ASN1_parse_time
67returns 67returns
68.Bl -bullet -offset four 68.Bl -bullet -offset four
69.It 69.It
70.Ar -1 70-1 if the string was invalid for the
71if the string was invalid for the
72.Ar mode 71.Ar mode
73specified 72specified.
74.It 73.It
75.Ar V_ASN1_UTCTIME 74.Dv V_ASN1_UTCTIME
76if the string parsed as a valid UTC time. 75if the string parsed as a valid UTC time.
77.It : 76.It
78.Ar V_ASN1_GENERALIZEDTIME 77.Dv V_ASN1_GENERALIZEDTIME
79if the string parsed as a valid Generalized time. 78if the string parsed as a valid Generalized time.
80.El 79.El
81.Pp 80.Pp
82.Nm ASN1_time_tm_cmp 81.Fn ASN1_time_tm_cmp
83returns 82returns
84.Bl -bullet -offset four 83.Bl -bullet -offset four
85.It 84.It
86.Ar -1 85-1 if
87if tm1 is less than tm2. 86.Ar tm1
87is less than
88.Ar tm2 .
88.It 89.It
89.Ar 1 901 if
90if tm1 is greater than tm2. 91.Ar tm1
92is greater than
93.Ar tm2 .
91.It 94.It
92.Ar 0 950 if
93if tm1 is the same as tm2. 96.Ar tm1
97is the same as
98.Ar tm2 .
94.El 99.El