diff options
author | schwarze <> | 2016-11-04 22:53:26 +0000 |
---|---|---|
committer | schwarze <> | 2016-11-04 22:53:26 +0000 |
commit | 49cb3319f65bc48b430b2572648be013e6ea6391 (patch) | |
tree | 7c544c5c5ebc62f616cfd64bf1cd1af82d3236a4 /src/lib | |
parent | 52b13e057580dc493876cd2725b67a4ba85a8c88 (diff) | |
download | openbsd-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.3 | 73 |
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 |
31 | The | 31 | The |
32 | .Nm ASN1_time_parse | 32 | .Fn ASN1_time_parse |
33 | function parses an asn1 time string of | 33 | function parses an ASN1 time string of |
34 | .Ar len | 34 | .Ar len |
35 | bytes starting at | 35 | bytes starting at |
36 | .Ar bytes . | 36 | .Ar bytes . |
37 | The resulting time is stored in | 37 | The resulting time is stored in |
38 | .Ar tm | 38 | .Ar tm |
39 | if | 39 | if |
40 | .Ar tm | 40 | .Ar tm |
41 | is non NULL. | 41 | is not |
42 | .Dv NULL . | ||
42 | .Pp | 43 | .Pp |
43 | The | 44 | The |
44 | .Ar mode | 45 | .Ar mode |
45 | parameter must be one of | 46 | parameter must be one of |
46 | .Bl -bullet -offset four | 47 | .Bl -bullet -offset four |
47 | .It | 48 | .It |
48 | .Ar 0 | 49 | 0 to parse a time as specified in RFC 5280 for an X509 object, |
49 | to parse a time as specified in RFC 5280 for an X509 object, | 50 | which may be either a UTC time or a Generalized time. |
50 | which may be either a UTC time or a Generalized time. | ||
51 | .It | 51 | .It |
52 | .Ar V_ASN1_UTCTIME | 52 | .Dv V_ASN1_UTCTIME |
53 | to parse an RFC 5280 format UTC time. | 53 | to parse an RFC 5280 format UTC time. |
54 | .It | 54 | .It |
55 | .Ar V_ASN1_GENERALIZEDTIME | 55 | .Dv V_ASN1_GENERALIZEDTIME |
56 | to parse an RFC 5280 format Generalized time. | 56 | to parse an RFC 5280 format Generalized time. |
57 | .El | 57 | .El |
58 | .Pp | 58 | .Pp |
59 | The | 59 | The |
60 | .Nm ASN1_time_tm_cmp | 60 | .Fn ASN1_time_tm_cmp |
61 | function compares two times in | 61 | function compares two times in |
62 | .Ar tm1 | 62 | .Ar tm1 |
63 | and | 63 | and |
64 | .Ar tm2 | 64 | .Ar tm2 . |
65 | .Sh RETURN VALUES | 65 | .Sh RETURN VALUES |
66 | .Nm ASN1_parse_time | 66 | .Fn ASN1_parse_time |
67 | returns | 67 | returns |
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 |
71 | if the string was invalid for the | ||
72 | .Ar mode | 71 | .Ar mode |
73 | specified | 72 | specified. |
74 | .It | 73 | .It |
75 | .Ar V_ASN1_UTCTIME | 74 | .Dv V_ASN1_UTCTIME |
76 | if the string parsed as a valid UTC time. | 75 | if the string parsed as a valid UTC time. |
77 | .It : | 76 | .It |
78 | .Ar V_ASN1_GENERALIZEDTIME | 77 | .Dv V_ASN1_GENERALIZEDTIME |
79 | if the string parsed as a valid Generalized time. | 78 | if 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 |
83 | returns | 82 | returns |
84 | .Bl -bullet -offset four | 83 | .Bl -bullet -offset four |
85 | .It | 84 | .It |
86 | .Ar -1 | 85 | -1 if |
87 | if tm1 is less than tm2. | 86 | .Ar tm1 |
87 | is less than | ||
88 | .Ar tm2 . | ||
88 | .It | 89 | .It |
89 | .Ar 1 | 90 | 1 if |
90 | if tm1 is greater than tm2. | 91 | .Ar tm1 |
92 | is greater than | ||
93 | .Ar tm2 . | ||
91 | .It | 94 | .It |
92 | .Ar 0 | 95 | 0 if |
93 | if tm1 is the same as tm2. | 96 | .Ar tm1 |
97 | is the same as | ||
98 | .Ar tm2 . | ||
94 | .El | 99 | .El |