diff options
| author | schwarze <> | 2017-04-10 17:14:44 +0000 | 
|---|---|---|
| committer | schwarze <> | 2017-04-10 17:14:44 +0000 | 
| commit | 85a86fc53f3f27b9e01de80f3633d6b7a2e27743 (patch) | |
| tree | 38a51b5592961dfcbc8e6ed59ab029f8b473d35b | |
| parent | 1a9c0927ed6ff9994f516950c7ae063fe921ef78 (diff) | |
| download | openbsd-85a86fc53f3f27b9e01de80f3633d6b7a2e27743.tar.gz openbsd-85a86fc53f3f27b9e01de80f3633d6b7a2e27743.tar.bz2 openbsd-85a86fc53f3f27b9e01de80f3633d6b7a2e27743.zip | |
document three additional functions;
from Emilia Kasper <emilia at openssl dot org>, OpenSSL commit 4ac139b4
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/man/X509_cmp_time.3 | 67 | 
1 files changed, 60 insertions, 7 deletions
| diff --git a/src/lib/libcrypto/man/X509_cmp_time.3 b/src/lib/libcrypto/man/X509_cmp_time.3 index 134cb10de3..53ed122824 100644 --- a/src/lib/libcrypto/man/X509_cmp_time.3 +++ b/src/lib/libcrypto/man/X509_cmp_time.3 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | .\" $OpenBSD: X509_cmp_time.3,v 1.3 2017/03/27 17:00:54 jmc Exp $ | 1 | .\" $OpenBSD: X509_cmp_time.3,v 1.4 2017/04/10 17:14:44 schwarze Exp $ | 
| 2 | .\" OpenSSL X509_cmp_time.pod 80770da3 Feb 17 19:00:15 2017 +0100 | 2 | .\" OpenSSL X509_cmp_time.pod 24053693 Mar 28 14:27:37 2017 +0200 | 
| 3 | .\" | 3 | .\" | 
| 4 | .\" This file was written by Emilia Kasper <emilia@openssl.org> | 4 | .\" This file was written by Emilia Kasper <emilia@openssl.org> | 
| 5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | 5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | 
| @@ -48,12 +48,15 @@ | |||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 
| 50 | .\" | 50 | .\" | 
| 51 | .Dd $Mdocdate: March 27 2017 $ | 51 | .Dd $Mdocdate: April 10 2017 $ | 
| 52 | .Dt X509_CMP_TIME 3 | 52 | .Dt X509_CMP_TIME 3 | 
| 53 | .Os | 53 | .Os | 
| 54 | .Sh NAME | 54 | .Sh NAME | 
| 55 | .Nm X509_cmp_time | 55 | .Nm X509_cmp_time , | 
| 56 | .Nd compare an ASN.1 Time to a time in seconds since the Epoch | 56 | .Nm X509_cmp_current_time , | 
| 57 | .Nm X509_time_adj_ex , | ||
| 58 | .Nm X509_time_adj | ||
| 59 | .Nd ASN.1 Time utilities | ||
| 57 | .Sh SYNOPSIS | 60 | .Sh SYNOPSIS | 
| 58 | .In openssl/x509.h | 61 | .In openssl/x509.h | 
| 59 | .Ft int | 62 | .Ft int | 
| @@ -61,6 +64,23 @@ | |||
| 61 | .Fa "const ASN1_TIME *asn1_time" | 64 | .Fa "const ASN1_TIME *asn1_time" | 
| 62 | .Fa "time_t *cmp_time" | 65 | .Fa "time_t *cmp_time" | 
| 63 | .Fc | 66 | .Fc | 
| 67 | .Ft int | ||
| 68 | .Fo X509_cmp_current_time | ||
| 69 | .Fa "const ASN1_TIME *asn1_time" | ||
| 70 | .Fc | ||
| 71 | .Ft ASN1_TIME * | ||
| 72 | .Fo X509_time_adj_ex | ||
| 73 | .Fa "ASN1_TIME *asn1_time" | ||
| 74 | .Fa "int offset_day" | ||
| 75 | .Fa "long offset_sec" | ||
| 76 | .Fa "time_t *in_tm" | ||
| 77 | .Fc | ||
| 78 | .Ft ASN1_TIME * | ||
| 79 | .Fo X509_time_adj | ||
| 80 | .Fa "ASN1_TIME *asn1_time" | ||
| 81 | .Fa "long offset_sec" | ||
| 82 | .Fa "time_t *in_tm" | ||
| 83 | .Fc | ||
| 64 | .Sh DESCRIPTION | 84 | .Sh DESCRIPTION | 
| 65 | .Fn X509_cmp_time | 85 | .Fn X509_cmp_time | 
| 66 | parses | 86 | parses | 
| @@ -69,18 +89,51 @@ with | |||
| 69 | .Xr ASN1_time_parse 3 | 89 | .Xr ASN1_time_parse 3 | 
| 70 | and compares it to | 90 | and compares it to | 
| 71 | .Fa cmp_time . | 91 | .Fa cmp_time . | 
| 92 | .Fn X509_cmp_current_time | ||
| 93 | compares it to the current time. | ||
| 94 | .Pp | ||
| 95 | .Fn X509_time_adj_ex | ||
| 96 | sets | ||
| 97 | .Fa asn1_time | ||
| 98 | to a time | ||
| 99 | .Fa offset_day | ||
| 100 | and | ||
| 101 | .Fa offset_sec | ||
| 102 | later than | ||
| 103 | .Fa in_tm . | ||
| 104 | .Fn X509_time_adj | ||
| 105 | does the same with a 0 day offset. | ||
| 72 | If | 106 | If | 
| 73 | .Fa cmp_time | 107 | .Fa asn1_time | 
| 108 | is | ||
| 109 | .Dv NULL , | ||
| 110 | a new | ||
| 111 | .Vt ASN1_TIME | ||
| 112 | structure is allocated and returned. | ||
| 113 | .Pp | ||
| 114 | In all functions, if | ||
| 115 | .Fa in_tm | ||
| 74 | is | 116 | is | 
| 75 | .Dv NULL , | 117 | .Dv NULL , | 
| 76 | the current time is used. | 118 | the current time is used. | 
| 77 | .Sh RETURN VALUES | 119 | .Sh RETURN VALUES | 
| 78 | .Fn X509_cmp_time | 120 | .Fn X509_cmp_time | 
| 79 | returns -1 if | 121 | and | 
| 122 | .Fn X509_cmp_current_time | ||
| 123 | return -1 if | ||
| 80 | .Fa asn1_time | 124 | .Fa asn1_time | 
| 81 | is earlier than or equal to | 125 | is earlier than or equal to | 
| 82 | .Fa cmp_time , | 126 | .Fa cmp_time , | 
| 83 | 1 if it is later, or 0 on error. | 127 | 1 if it is later, or 0 on error. | 
| 128 | .Pp | ||
| 129 | .Fn X509_time_adj_ex | ||
| 130 | and | ||
| 131 | .Fn X509_time_adj | ||
| 132 | return a pointer to the updated | ||
| 133 | .Vt ASN1_TIME | ||
| 134 | structure or | ||
| 135 | .Dv NULL | ||
| 136 | on error. | ||
| 84 | .Sh SEE ALSO | 137 | .Sh SEE ALSO | 
| 85 | .Xr ASN1_time_parse 3 , | 138 | .Xr ASN1_time_parse 3 , | 
| 86 | .Xr time 3 | 139 | .Xr time 3 | 
