aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2015-02-14 18:51:44 -0600
committerBrent Cook <bcook@openbsd.org>2015-02-14 18:54:43 -0600
commit28311d4355e38376dc7ebcf1d2d7957718f55359 (patch)
treeac6dd78bba77be68c50a9070a7876bdece1443a4 /apps
parent2286578fd4e93e024ac33a0fd8f89dc936ad95a8 (diff)
downloadportable-28311d4355e38376dc7ebcf1d2d7957718f55359.tar.gz
portable-28311d4355e38376dc7ebcf1d2d7957718f55359.tar.bz2
portable-28311d4355e38376dc7ebcf1d2d7957718f55359.zip
conditionally build certhash into openssl(1)
For now, look for openat and symlink. We may switch to just needing symlink later.
Diffstat (limited to 'apps')
-rw-r--r--apps/Makefile.am7
-rw-r--r--apps/certhash_disabled.c13
2 files changed, 19 insertions, 1 deletions
diff --git a/apps/Makefile.am b/apps/Makefile.am
index f752ca6..30978c1 100644
--- a/apps/Makefile.am
+++ b/apps/Makefile.am
@@ -10,7 +10,6 @@ openssl_LDADD += $(top_builddir)/crypto/libcrypto.la
10openssl_SOURCES = apps.c 10openssl_SOURCES = apps.c
11openssl_SOURCES += asn1pars.c 11openssl_SOURCES += asn1pars.c
12openssl_SOURCES += ca.c 12openssl_SOURCES += ca.c
13openssl_SOURCES += certhash.c
14openssl_SOURCES += ciphers.c 13openssl_SOURCES += ciphers.c
15openssl_SOURCES += cms.c 14openssl_SOURCES += cms.c
16openssl_SOURCES += crl.c 15openssl_SOURCES += crl.c
@@ -58,6 +57,12 @@ openssl_SOURCES += verify.c
58openssl_SOURCES += version.c 57openssl_SOURCES += version.c
59openssl_SOURCES += x509.c 58openssl_SOURCES += x509.c
60 59
60if BUILD_CERTHASH
61openssl_SOURCES += certhash.c
62else
63openssl_SOURCES += certhash_disabled.c
64endif
65
61if HOST_WIN 66if HOST_WIN
62openssl_SOURCES += apps_win.c 67openssl_SOURCES += apps_win.c
63else 68else
diff --git a/apps/certhash_disabled.c b/apps/certhash_disabled.c
new file mode 100644
index 0000000..8238ff7
--- /dev/null
+++ b/apps/certhash_disabled.c
@@ -0,0 +1,13 @@
1/*
2 * Public domain
3 * certhash dummy implementation for platforms without symlinks
4 */
5
6#include "apps.h"
7
8int
9certhash_main(int argc, char **argv)
10{
11 fprintf(stderr, "certhash is not enabled on this platform\n");
12 return (1);
13}