conditionally build certhash into openssl(1)
For now, look for openat and symlink. We may switch to just needing symlink later.
This commit is contained in:
parent
2286578fd4
commit
28311d4355
1
.gitignore
vendored
1
.gitignore
vendored
@ -111,6 +111,7 @@ apps/openssl
|
|||||||
apps/openssl.cnf
|
apps/openssl.cnf
|
||||||
!apps/apps_win.c
|
!apps/apps_win.c
|
||||||
!apps/poll_win.c
|
!apps/poll_win.c
|
||||||
|
!apps/certhash_disabled.c
|
||||||
|
|
||||||
crypto/compat/arc4random.c
|
crypto/compat/arc4random.c
|
||||||
crypto/compat/chacha_private.h
|
crypto/compat/chacha_private.h
|
||||||
|
@ -10,7 +10,6 @@ openssl_LDADD += $(top_builddir)/crypto/libcrypto.la
|
|||||||
openssl_SOURCES = apps.c
|
openssl_SOURCES = apps.c
|
||||||
openssl_SOURCES += asn1pars.c
|
openssl_SOURCES += asn1pars.c
|
||||||
openssl_SOURCES += ca.c
|
openssl_SOURCES += ca.c
|
||||||
openssl_SOURCES += certhash.c
|
|
||||||
openssl_SOURCES += ciphers.c
|
openssl_SOURCES += ciphers.c
|
||||||
openssl_SOURCES += cms.c
|
openssl_SOURCES += cms.c
|
||||||
openssl_SOURCES += crl.c
|
openssl_SOURCES += crl.c
|
||||||
@ -58,6 +57,12 @@ openssl_SOURCES += verify.c
|
|||||||
openssl_SOURCES += version.c
|
openssl_SOURCES += version.c
|
||||||
openssl_SOURCES += x509.c
|
openssl_SOURCES += x509.c
|
||||||
|
|
||||||
|
if BUILD_CERTHASH
|
||||||
|
openssl_SOURCES += certhash.c
|
||||||
|
else
|
||||||
|
openssl_SOURCES += certhash_disabled.c
|
||||||
|
endif
|
||||||
|
|
||||||
if HOST_WIN
|
if HOST_WIN
|
||||||
openssl_SOURCES += apps_win.c
|
openssl_SOURCES += apps_win.c
|
||||||
else
|
else
|
||||||
|
13
apps/certhash_disabled.c
Normal file
13
apps/certhash_disabled.c
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* Public domain
|
||||||
|
* certhash dummy implementation for platforms without symlinks
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "apps.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
certhash_main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "certhash is not enabled on this platform\n");
|
||||||
|
return (1);
|
||||||
|
}
|
@ -197,6 +197,7 @@ LDFLAGS="$LDFLAGS $CLANG_FLAGS"
|
|||||||
AC_CHECK_FUNCS([arc4random_buf asprintf explicit_bzero funopen getauxval])
|
AC_CHECK_FUNCS([arc4random_buf asprintf explicit_bzero funopen getauxval])
|
||||||
AC_CHECK_FUNCS([getentropy issetugid memmem poll reallocarray])
|
AC_CHECK_FUNCS([getentropy issetugid memmem poll reallocarray])
|
||||||
AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strtonum])
|
AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strtonum])
|
||||||
|
AC_CHECK_FUNCS([symlink openat])
|
||||||
AC_CHECK_FUNCS([timingsafe_bcmp timingsafe_memcmp])
|
AC_CHECK_FUNCS([timingsafe_bcmp timingsafe_memcmp])
|
||||||
|
|
||||||
# Share test results with automake
|
# Share test results with automake
|
||||||
@ -215,6 +216,7 @@ AM_CONDITIONAL([HAVE_STRNLEN], [test "x$ac_cv_func_strnlen" = xyes])
|
|||||||
AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes])
|
AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes])
|
||||||
AM_CONDITIONAL([HAVE_TIMINGSAFE_BCMP], [test "x$ac_cv_func_timingsafe_bcmp" = xyes])
|
AM_CONDITIONAL([HAVE_TIMINGSAFE_BCMP], [test "x$ac_cv_func_timingsafe_bcmp" = xyes])
|
||||||
AM_CONDITIONAL([HAVE_TIMINGSAFE_MEMCMP], [test "x$ac_cv_func_timingsafe_memcmp" = xyes])
|
AM_CONDITIONAL([HAVE_TIMINGSAFE_MEMCMP], [test "x$ac_cv_func_timingsafe_memcmp" = xyes])
|
||||||
|
AM_CONDITIONAL([BUILD_CERTHASH], [test "x$ac_cv_func_symlink" = xyes -a "x$ac_cv_func_openat" = xyes])
|
||||||
|
|
||||||
# overrides for arc4random_buf implementations with known issues
|
# overrides for arc4random_buf implementations with known issues
|
||||||
AM_CONDITIONAL([HAVE_ARC4RANDOM_BUF],
|
AM_CONDITIONAL([HAVE_ARC4RANDOM_BUF],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user