BSD Ports

security/p5-openxpki-clca 1.23 FreeBSD

Toolkit for basic PKI operations in small CA like root CA

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Last update
Commit
d223704ee8
License
GPLv2
Categories
security, perl5
Package size
41.2 KiB, 181.7 KiB installed

Description

Command Line Certificate Authority (clca) is a collection of tools (written in Bash and Perl atop of OpenSSL or LibreSSL) that allow for basic PKI operations such as Sub CA certificate issuance (signing certificate requests), certificate revocation and CRL issuance. Originally designed to be used for a Root CA, it may also be used for lower level CAs or even end entity certificates as well.

Ideal solution for off-line low-traffic CA, residing on a notebook, which is most of the time kept in a vault.

CA private keys can be held either in encrypted files (encrypted either with a simple passphrase or using Shamir's Secret Sharing) or stored in an HSM.

Port security/p5-openxpki-clca is an overly lightweight command-line alternative to its elder brother, a full-featured server-born port security/p5-openxpki designed for universal PKI solutions. These two ports are mutually independent and can coexist on the same host.

In the other systems

SystemPortVersion
FreeBSDsecurity/p5-openxpki-clca1.23
HardenedBSDsecurity/p5-openxpki-clca1.22
GhostBSDsecurity/p5-openxpki-clca1.22

Install

Binary package:

pkg install p5-openxpki-clca

From the ports tree:

cd /usr/ports/security/p5-openxpki-clca/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-openxpki-clca>0:security/p5-openxpki-clca

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest1.231.23--1.23
FreeBSD:14:quarterly1.221.22n/a-1.22
FreeBSD:15:latest1.231.23n/a--
FreeBSD:15:quarterly1.221.22n/an/an/a
FreeBSD:16:latest1.221.23n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

The Makefile names none itself; they come from USES and USE_*.

The full lists below include those, and their dependencies in turn.

Build dependencies 9
Run dependencies 9

No port depends on this one.

Configuration

Options name: security_openxpki-clca

OptionDefaultDescription
DOCSoffBuild and/or install documentation
USES
perl5 shebangfix ssl
Service scripts
none

Message after installing

- Create root directory for your root certificate authority (CA),
    e.g. "/ca_home":
    mkdir -p /ca_home/private
- Publish it in your environment as CA_HOME (this name is fixed):
    e.g. export CA_HOME=/ca_home
- Populate it as:
    cp -pR /usr/local/share/examples/openxpki-clca/ /ca_home
    cp -pR /usr/local/share/doc/openxpki-clca/ /ca_home
- Follow advice at:
    /ca_home/*.md (patched for FreeBSD) or
    https://github.com/openxpki/clca (for original Debian Linux)
- Revise your configuration in 
    /ca_home/etc/*
    /ca_home/bin/*
- Run main interactive Bash script of this port as follows:
    cd /ca_home
    bin/clca
- This port/package installs some scripts into /usr/local/bin:
    clca, change-quorum.sh, provision,secret
    Sometime it is convenient to run them from your root ca directory /ca_home,
    as they are in your PATH. But beware of confusing them with scripts, which
    are located in /ca_home/bin/*.
- Use of OpenSSL or LibreSSL
  = This package comes (from FreeBSD build cluster) bound with 
  openssl from base system, cf: /usr/ports/Mk/Uses/ssl.mk
  If you want to use openssl or libressl from ports instead, then:
    1) add the name of respective port 
       (openssl, openssl30, openssl31, libressl, libressl-devel...)
       to /etc/make.conf file e.g. like this:
       DEFAULT_VERSIONS+= ssl=openssl31
    2) install security/openssl31
    3) cd /usr/ports/security/p5-openxpki-clca && make reinstall
       you do not need to rebuild dependencies, installed from packages.
    4) repeat steps above for re-population of root directory and revising
        configuration.
	5) If your system has more that one installation of openssl/libressl, you
		may want to create a symlink (early in the path) to your preferred
		openssl binary. Check your working copy of openssl with:
			which openssl
			openssl version
	6) Revise again your configuration in 
		/ca_home/etc/*
		/ca_home/bin/*
  = Using versions OpenSSL 1.0 or less can restrict features of this port.
  = This port builds just fine with any available versions of OpenSSL or 
    LibreSSL. But its operation with LibreSSL or OpenSSL 3.1+ has not been fully
	tested. Report your respective story to the list
      https://sourceforge.net/p/openxpki/mailman/
    or use OpenSSL 3.0 instead.
- If you choose to create (as docs advice) a new optional perl script in
  the /ca_home/bin directory, you may want to employ a construct like
    use FindBin;
    use lib "$FindBin::Bin/../lib";
  inside your script, so that perl modules from /ca_home/lib directory
  become available to your script if you need them to be.
- Note, that this software is optimized for use from autonomous device, when
  /ca_home directory is located on USB drive, which is extracted from computer
  after  work to be kept inside a steel vault.

If you update existing installation, repeat steps for re-population of root
directory and revising configuration. And please check if extra handwork 
is needed in your case:
    https://github.com/openxpki/clca

Files

pkg-plist 17
  • bin/change-quorum.sh
  • bin/clca
  • share/doc/p5-openxpki-clca/README.md
  • share/examples/p5-openxpki-clca/bin/change-quorum.sh
  • share/examples/p5-openxpki-clca/bin/clca
  • share/examples/p5-openxpki-clca/bin/provision
  • share/examples/p5-openxpki-clca/bin/secret
  • share/examples/p5-openxpki-clca/etc/clca.cfg
  • share/examples/p5-openxpki-clca/etc/openssl.cnf
  • share/examples/p5-openxpki-clca/lib/OpenXPKI/Crypto/Secret.pm
  • share/examples/p5-openxpki-clca/lib/OpenXPKI/Crypto/Secret/Plain.pm
  • share/examples/p5-openxpki-clca/lib/OpenXPKI/Crypto/Secret/Split.pm
  • share/examples/p5-openxpki-clca/lib/OpenXPKI/Debug.pm
  • share/examples/p5-openxpki-clca/lib/OpenXPKI/Exception.pm
  • share/examples/p5-openxpki-clca/lib/OpenXPKI/Serialization/Simple.pm
  • share/examples/p5-openxpki-clca/lib/OpenXPKI/Server/Context.pm
  • share/examples/p5-openxpki-clca/lib/OpenXPKI/VERSION.pm
distinfo 1
FileSizeSHA256
openxpki-clca-v1.23_GH0.tar.gz485722f38f646d0b631d7be424c72d51c213523a98884aeb0e6a91a22a6e72a8b0256

Commit history 2

DateCommitCreditsLog message
d223704ee8 Sergei Vyshenski security/p5-openxpki-clca: Update 1.22 => 1.23
While here, use BUILD_RUN_DEPENDS in favor of MY_DEPENDS. Commit log: https://github.com/openxpki/clca/compare/v1.22...v1.23 PR: 299270 Approved by: osa, vvd (Mentors, implicit)
f6b414f66c Sergei Vyshenski security/p5-openxpki-clca: Update 1.21 => 1.22
Commit log: https://github.com/openxpki/clca/compare/v1.21...v1.22 PR: 296854 Sponsored by: UNIS Labs