initial ocspcheck integration

This commit is contained in:
Brent Cook 2017-01-24 06:06:07 -06:00
parent fa149b8c8c
commit 93754dc5cf
6 changed files with 64 additions and 8 deletions

5
.gitignore vendored
View File

@ -117,10 +117,15 @@ include/pqueue.h
include/tls.h
include/openssl/*.h
/apps/ocspcheck/*.h
/apps/ocspcheck/*.c
/apps/ocspcheck/ocspcheck*
/apps/nc/*.h
/apps/nc/*.c
/apps/nc/nc*
!/apps/nc/readpassphrase.c
/apps/openssl/*.h
/apps/openssl/*.c
/apps/openssl/*.cnf

View File

@ -1,5 +1,5 @@
include $(top_srcdir)/Makefile.am.common
SUBDIRS = openssl nc
SUBDIRS = ocspcheck openssl nc
EXTRA_DIST = CMakeLists.txt

View File

@ -0,0 +1,24 @@
include_directories(
.
./compat
../../include
../../include/compat
)
set(
OCSPCHECK_SRC
http.c
ocspcheck.c
)
if(NOT "${OPENSSLDIR}" STREQUAL "")
add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\")
else()
add_definitions(-DDEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
endif()
add_executable(ocspcheck ${OCSPCHECK_SRC})
target_link_libraries(ocspcheck tls ${OPENSSL_LIBS})
install(TARGETS ocspcheck DESTINATION bin)
install(FILES ocspcheck.8 DESTINATION share/man/man8)

View File

@ -0,0 +1,15 @@
include $(top_srcdir)/Makefile.am.common
bin_PROGRAMS = ocspcheck
EXTRA_DIST = ocspcheck.8
EXTRA_DIST += CMakeLists.txt
ocspcheck_LDADD = $(abs_top_builddir)/crypto/libcrypto.la
ocspcheck_LDADD += $(abs_top_builddir)/ssl/libssl.la
ocspcheck_LDADD += $(abs_top_builddir)/tls/libtls.la
ocspcheck_LDADD += $(PLATFORM_LDADD) $(PROG_LDADD)
ocspcheck_SOURCES = http.c
ocspcheck_SOURCES += ocspcheck.c
noinst_HEADERS = http.h

View File

@ -128,6 +128,7 @@ AC_CONFIG_FILES([
tls/Makefile
tests/Makefile
apps/Makefile
apps/ocspcheck/Makefile
apps/openssl/Makefile
apps/nc/Makefile
man/Makefile

View File

@ -26,7 +26,8 @@ libssl_src=$CWD/openbsd/src/lib/libssl
libssl_regress=$CWD/openbsd/src/regress/lib/libssl
libtls_src=$CWD/openbsd/src/lib/libtls
libtls_regress=$CWD/openbsd/src/regress/lib/libtls
app_src=$CWD/openbsd/src/usr.bin
bin_src=$CWD/openbsd/src/usr.bin
sbin_src=$CWD/openbsd/src/usr.sbin
# load library versions
. $libcrypto_src/shlib_version
@ -216,25 +217,35 @@ sed -e "s/compat\///" crypto/Makefile.am.arc4random > \
# copy nc(1) source
echo "copying nc(1) source"
$CP $app_src/nc/nc.1 apps/nc
$CP $bin_src/nc/nc.1 apps/nc
rm -f apps/nc/*.c apps/nc/*.h
$CP_LIBC $libc_src/stdlib/strtonum.c apps/nc/compat
for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/nc/Makefile.am` ; do
if [ -e $app_src/nc/$i ]; then
$CP $app_src/nc/$i apps/nc
if [ -e $bin_src/nc/$i ]; then
$CP $bin_src/nc/$i apps/nc
fi
done
# copy ocspcheck(1) source
echo "copying ocspcheck(1) source"
$CP $sbin_src/ocspcheck/ocspcheck.8 apps/ocspcheck
rm -f apps/ocspcheck/*.c apps/ocspcheck/*.h
for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/ocspcheck/Makefile.am` ; do
if [ -e $sbin_src/ocspcheck/$i ]; then
$CP $sbin_src/ocspcheck/$i apps/ocspcheck
fi
done
# copy openssl(1) source
echo "copying openssl(1) source"
$CP $app_src/openssl/openssl.1 apps/openssl
$CP $bin_src/openssl/openssl.1 apps/openssl
$CP_LIBC $libc_src/stdlib/strtonum.c apps/openssl/compat
$CP $libcrypto_src/cert.pem apps/openssl
$CP $libcrypto_src/openssl.cnf apps/openssl
$CP $libcrypto_src/x509v3.cnf apps/openssl
for i in `awk '/SOURCES|HEADERS|MANS/ { print $3 }' apps/openssl/Makefile.am` ; do
if [ -e $app_src/openssl/$i ]; then
$CP $app_src/openssl/$i apps/openssl
if [ -e $bin_src/openssl/$i ]; then
$CP $bin_src/openssl/$i apps/openssl
fi
done