diff options
author | kn <> | 2021-06-22 17:59:48 +0000 |
---|---|---|
committer | kn <> | 2021-06-22 17:59:48 +0000 |
commit | af1b15e1947248a1eb121aa69aa83eae5a7e8592 (patch) | |
tree | d1d747e3c7141f0b016bb6282e4855cf7fdb7123 | |
parent | 6a02fee4a2d95cb497bd80d5c4e193cf75422cb1 (diff) | |
download | openbsd-af1b15e1947248a1eb121aa69aa83eae5a7e8592.tar.gz openbsd-af1b15e1947248a1eb121aa69aa83eae5a7e8592.tar.bz2 openbsd-af1b15e1947248a1eb121aa69aa83eae5a7e8592.zip |
Clarify tls_config_set_*_file() file I/O semantics
tls_config_set_*_file(3) do not just set the file paths like
tls_config_set_*_path(3) do, they do load the given file(s) into memory
directly using tls_config_load_file().
This distinction is important because it means a later tls_connect(3)
will not do any file I/O (at least wrt. those files), which is relevant when
for example pleding without "[rwc]path" after loading files into memory and
before doing tls_connect(3).
The manual's current wording made me use the following due to above way of
pledging a program:
tls_load_file()
tls_config_set_ca_mem()
tls_unload_file()
While in fact a single tls_config_set_ca_file() call does the same.
tls_config.c r1.26 (Aug 2016) change the code but forgot to amend the manual
as noted by tb, thanks.
Feedback OK tb
-rw-r--r-- | src/lib/libtls/man/tls_load_file.3 | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/lib/libtls/man/tls_load_file.3 b/src/lib/libtls/man/tls_load_file.3 index d836a04723..e6956aeaa1 100644 --- a/src/lib/libtls/man/tls_load_file.3 +++ b/src/lib/libtls/man/tls_load_file.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: tls_load_file.3,v 1.11 2018/11/29 14:24:23 tedu Exp $ | 1 | .\" $OpenBSD: tls_load_file.3,v 1.12 2021/06/22 17:59:48 kn Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> | 3 | .\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> |
4 | .\" Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> | 4 | .\" Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> |
@@ -17,7 +17,7 @@ | |||
17 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 17 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
18 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 18 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
19 | .\" | 19 | .\" |
20 | .Dd $Mdocdate: November 29 2018 $ | 20 | .Dd $Mdocdate: June 22 2021 $ |
21 | .Dt TLS_LOAD_FILE 3 | 21 | .Dt TLS_LOAD_FILE 3 |
22 | .Os | 22 | .Os |
23 | .Sh NAME | 23 | .Sh NAME |
@@ -217,8 +217,7 @@ call, ensuring that the memory contents is discarded. | |||
217 | returns the path of the file that contains the default root certificates. | 217 | returns the path of the file that contains the default root certificates. |
218 | .Pp | 218 | .Pp |
219 | .Fn tls_config_set_ca_file | 219 | .Fn tls_config_set_ca_file |
220 | sets the filename used to load a file | 220 | loads a file containing the root certificates. |
221 | containing the root certificates. | ||
222 | .Pp | 221 | .Pp |
223 | .Fn tls_config_set_ca_path | 222 | .Fn tls_config_set_ca_path |
224 | sets the path (directory) which should be searched for root | 223 | sets the path (directory) which should be searched for root |
@@ -228,41 +227,40 @@ certificates. | |||
228 | sets the root certificates directly from memory. | 227 | sets the root certificates directly from memory. |
229 | .Pp | 228 | .Pp |
230 | .Fn tls_config_set_cert_file | 229 | .Fn tls_config_set_cert_file |
231 | sets file from which the public certificate will be read. | 230 | loads a file containing the public certificate. |
232 | .Pp | 231 | .Pp |
233 | .Fn tls_config_set_cert_mem | 232 | .Fn tls_config_set_cert_mem |
234 | sets the public certificate directly from memory. | 233 | sets the public certificate directly from memory. |
235 | .Pp | 234 | .Pp |
236 | .Fn tls_config_set_crl_file | 235 | .Fn tls_config_set_crl_file |
237 | sets the filename used to load a file containing the | 236 | loads a file containing the Certificate Revocation List (CRL). |
238 | Certificate Revocation List (CRL). | ||
239 | .Pp | 237 | .Pp |
240 | .Fn tls_config_set_crl_mem | 238 | .Fn tls_config_set_crl_mem |
241 | sets the CRL directly from memory. | 239 | sets the CRL directly from memory. |
242 | .Pp | 240 | .Pp |
243 | .Fn tls_config_set_key_file | 241 | .Fn tls_config_set_key_file |
244 | sets the file from which the private key will be read. | 242 | loads a file containing the private key. |
245 | .Pp | 243 | .Pp |
246 | .Fn tls_config_set_key_mem | 244 | .Fn tls_config_set_key_mem |
247 | directly sets the private key from memory. | 245 | directly sets the private key from memory. |
248 | .Pp | 246 | .Pp |
249 | .Fn tls_config_set_ocsp_staple_file | 247 | .Fn tls_config_set_ocsp_staple_file |
250 | sets a DER-encoded OCSP response to be stapled during the TLS handshake from | 248 | loads a file containing a DER-encoded OCSP response to be stapled |
251 | the specified file. | 249 | during the TLS handshake. |
252 | .Pp | 250 | .Pp |
253 | .Fn tls_config_set_ocsp_staple_mem | 251 | .Fn tls_config_set_ocsp_staple_mem |
254 | sets a DER-encoded OCSP response to be stapled during the TLS handshake from | 252 | sets a DER-encoded OCSP response to be stapled during the TLS handshake from |
255 | memory. | 253 | memory. |
256 | .Pp | 254 | .Pp |
257 | .Fn tls_config_set_keypair_file | 255 | .Fn tls_config_set_keypair_file |
258 | sets the files from which the public certificate, and private key will be read. | 256 | loads two files from which the public certificate, and private key will be read. |
259 | .Pp | 257 | .Pp |
260 | .Fn tls_config_set_keypair_mem | 258 | .Fn tls_config_set_keypair_mem |
261 | directly sets the public certificate, and private key from memory. | 259 | directly sets the public certificate, and private key from memory. |
262 | .Pp | 260 | .Pp |
263 | .Fn tls_config_set_keypair_ocsp_file | 261 | .Fn tls_config_set_keypair_ocsp_file |
264 | sets the files from which the public certificate, private key, and DER-encoded | 262 | loads three files containing the public certificate, private key, |
265 | OCSP staple will be read. | 263 | and DER-encoded OCSP staple. |
266 | .Pp | 264 | .Pp |
267 | .Fn tls_config_set_keypair_ocsp_mem | 265 | .Fn tls_config_set_keypair_ocsp_mem |
268 | directly sets the public certificate, private key, and DER-encoded OCSP staple | 266 | directly sets the public certificate, private key, and DER-encoded OCSP staple |