diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/man/X509_cmp_time.3 | 90 |
1 files changed, 67 insertions, 23 deletions
diff --git a/src/lib/libcrypto/man/X509_cmp_time.3 b/src/lib/libcrypto/man/X509_cmp_time.3 index 96b671f3c9..7c61e2f605 100644 --- a/src/lib/libcrypto/man/X509_cmp_time.3 +++ b/src/lib/libcrypto/man/X509_cmp_time.3 | |||
| @@ -1,7 +1,24 @@ | |||
| 1 | .\" $OpenBSD: X509_cmp_time.3,v 1.9 2019/06/06 01:06:59 schwarze Exp $ | 1 | .\" $OpenBSD: X509_cmp_time.3,v 1.10 2021/11/08 14:44:14 schwarze Exp $ |
| 2 | .\" OpenSSL X509_cmp_time.pod 24053693 Mar 28 14:27:37 2017 +0200 | 2 | .\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Emilia Kasper <emilia@openssl.org> | 4 | .\" This file is a derived work. |
| 5 | .\" The changes are covered by the following Copyright and license: | ||
| 6 | .\" | ||
| 7 | .\" Copyright (c) 2017, 2021 Ingo Schwarze <schwarze@openbsd.org> | ||
| 8 | .\" | ||
| 9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 11 | .\" copyright notice and this permission notice appear in all copies. | ||
| 12 | .\" | ||
| 13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 20 | .\" | ||
| 21 | .\" The original file was written by Emilia Kasper <emilia@openssl.org> | ||
| 5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | 22 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. |
| 6 | .\" | 23 | .\" |
| 7 | .\" Redistribution and use in source and binary forms, with or without | 24 | .\" Redistribution and use in source and binary forms, with or without |
| @@ -48,14 +65,15 @@ | |||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | .\" | 67 | .\" |
| 51 | .Dd $Mdocdate: June 6 2019 $ | 68 | .Dd $Mdocdate: November 8 2021 $ |
| 52 | .Dt X509_CMP_TIME 3 | 69 | .Dt X509_CMP_TIME 3 |
| 53 | .Os | 70 | .Os |
| 54 | .Sh NAME | 71 | .Sh NAME |
| 55 | .Nm X509_cmp_time , | 72 | .Nm X509_cmp_time , |
| 56 | .Nm X509_cmp_current_time , | 73 | .Nm X509_cmp_current_time , |
| 57 | .Nm X509_time_adj_ex , | 74 | .Nm X509_time_adj_ex , |
| 58 | .Nm X509_time_adj | 75 | .Nm X509_time_adj , |
| 76 | .Nm X509_gmtime_adj | ||
| 59 | .Nd ASN.1 Time utilities | 77 | .Nd ASN.1 Time utilities |
| 60 | .Sh SYNOPSIS | 78 | .Sh SYNOPSIS |
| 61 | .In openssl/x509.h | 79 | .In openssl/x509.h |
| @@ -70,16 +88,21 @@ | |||
| 70 | .Fc | 88 | .Fc |
| 71 | .Ft ASN1_TIME * | 89 | .Ft ASN1_TIME * |
| 72 | .Fo X509_time_adj_ex | 90 | .Fo X509_time_adj_ex |
| 73 | .Fa "ASN1_TIME *asn1_time" | 91 | .Fa "ASN1_TIME *out_time" |
| 74 | .Fa "int offset_day" | 92 | .Fa "int offset_day" |
| 75 | .Fa "long offset_sec" | 93 | .Fa "long offset_sec" |
| 76 | .Fa "time_t *in_tm" | 94 | .Fa "time_t *in_time" |
| 77 | .Fc | 95 | .Fc |
| 78 | .Ft ASN1_TIME * | 96 | .Ft ASN1_TIME * |
| 79 | .Fo X509_time_adj | 97 | .Fo X509_time_adj |
| 80 | .Fa "ASN1_TIME *asn1_time" | 98 | .Fa "ASN1_TIME *out_time" |
| 99 | .Fa "long offset_sec" | ||
| 100 | .Fa "time_t *in_time" | ||
| 101 | .Fc | ||
| 102 | .Ft ASN1_TIME * | ||
| 103 | .Fo X509_gmtime_adj | ||
| 104 | .Fa "ASN1_TIME *out_time" | ||
| 81 | .Fa "long offset_sec" | 105 | .Fa "long offset_sec" |
| 82 | .Fa "time_t *in_tm" | ||
| 83 | .Fc | 106 | .Fc |
| 84 | .Sh DESCRIPTION | 107 | .Sh DESCRIPTION |
| 85 | .Fn X509_cmp_time | 108 | .Fn X509_cmp_time |
| @@ -94,28 +117,46 @@ compares it to the current time. | |||
| 94 | .Pp | 117 | .Pp |
| 95 | .Fn X509_time_adj_ex | 118 | .Fn X509_time_adj_ex |
| 96 | sets | 119 | sets |
| 97 | .Fa asn1_time | 120 | .Fa out_time |
| 98 | to a time | 121 | to a time |
| 99 | .Fa offset_day | 122 | .Fa offset_day |
| 100 | and | 123 | and |
| 101 | .Fa offset_sec | 124 | .Fa offset_sec |
| 102 | later than | 125 | later than |
| 103 | .Fa in_tm . | 126 | .Fa in_time . |
| 104 | .Fn X509_time_adj | 127 | The values of |
| 105 | does the same with a 0 day offset. | 128 | .Fa offset_day |
| 129 | and | ||
| 130 | .Fa offset_sec | ||
| 131 | can be negative to set a time before | ||
| 132 | .Fa in_time . | ||
| 133 | The | ||
| 134 | .Fa offset_sec | ||
| 135 | value can also exceed the number of seconds in a day. | ||
| 106 | If | 136 | If |
| 107 | .Fa asn1_time | 137 | .Fa in_time |
| 138 | is | ||
| 139 | .Dv NULL , | ||
| 140 | the current time is used instead. | ||
| 141 | If | ||
| 142 | .Fa out_time | ||
| 108 | is | 143 | is |
| 109 | .Dv NULL , | 144 | .Dv NULL , |
| 110 | a new | 145 | a new |
| 111 | .Vt ASN1_TIME | 146 | .Vt ASN1_TIME |
| 112 | structure is allocated and returned. | 147 | structure is allocated and returned. |
| 113 | .Pp | 148 | .Pp |
| 114 | In all functions, if | 149 | .Fn X509_time_adj |
| 115 | .Fa in_tm | 150 | does the same with a 0 day offset. |
| 116 | is | 151 | .Pp |
| 117 | .Dv NULL , | 152 | .Fn X509_gmtime_adj |
| 118 | the current time is used. | 153 | does the same using the current time instead of |
| 154 | .Fa in_time , | ||
| 155 | that is, it sets | ||
| 156 | .Fa out_time | ||
| 157 | to a time | ||
| 158 | .Fa offset_sec | ||
| 159 | seconds later than the current time. | ||
| 119 | .Sh RETURN VALUES | 160 | .Sh RETURN VALUES |
| 120 | .Fn X509_cmp_time | 161 | .Fn X509_cmp_time |
| 121 | and | 162 | and |
| @@ -126,10 +167,11 @@ is earlier than or equal to | |||
| 126 | .Fa cmp_time , | 167 | .Fa cmp_time , |
| 127 | 1 if it is later, or 0 on error. | 168 | 1 if it is later, or 0 on error. |
| 128 | .Pp | 169 | .Pp |
| 129 | .Fn X509_time_adj_ex | 170 | .Fn X509_time_adj_ex , |
| 171 | .Fn X509_time_adj , | ||
| 130 | and | 172 | and |
| 131 | .Fn X509_time_adj | 173 | .Fn X509_gmtime_adj |
| 132 | return a pointer to the updated | 174 | return a pointer to the updated or newly allocated |
| 133 | .Vt ASN1_TIME | 175 | .Vt ASN1_TIME |
| 134 | structure or | 176 | structure or |
| 135 | .Dv NULL | 177 | .Dv NULL |
| @@ -141,7 +183,9 @@ on error. | |||
| 141 | .Xr time 3 | 183 | .Xr time 3 |
| 142 | .Sh HISTORY | 184 | .Sh HISTORY |
| 143 | .Fn X509_cmp_current_time | 185 | .Fn X509_cmp_current_time |
| 144 | first appeared in SSLeay 0.6.0 and has been available since | 186 | and |
| 187 | .Fn X509_gmtime_adj | ||
| 188 | first appeared in SSLeay 0.6.0 and have been available since | ||
| 145 | .Ox 2.4 . | 189 | .Ox 2.4 . |
| 146 | .Pp | 190 | .Pp |
| 147 | .Fn X509_cmp_time | 191 | .Fn X509_cmp_time |
