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 May 30, 2020 30.Dt CERTCTL 8 31.Os 32.Sh NAME 33.Nm certctl 34.Nd "tool for managing trusted and blacklist TLS certificates" 35.Sh SYNOPSIS 36.Nm 37.Op Fl v 38.Ic list 39.Nm 40.Op Fl v 41.Ic blacklisted 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 blacklist Ar file 50.Nm 51.Op Fl nv 52.Ic unblacklist 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 M Ar metalog 64Specify the path of the METALOG file (default: $DESTDIR/METALOG). 65.It Fl n 66No-Op mode, do not actually perform any actions. 67.It Fl v 68be verbose, print details about actions before performing them. 69.It Fl U 70Unprivileged mode, do not change the ownership of created links. 71Do record the ownership in the METALOG file. 72.El 73.Pp 74Primary command functions: 75.Bl -tag -width blacklisted 76.It Ic list 77List all currently trusted certificate authorities. 78.It Ic blacklisted 79List all currently blacklisted certificates. 80.It Ic rehash 81Rebuild the list of trusted certificate authorities by scanning all directories 82in 83.Ev TRUSTPATH 84and all blacklisted certificates in 85.Ev BLACKLISTPATH . 86A symbolic link to each trusted certificate is placed in 87.Ev CERTDESTDIR 88and each blacklisted certificate in 89.Ev BLACKLISTDESTDIR . 90.It Ic blacklist 91Add the specified file to the blacklist. 92.It Ic unblacklist 93Remove the specified file from the blacklist. 94.El 95.Sh ENVIRONMENT 96.Bl -tag -width BLACKLISTDESTDIR 97.It Ev DESTDIR 98Alternate destination directory to operate on. 99.It Ev TRUSTPATH 100List of paths to search for trusted certificates. 101Default: 102.Pa <DESTDIR>/usr/share/certs/trusted 103.Pa <DESTDIR>/usr/local/share/certs <DESTDIR>/usr/local/etc/ssl/certs 104.It Ev BLACKLISTPATH 105List of paths to search for blacklisted certificates. 106Default: 107.Pa <DESTDIR>/usr/share/certs/blacklisted 108.Pa <DESTDIR>/usr/local/etc/ssl/blacklisted 109.It Ev CERTDESTDIR 110Destination directory for symbolic links to trusted certificates. 111Default: 112.Pa <DESTDIR>/etc/ssl/certs 113.It Ev BLACKLISTDESTDIR 114Destination directory for symbolic links to blacklisted certificates. 115Default: 116.Pa <DESTDIR>/etc/ssl/blacklisted 117.It Ev EXTENSIONS 118List of file extensions to read as certificate files. 119Default: *.pem *.crt *.cer *.crl *.0 120.El 121.Sh SEE ALSO 122.Xr openssl 1 123.Sh HISTORY 124.Nm 125first appeared in 126.Fx 12.2 127.Sh AUTHORS 128.An Allan Jude Aq Mt allanjude@freebsd.org 129