Skip to content

Commit

Permalink
security/openca-ocspd: New port: OpenCA’s OCSP responder
Browse files Browse the repository at this point in the history
 - submitter becomes maintainer

OpenCA OCSP Responder is an rfc2560 compliant OCSPD responder.
The server is a stand-alone application and can be integrated into many
different PKI solutions as it does not depend on specific database scheme.
Furthermore it can be used as a responder for multiple CAs.

WWW: https://www.openca.org/projects/ocspd

PR:		264475
  • Loading branch information
ruomad authored and nunotexbsd committed Jul 21, 2022
1 parent d68ea79 commit e0fac72
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 0 deletions.
1 change: 1 addition & 0 deletions security/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@
SUBDIR += onionscan
SUBDIR += op
SUBDIR += openbsm
SUBDIR += openca-ocspd
SUBDIR += openconnect
SUBDIR += openconnect-freebsd-daemon
SUBDIR += openconnect-gui
Expand Down
52 changes: 52 additions & 0 deletions security/openca-ocspd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
PORTNAME= openca-ocspd
DISTVERSIONPREFIX= v
DISTVERSION= 3.1.3
CATEGORIES= security

MAINTAINER= bruno@ruomad.net
COMMENT= OpenCA OCSP responder

LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/COPYING

NOT_FOR_ARCHS= arm64

LIB_DEPENDS= libpki.so:security/libpki

USES= autoreconf gnome libtool shebangfix ssl
USE_GITHUB= yes
GH_ACCOUNT= openca
USE_GNOME= libxml2
# Add a rc script to start the OCSP daemon
USE_RC_SUBR= ocspd

SHEBANG_FILES= etc/ocspd.in scripts/ocspd-genreq.sh.in

GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-libpki-prefix=${PREFIX}

# Rename installed configuration files to samples
post-stage:
${MKDIR} ${STAGEDIR}${PREFIX}/share/openca-ocspd/etc; \
${MKDIR} ${STAGEDIR}${PREFIX}/share/openca-ocspd/etc/ocspd; \
${MKDIR} ${STAGEDIR}${PREFIX}/share/openca-ocspd/etc/ocspd/ca.d; \
${MKDIR} ${STAGEDIR}${PREFIX}/share/openca-ocspd/etc/ocspd/pki; \
${MKDIR} ${STAGEDIR}${PREFIX}/share/openca-ocspd/etc/ocspd/pki/token.d; \
cd ${STAGEDIR}${PREFIX}/etc/ocspd/pki; \
for f in $$(find * -type f); do \
${MV} ${STAGEDIR}${PREFIX}/etc/ocspd/pki/$$f ${STAGEDIR}${PREFIX}/share/openca-ocspd/etc/ocspd/pki/$$f.sample; \
done; \
cd ${STAGEDIR}${PREFIX}/etc/ocspd/ca.d; \
for f in $$(find * -type f); do \
${MV} ${STAGEDIR}${PREFIX}/etc/ocspd/ca.d/$$f ${STAGEDIR}${PREFIX}/share/openca-ocspd/etc/ocspd/ca.d/$$f.sample; \
done; \
for f in $$(find ${STAGEDIR}${PREFIX}/etc/ocspd -type f); do \
${MV} $$f $$f.sample; \
done; \
${RM} ${STAGEDIR}${PREFIX}/bin/test.sh; \
${RM} ${STAGEDIR}${PREFIX}/etc/init.d/ocspd; \
${RMDIR} ${STAGEDIR}${PREFIX}/etc/init.d
${RMDIR} ${STAGEDIR}${PREFIX}/var/run
${RMDIR} ${STAGEDIR}${PREFIX}/var

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions security/openca-ocspd/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1654414248
SHA256 (openca-openca-ocspd-v3.1.3_GH0.tar.gz) = 59a0054bee22ba72b23263ead6a8458e2086f1996111608a2a2aafbd9e30f591
SIZE (openca-openca-ocspd-v3.1.3_GH0.tar.gz) = 592190
21 changes: 21 additions & 0 deletions security/openca-ocspd/files/ocspd.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

# PROVIDE: ocspd
# REQUIRE: NETWORK

. /etc/rc.subr

name=ocspd
rcvar=ocspd_enable

pidfile="/var/run/${name}.pid"

command="%%PREFIX%%/sbin/ocspd"
command_args="-c %%PREFIX%%/etc/ocspd/ocspd.xml -d -v"

load_rc_config ${name}
: ${ocspd_enable:=no}
: ${ocspd_msg="Nothing started."}


run_rc_command "$1"
6 changes: 6 additions & 0 deletions security/openca-ocspd/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OpenCA OCSP Responder is an rfc2560 compliant OCSPD responder.
The server is a stand-alone application and can be integrated into many
different PKI solutions as it does not depend on specific database scheme.
Furthermore it can be used as a responder for multiple CAs.

WWW: https://www.openca.org/projects/ocspd
18 changes: 18 additions & 0 deletions security/openca-ocspd/pkg-message
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{ type: install
message: <<EOM
Sample Configuration files have been installed in
$PREFIX/share/openca-ocspd/etc, in a hierachy that mimics the one created in
$PREFIX/etc.
They may be used as templates to be copied into the corresponding subdirectory
under $PREFIX/etc and customized according to user context.
EOM
}
{
type: remove
message: <<EOM
User-installed configuration files under $PREFIX/etc/ocspd have been preserved and
must be removed manually if needed, as well as this directory.
EOM
}
]
18 changes: 18 additions & 0 deletions security/openca-ocspd/pkg-plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
bin/ocspd-genreq.sh
@sample etc/ocspd/ocspd.xml.sample
libdata/pkgconfig/openca-ocspd.pc
sbin/ocspd
share/man/man3/ocspd.3.gz
share/man/man3/ocspd.conf.3.gz
%%DATADIR%%/etc/ocspd/pki/token.d/etoken.xml.sample
%%DATADIR%%/etc/ocspd/pki/token.d/software.xml.sample
%%DATADIR%%/etc/ocspd/pki/token.d/eracom.xml.sample
%%DATADIR%%/etc/ocspd/ca.d/collegeca.xml.sample
%%DATADIR%%/etc/ocspd/ca.d/self-certs.xml.sample
@dir etc/ocspd/ca.d
@dir etc/ocspd/certs
@dir etc/ocspd/crls
@dir etc/ocspd/pki/hsm.d
@dir etc/ocspd/pki/profile.d
@dir etc/ocspd/pki/token.d
@dir etc/ocspd/private

0 comments on commit e0fac72

Please sign in to comment.