xref: /freebsd/usr.sbin/certctl/certctl.8 (revision ed549cb0c53f8438c52593ce811f6fcc812248e9)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3.\"
4.\" Copyright 2018 Allan Jude <allanjude@freebsd.org>
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted providing that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25.\" POSSIBILITY OF SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
28.\"
29.Dd July 13, 2022
30.Dt CERTCTL 8
31.Os
32.Sh NAME
33.Nm certctl
34.Nd "tool for managing trusted and untrusted TLS certificates"
35.Sh SYNOPSIS
36.Nm
37.Op Fl v
38.Ic list
39.Nm
40.Op Fl v
41.Ic untrusted
42.Nm
43.Op Fl nUv
44.Op Fl D Ar destdir
45.Op Fl M Ar metalog
46.Ic rehash
47.Nm
48.Op Fl nv
49.Ic untrust Ar file
50.Nm
51.Op Fl nv
52.Ic trust Ar file
53.Sh DESCRIPTION
54The
55.Nm
56utility manages the list of TLS Certificate Authorities that are trusted by
57applications that use OpenSSL.
58.Pp
59Flags:
60.Bl -tag -width 4n
61.It Fl D Ar destdir
62Specify the DESTDIR (overriding values from the environment).
63.It Fl d Ar distbase
64Specify the DISTBASE (overriding values from the environment).
65.It Fl M Ar metalog
66Specify the path of the METALOG file (default: $DESTDIR/METALOG).
67.It Fl n
68No-Op mode, do not actually perform any actions.
69.It Fl v
70Be verbose, print details about actions before performing them.
71.It Fl U
72Unprivileged mode, do not change the ownership of created links.
73Do record the ownership in the METALOG file.
74.El
75.Pp
76Primary command functions:
77.Bl -tag -width untrusted
78.It Ic list
79List all currently trusted certificate authorities.
80.It Ic untrusted
81List all currently untrusted certificates.
82.It Ic rehash
83Rebuild the list of trusted certificate authorities by scanning all directories
84in
85.Ev TRUSTPATH
86and all untrusted certificates in
87.Ev UNTRUSTPATH .
88A symbolic link to each trusted certificate is placed in
89.Ev CERTDESTDIR
90and each untrusted certificate in
91.Ev UNTRUSTDESTDIR .
92.It Ic untrust
93Add the specified file to the untrusted list.
94.It Ic trust
95Remove the specified file from the untrusted list.
96.El
97.Sh ENVIRONMENT
98.Bl -tag -width UNTRUSTDESTDIR
99.It Ev DESTDIR
100Alternate destination directory to operate on.
101.It Ev DISTBASE
102Additional path component to include when operating on certificate directories.
103.It Ev TRUSTPATH
104List of paths to search for trusted certificates.
105Default:
106.Pa <DESTDIR><DISTBASE>/usr/share/certs/trusted
107.Pa <DESTDIR><DISTBASE>/usr/local/share/certs
108.Pa <DESTDIR><DISTBASE>/usr/local/etc/ssl/certs
109.It Ev UNTRUSTPATH
110List of paths to search for untrusted certificates.
111Default:
112.Pa <DESTDIR><DISTBASE>/usr/share/certs/untrusted
113.Pa <DESTDIR><DISTBASE>/usr/local/etc/ssl/untrusted
114.Pa <DESTDIR><DISTBASE>/usr/local/etc/ssl/blacklisted
115.It Ev CERTDESTDIR
116Destination directory for symbolic links to trusted certificates.
117Default:
118.Pa <DESTDIR><DISTBASE>/etc/ssl/certs
119.It Ev UNTRUSTDESTDIR
120Destination directory for symbolic links to untrusted certificates.
121Default:
122.Pa <DESTDIR><DISTBASE>/etc/ssl/untrusted
123.It Ev EXTENSIONS
124List of file extensions to read as certificate files.
125Default: *.pem *.crt *.cer *.crl *.0
126.El
127.Sh SEE ALSO
128.Xr openssl 1
129.Sh HISTORY
130.Nm
131first appeared in
132.Fx 12.2
133.Sh AUTHORS
134.An Allan Jude Aq Mt allanjude@freebsd.org
135