diff options
author | beck <> | 2017-05-06 17:12:59 +0000 |
---|---|---|
committer | beck <> | 2017-05-06 17:12:59 +0000 |
commit | 853167f231fa10e61d7747b6f028087e76d0eaa6 (patch) | |
tree | dc9c35b12d4ec6d0389f08be9ff6d7183a4f80d4 /src/lib/libcrypto/man | |
parent | d9dc0bed247af8759a2ecc0116b8f9539291435e (diff) | |
download | openbsd-853167f231fa10e61d7747b6f028087e76d0eaa6.tar.gz openbsd-853167f231fa10e61d7747b6f028087e76d0eaa6.tar.bz2 openbsd-853167f231fa10e61d7747b6f028087e76d0eaa6.zip |
Add ASN1_TIME_set_tm to set an asn1 from a struct tm *
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/man')
-rw-r--r-- | src/lib/libcrypto/man/ASN1_time_parse.3 | 34 |
1 files changed, 31 insertions, 3 deletions
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 @@ | |||
1 | .\" $OpenBSD: ASN1_time_parse.3,v 1.3 2016/11/05 09:13:56 jmc Exp $ | 1 | .\" $OpenBSD: ASN1_time_parse.3,v 1.4 2017/05/06 17:12:59 beck Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2016 Bob Beck <beck@openbsd.org> | 3 | .\" Copyright (c) 2016 Bob Beck <beck@openbsd.org> |
4 | .\" | 4 | .\" |
@@ -14,12 +14,13 @@ | |||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | .\" | 16 | .\" |
17 | .Dd $Mdocdate: November 5 2016 $ | 17 | .Dd $Mdocdate: May 6 2017 $ |
18 | .Dt ASN1_TIME_PARSE 3 | 18 | .Dt ASN1_TIME_PARSE 3 |
19 | .Os | 19 | .Os |
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 | .Nm ASN1_TIME_set_tm | ||
23 | .Nd LibreSSL utilities for ASN.1 time types | 24 | .Nd LibreSSL utilities for ASN.1 time types |
24 | .Sh SYNOPSIS | 25 | .Sh SYNOPSIS |
25 | .In openssl/asn1.h | 26 | .In openssl/asn1.h |
@@ -27,6 +28,8 @@ | |||
27 | .Fn ASN1_time_parse "const char *bytes" "size_t len" "struct tm *tm" "int mode" | 28 | .Fn ASN1_time_parse "const char *bytes" "size_t len" "struct tm *tm" "int mode" |
28 | .Ft int | 29 | .Ft int |
29 | .Fn ASN1_time_tm_cmp "struct tm *tm1" "struct tm *tm2" | 30 | .Fn ASN1_time_tm_cmp "struct tm *tm1" "struct tm *tm2" |
31 | .Ft ASN1_TIME * | ||
32 | .Fn ASN1_TIME_set_tm "ASN1_TIME *s" "struct tm *tm" | ||
30 | .Sh DESCRIPTION | 33 | .Sh DESCRIPTION |
31 | The | 34 | The |
32 | .Fn ASN1_time_parse | 35 | .Fn ASN1_time_parse |
@@ -62,6 +65,24 @@ function compares two times in | |||
62 | .Ar tm1 | 65 | .Ar tm1 |
63 | and | 66 | and |
64 | .Ar tm2 . | 67 | .Ar tm2 . |
68 | .Pp | ||
69 | The function | ||
70 | .Fn ASN1_TIME_set_tm | ||
71 | sets the | ||
72 | .Vt ASN1_TIME | ||
73 | structure | ||
74 | .Fa s | ||
75 | to the time represented by the | ||
76 | .Vt strict tm | ||
77 | value pointed to by | ||
78 | .Fa tm . | ||
79 | If | ||
80 | .Fa s | ||
81 | is | ||
82 | .Dv NULL , | ||
83 | a new | ||
84 | .Vt ASN1_TIME | ||
85 | structure is allocated and returned. | ||
65 | .Sh RETURN VALUES | 86 | .Sh RETURN VALUES |
66 | .Fn ASN1_parse_time | 87 | .Fn ASN1_parse_time |
67 | returns | 88 | returns |
@@ -97,3 +118,10 @@ is greater than | |||
97 | is the same as | 118 | is the same as |
98 | .Ar tm2 . | 119 | .Ar tm2 . |
99 | .El | 120 | .El |
121 | .Pp | ||
122 | .Fn ASN1_TIME_set_tm | ||
123 | returns a pointer to an | ||
124 | .Vt ASN1_TIME | ||
125 | structure or | ||
126 | .Dv NULL | ||
127 | if an error occurred. | ||