summary refs log tree commit diff
path: root/man/tls_config_set_session_id.3
blob: d969e01e3394a059ca56202e01cf2e8c39da8d71 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.\" $OpenBSD: tls_config_set_session_id.3,v 1.5 2018/02/10 06:07:43 jsing Exp $
.\"
.\" Copyright (c) 2017 Claudio Jeker <claudio@openbsd.org>
.\" Copyright (c) 2018 Joel Sing <jsing@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: February 10 2018 $
.Dt TLS_CONFIG_SET_SESSION_ID 3
.Os
.Sh NAME
.Nm tls_config_set_session_fd ,
.Nm tls_config_set_session_id ,
.Nm tls_config_set_session_lifetime ,
.Nm tls_config_add_ticket_key
.Nd configure resuming of TLS handshakes
.Sh SYNOPSIS
.In tls.h
.Ft int
.Fo tls_config_set_session_fd
.Fa "struct tls_config *config"
.Fa "int session_fd"
.Fc
.Ft int
.Fo tls_config_set_session_id
.Fa "struct tls_config *config"
.Fa "const unsigned char *session_id"
.Fa "size_t len"
.Fc
.Ft int
.Fo tls_config_set_session_lifetime
.Fa "struct tls_config *config"
.Fa "int lifetime"
.Fc
.Ft int
.Fo tls_config_add_ticket_key
.Fa "struct tls_config *config"
.Fa "uint32_t keyrev"
.Fa "unsigned char *key"
.Fa "size_t keylen"
.Fc
.Sh DESCRIPTION
.Fn tls_config_set_session_fd
sets a file descriptor to be used to manage data for TLS sessions (client only).
The given file descriptor must be a regular file and be owned by the current
user, with permissions being restricted to only allow the owner to read and
write the file (0600).
If the file has a non-zero length, the client will attempt to read session
data from this file and resume the previous TLS session with the server.
Upon a successful handshake the file will be updated with current session
data, if available.
The caller is responsible for closing this file descriptor, after all TLS
contexts that have been configured to use it have been freed via
.Fn tls_free .
.Pp
.Fn tls_config_set_session_id
sets the session identifier that will be used by the TLS server when
sessions are enabled (server only).
By default a random value is used.
.Pp
.Fn tls_config_set_session_lifetime
sets the lifetime to be used for TLS sessions (server only).
Session support is disabled if a lifetime of zero is specified, which is the
default.
.Pp
.Fn tls_config_add_ticket_key
adds a key used for the encryption and authentication of TLS tickets
(server only).
By default keys are generated and rotated automatically based on their lifetime.
This function should only be used to synchronise ticket encryption key across
multiple processes.
Re-adding a known key will result in an error, unless it is the most recently
added key.
.Sh RETURN VALUES
These functions return 0 on success or -1 on error.
.Sh SEE ALSO
.Xr tls_accept_socket 3 ,
.Xr tls_config_set_protocols 3 ,
.Xr tls_init 3 ,
.Xr tls_load_file 3 ,
.Xr tls_server 3
.Sh HISTORY
.Fn tls_config_set_session_id ,
.Fn tls_config_set_session_lifetime
and
.Fn tls_config_add_ticket_key
appeared in
.Ox 6.1 .
.Pp
.Fn tls_config_set_session_fd
appeared in
.Ox 6.3 .
.Sh AUTHORS
.An Claudio Jeker Aq Mt claudio@openbsd.org
.An Joel Sing Aq Mt jsing@openbsd.org
ter command on each about-page, both top-level and for each repository (repo.about-filter can be used to override the current about-filter). Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-08-09ui-summary: enable arbitrary paths below repo.readmeLars Hjemli This change makes it possible to include any number of pages below the 'about' tab for a repository. The path is assumed to be located in the same directory as the 'repo.readme' file. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-08-09cgit.c: allow repo.*-filter options to unset the current defaultLars Hjemli If e.g. repo.commit-filter is specified as an empty string, this is now properly handled as disabling the global commit-filter setting for the current repository. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-08-09Add support for repo.commit-filter and repo.source-filterLars Hjemli These options can be used to override the default commit- and source- filter settings per repository. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-08-08Expose file extension in tree lists as class to allow nicer tree stylingMartin Szulecki Signed-off-by: Martin Szulecki <opensuse@sukimashita.com> 2009-08-08Introduce noplainemail option to hide email adresses from spambotsMartin Szulecki Signed-off-by: Martin Szulecki <opensuse@sukimashita.com> 2009-07-31ui-commit: add support for 'commit-filter' optionLars Hjemli This new option specifies a filter which is executed on the commit message, i.e. the commit message is written to the filters STDIN and the filters STDOUT is included verbatim as the commit message. This can be used to implement commit linking by creating a simple shell script in e.g. /usr/bin/cgit-commit-filter.sh like this: #/bin/sh sed -re 's|\b([0-9a-fA-F]{6,40})\b|<a href="./?id=\1">\1</a>|g' Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-31ui-tree: add support for source-filter optionLars Hjemli This new option is used to specify an external command which will be executed when displaying blob content in the tree view. Blob content will be written to STDIN of the filter and STDOUT from the filter will be included verbatim in the html output from cgit. The file name of the blob will be passed as the only argument to the filter command. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-31ui-snapshot: use cgit_{open|close}_filter() to execute compressorsLars Hjemli This simplifies the code in ui-snapshot.c and makes the test-suite verify the new filter-functions. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-31Add generic filter/plugin infrastructureLars Hjemli The functions cgit_open_filter() and cgit_close_filter() can be used to execute filters on the output stream from cgit. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-25Add support for mime type registration and lookupLars Hjemli This patch makes it possible to register mappings from filename extension to mime type in cgitrc and use this mapping when returning blob content in `plain` view. The reason for adding this mapping to cgitrc (as opposed to parsing something like /etc/mime.types) is to allow quick lookup of a limited number of filename extensions (/etc/mime-types on my machine currently contains over 700 entries). NB: A nice addition to this patch would be to parse /etc/mime.types when `plain` view is requested for a file with an extension for which there is no mapping registered in cgitrc. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-25cgit.h: keep config flags sortedLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-25cgitrc.5.txt: document 'embedded' and 'noheader'Lars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-25Add support for 'noheader' optionLars Hjemli This option can be used to disable the standard cgit page header, which might be useful in combination with the 'embedded' option. Suggested-by: Mark Constable <markc@renta.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-25cgitrc.5.txt: document 'head-include'Lars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-25ui-blob: return 'application/octet-stream' for binary blobsLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-07-25ui-plain: Return 'application/octet-stream' for binary files.Remko Tronçon Signed-off-by: Remko Tronçon <git@el-tramo.be> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-06-11use cgit_httpscheme() for atom feedDiego Ongaro 2009-06-11add cgit_httpscheme() -> http:// or https://Diego Ongaro 2009-06-07Return http statuscode 404 on unknown branchLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-06-07Add head-include configuration option.Mark Lodato This patch adds an option to the configuration file, "head-include", which works just like "header" or "footer", except the content is put into the HTML's <head> tag. 2009-03-15CGIT 0.8.2.1Lars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-03-15Fix doc-related glitches in Makefile and .gitignoreLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-03-15ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-03-15fix segfault when displaying empty blobsEric Wong When size is zero, subtracting one from it turns it into ULONG_MAX which causes an out-of-bounds access on buf. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-02-19Add support for HEAD requestsLars Hjemli This is a quick 'n dirty hack which makes cgit honor HEAD requests. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-02-19Add support for ETag in 'plain' viewLars Hjemli When downloading a blob identified by its path, the client might want to know if the blob has been modified since a previous download of the same path. To this end, an ETag containing the blob SHA1 seems to be ideal. Todo: add support for HEAD requests... Suggested-by: Owen Taylor <otaylor@redhat.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-02-12Makefile: add doc-related targetsLars Hjemli