-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcertctl.8
157 lines (157 loc) · 4.87 KB
/
certctl.8
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
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
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright 2018 Allan Jude <[email protected]>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted providing that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd February 25, 2025
.Dt CERTCTL 8
.Os
.Sh NAME
.Nm certctl
.Nd "tool for managing trusted and untrusted TLS certificates"
.Sh SYNOPSIS
.Nm
.Op Fl v
.Ic list
.Nm
.Op Fl v
.Ic untrusted
.Nm
.Op Fl bBnUv
.Op Fl D Ar destdir
.Op Fl M Ar metalog
.Ic rehash
.Nm
.Op Fl nv
.Ic untrust Ar file
.Nm
.Op Fl nv
.Ic trust Ar file
.Sh DESCRIPTION
The
.Nm
utility manages the list of TLS Certificate Authorities that are trusted by
applications that use OpenSSL.
.Pp
Flags:
.Bl -tag -width 4n
.It Fl b
Create the CERTDESTFILE bundle file and CERTDESTFILELINKS symlinks to it, in addition to CERTDESTDIR.
Bundle files are unnecessary under normal circumstances.
You should
.Em not
use this option unless you are certain you need to generate certificate bundles.
.It Fl B
Remove CERTDESTFILE and CERTDESTFILELINKS.
.It Fl D Ar destdir
Specify the DESTDIR (overriding values from the environment).
.It Fl d Ar distbase
Specify the DISTBASE (overriding values from the environment).
.It Fl M Ar metalog
Specify the path of the METALOG file (default: $DESTDIR/METALOG).
.It Fl n
No-Op mode, do not actually perform any actions.
.It Fl v
Be verbose, print details about actions before performing them.
.It Fl U
Unprivileged mode, do not change the ownership of created links.
Do record the ownership in the METALOG file.
.El
.Pp
Primary command functions:
.Bl -tag -width untrusted
.It Ic list
List all currently trusted certificate authorities.
.It Ic untrusted
List all currently untrusted certificates.
.It Ic rehash
Rebuild the list of trusted certificate authorities by scanning all directories
in
.Ev TRUSTPATH
and all untrusted certificates in
.Ev UNTRUSTPATH .
A symbolic link to each trusted certificate is placed in
.Ev CERTDESTDIR
and each untrusted certificate in
.Ev UNTRUSTDESTDIR .
If it exists, rebuild
.Ev CERTDESTFILE
from the contents of
.Ev CERTDESTDIR .
.It Ic untrust
Add the specified file to the untrusted list.
.It Ic trust
Remove the specified file from the untrusted list.
.El
.Sh ENVIRONMENT
.Bl -tag -width UNTRUSTDESTDIR
.It Ev DESTDIR
Alternate destination directory to operate on.
.It Ev DISTBASE
Additional path component to include when operating on certificate directories.
.It Ev LOCALBASE
Location for local programs.
Defaults to the value of the user.localbase sysctl which is usually
.Pa /usr/local .
.It Ev TRUSTPATH
List of paths to search for trusted certificates.
Default:
.Pa <DESTDIR><DISTBASE>/usr/share/certs/trusted
.Pa <DESTDIR><DISTBASE>/usr/local/share/certs
.Pa <DESTDIR><DISTBASE><LOCALBASE>/etc/ssl/certs
.It Ev UNTRUSTPATH
List of paths to search for untrusted certificates.
Default:
.Pa <DESTDIR><DISTBASE>/usr/share/certs/untrusted
.Pa <DESTDIR><DISTBASE><LOCALBASE>/etc/ssl/untrusted
.Pa <DESTDIR><DISTBASE><LOCALBASE>/etc/ssl/blacklisted
.It Ev CERTDESTDIR
Destination directory for symbolic links to trusted certificates.
Default:
.Pa <DESTDIR><DISTBASE>/etc/ssl/certs
.It Ev CERTDESTFILE
Location of the certificate bundle file.
Default:
.Pa <DESTDIR><DISTBASE>/etc/ssl/cert.pem
.It Ev CERTDESTFILELINKS
List of symbolic links to create that will point to CERTDESTFILE.
Default:
.Pa <DESTDIR><DISTBASE><LOCALBASE>/etc/ssl/cert.pem
.Pa <DESTDIR><DISTBASE><LOCALBASE>/openssl/cert.pem
.It Ev UNTRUSTDESTDIR
Destination directory for symbolic links to untrusted certificates.
Default:
.Pa <DESTDIR><DISTBASE>/etc/ssl/untrusted
.It Ev EXTENSIONS
List of file extensions to read as certificate files.
Default: *.pem *.crt *.cer *.crl *.0
.El
.Sh SEE ALSO
.Xr openssl 1
.Sh HISTORY
.Nm
first appeared in
.Fx 12.2
.Sh AUTHORS
.An Allan Jude Aq Mt [email protected]