summary refs log tree commit diff
path: root/gfx
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-02-05 12:08:12 -0500
committerJune McEnroe <june@causal.agency>2018-02-05 12:08:12 -0500
commita109086411c8a50ac31aab05c55f1aa6d8f94aa8 (patch)
tree81caa9dc46f3f6e2b9911041c98d4e3256ded130 /gfx
parentRemove gfxx reverse option (diff)
downloadsrc-a109086411c8a50ac31aab05c55f1aa6d8f94aa8.tar.gz
src-a109086411c8a50ac31aab05c55f1aa6d8f94aa8.zip
Add flip option to gfxx
This handles upside-down graphics much better than reverse did.
Diffstat (limited to 'gfx')
0 files changed, 0 insertions, 0 deletions
ef='#n83'>83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
.\" $OpenBSD: tls_config_set_protocols.3,v 1.8 2020/01/22 06:46:34 beck Exp $
.\"
.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
.\" Copyright (c) 2015, 2016 Joel Sing <jsing@openbsd.org>
.\" Copyright (c) 2015 Bob Beck <beck@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: January 22 2020 $
.Dt TLS_CONFIG_SET_PROTOCOLS 3
.Os
.Sh NAME
.Nm tls_config_set_protocols ,
.Nm tls_config_parse_protocols ,
.Nm tls_config_set_alpn ,
.Nm tls_config_set_ciphers ,
.Nm tls_config_set_dheparams ,
.Nm tls_config_set_ecdhecurves ,
.Nm tls_config_prefer_ciphers_client ,
.Nm tls_config_prefer_ciphers_server
.Nd TLS protocol and cipher selection
.Sh SYNOPSIS
.In tls.h
.Ft int
.Fo tls_config_set_protocols
.Fa "struct tls_config *config"
.Fa "uint32_t protocols"
.Fc
.Ft int
.Fo tls_config_parse_protocols
.Fa "uint32_t *protocols"
.Fa "const char *protostr"
.Fc
.Ft int
.Fo tls_config_set_alpn
.Fa "struct tls_config *config"
.Fa "const char *alpn"
.Fc
.Ft int
.Fo tls_config_set_ciphers
.Fa "struct tls_config *config"
.Fa "const char *ciphers"
.Fc
.Ft int
.Fo tls_config_set_dheparams
.Fa "struct tls_config *config"
.Fa "const char *params"
.Fc
.Ft int
.Fo tls_config_set_ecdhecurves
.Fa "struct tls_config *config"
.Fa "const char *curves"
.Fc
.Ft void
.Fn tls_config_prefer_ciphers_client "struct tls_config *config"
.Ft void
.Fn tls_config_prefer_ciphers_server "struct tls_config *config"
.Sh DESCRIPTION
These functions modify a configuration by setting parameters.
The configuration options apply to both clients and servers, unless noted
otherwise.
.Pp
.Fn tls_config_set_protocols
specifies which versions of the TLS protocol may be used.
Possible values are the bitwise OR of:
.Pp
.Bl -tag -width "TLS_PROTOCOL_TLSv1_2" -offset indent -compact
.It Dv TLS_PROTOCOL_TLSv1_0
.It Dv TLS_PROTOCOL_TLSv1_1
.It Dv TLS_PROTOCOL_TLSv1_2
.It Dv TLS_PROTOCOL_TLSv1_3
.El
.Pp
Additionally, the values
.Dv TLS_PROTOCOL_TLSv1
(TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3),
.Dv TLS_PROTOCOLS_ALL
(all supported protocols) and
.Dv TLS_PROTOCOLS_DEFAULT
(TLSv1.2 and TLSv1.3) may be used.
.Pp
The
.Fn tls_config_parse_protocols
utility function parses a protocol string and returns the corresponding
value via the
.Ar protocols
argument.
This value can then be passed to the
.Fn tls_config_set_protocols
function.
The protocol string is a comma or colon separated list of keywords.
Valid keywords are tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3, all (all supported
protocols), default (an alias for secure), legacy (an alias for all) and
secure (currently TLSv1.2 and TLSv1.3).
If a value has a negative prefix (in the form of a leading exclamation mark)
then it is removed from the list of available protocols, rather than being
added to it.
.Pp
.Fn tls_config_set_alpn
sets the ALPN protocols that are supported.
The alpn string is a comma separated list of protocols, in order of preference.
.Pp
.Fn tls_config_set_ciphers
sets the list of ciphers that may be used.
Lists of ciphers are specified by name, and the
permitted names are:
.Pp
.Bl -tag -width "insecure" -offset indent -compact
.It Dv "secure" (or alias "default")
.It Dv "compat"
.It Dv "legacy"
.It Dv "insecure" (or alias "all")
.El
.Pp
Alternatively, libssl cipher strings can be specified.
See the CIPHERS section of
.Xr openssl 1
for further information.
.Pp
.Fn tls_config_set_dheparams
specifies the parameters that will be used during Diffie-Hellman Ephemeral
(DHE) key exchange.
Possible values are "none", "auto" and "legacy".
In "auto" mode, the key size for the ephemeral key is automatically selected
based on the size of the private key being used for signing.
In "legacy" mode, 1024 bit ephemeral keys are used.
The default value is "none", which disables DHE key exchange.
.Pp
.Fn tls_config_set_ecdhecurves
specifies the names of the elliptic curves that may be used during Elliptic
Curve Diffie-Hellman Ephemeral (ECDHE) key exchange.
This is a comma separated list, given in order of preference.
The special value of "default" will use the default curves (currently X25519,
P-256 and P-384).
This function replaces
.Fn tls_config_set_ecdhecurve ,
which is deprecated.
.Pp
.Fn tls_config_prefer_ciphers_client
prefers ciphers in the client's cipher list when selecting a cipher suite
(server only).
This is considered to be less secure than preferring the server's list.
.Pp
.Fn tls_config_prefer_ciphers_server
prefers ciphers in the server's cipher list when selecting a cipher suite
(server only).
This is considered to be more secure than preferring the client's list and is
the default.
.Sh RETURN VALUES
These functions return 0 on success or -1 on error.
.Sh SEE ALSO
.Xr tls_config_ocsp_require_stapling 3 ,
.Xr tls_config_set_session_id 3 ,
.Xr tls_config_verify 3 ,
.Xr tls_init 3 ,
.Xr tls_load_file 3
.Sh HISTORY
.Fn tls_config_set_ciphers
appeared in
.Ox 5.6
and got its final name in
.Ox 5.7 .
.Pp
.Fn tls_config_set_protocols ,
.Fn tls_config_parse_protocols ,
.Fn tls_config_set_dheparams ,
and
.Fn tls_config_set_ecdhecurve
appeared in
.Ox 5.7 ,
.Fn tls_config_prefer_ciphers_client
and
.Fn tls_config_prefer_ciphers_server
in
.Ox 5.9 ,
and
.Fn tls_config_set_alpn
in
.Ox 6.1 .
.Sh AUTHORS
.An Joel Sing Aq Mt jsing@openbsd.org
with contributions from
.An Ted Unangst Aq Mt tedu@openbsd.org
.Pq Fn tls_config_set_ciphers
and
.An Reyk Floeter Aq Mt reyk@openbsd.org
.Pq Fn tls_config_set_ecdhecurve