Files
heimdal/lib/otp/Makefile.am
Nicolas Williams 490337f4f9 Make OpenSSL an hcrypto backend proper
This adds a new backend for libhcrypto: the OpenSSL backend.

Now libhcrypto has these backends:

 - hcrypto itself (i.e., the algorithms coded in lib/hcrypto)
 - Common Crypto (OS X)
 - PKCS#11 (specifically for Solaris, but not Solaris-specific)
 - Windows CNG (Windows)
 - OpenSSL (generic)

The ./configure --with-openssl=... option no longer disables the use of
hcrypto.  Instead it enables the use of OpenSSL as a (and the default)
backend in libhcrypto.  The libhcrypto framework is now always used.

OpenSSL should no longer be used directly within Heimdal, except in the
OpenSSL hcrypto backend itself, and files where elliptic curve (EC)
crypto is needed.

Because libhcrypto's EC support is incomplete, we can only use OpenSSL
for EC.  Currently that means separating all EC-using code so that it
does not use hcrypto, thus the libhx509/hxtool and PKINIT EC code has
been moved out of the files it used to be in.
2016-04-15 00:16:17 -05:00

91 lines
1.7 KiB
Makefile

# $Id$
include $(top_srcdir)/Makefile.am.common
AM_CPPFLAGS += $(ROKEN_RENAME)
if HAVE_DBHEADER
AM_CPPFLAGS += -I$(DBHEADER)
endif
noinst_PROGRAMS = otptest
check_PROGRAMS = otptest
otptest_LDADD = libotp.la
include_HEADERS = otp.h
lib_LTLIBRARIES = libotp.la
libotp_la_LDFLAGS = -version-info 1:5:1
libotp_la_LIBADD = $(LIB_hcrypto) $(LIB_roken)
if HAVE_DB1
ndbm_wrap = ndbm_wrap.c ndbm_wrap.h
libotp_la_LIBADD += $(DB1LIB)
else
if HAVE_DB3
ndbm_wrap = ndbm_wrap.c ndbm_wrap.h
libotp_la_LIBADD += $(DB3LIB)
else
ndbm_wrap =
libotp_la_LIBADD += $(NDBMLIB)
endif
endif
dist_libotp_la_SOURCES = \
otp.c \
otp_challenge.c \
otp_db.c \
otp_md.c \
otp_parse.c \
otp_print.c \
otp_verify.c \
otp_locl.h \
otp_md.h \
roken_rename.h
nodist_libotp_la_SOURCES = $(ndbm_wrap) $(ROKEN_SRCS)
libotp_la_DEPENDENCIES = version-script.map
if do_roken_rename
ROKEN_SRCS = snprintf.c strcasecmp.c strncasecmp.c strlwr.c strlcpy.c strlcat.c
endif
if versionscript
libotp_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
endif
$(libotp_la_OBJECTS): $(ndbm_wrap)
ndbm_wrap.c:
$(LN_S) $(srcdir)/../roken/ndbm_wrap.c .
ndbm_wrap.h:
(echo '#define dbm_rename(X) __otp_ ## X'; cat $(srcdir)/../roken/ndbm_wrap.h) > ndbm_wrap.h
snprintf.c:
$(LN_S) $(srcdir)/../roken/snprintf.c .
strcasecmp.c:
$(LN_S) $(srcdir)/../roken/strcasecmp.c .
strncasecmp.c:
$(LN_S) $(srcdir)/../roken/strncasecmp.c .
strlwr.c:
$(LN_S) $(srcdir)/../roken/strlwr.c .
strlcpy.c:
$(LN_S) $(srcdir)/../roken/strlcpy.c .
strlcat.c:
$(LN_S) $(srcdir)/../roken/strlcat.c .
CLEANFILES = \
ndbm_wrap.c \
ndbm_wrap.h \
snprintf.c \
strcasecmp.c \
strlcat.c \
strlcpy.c \
strlwr.c \
strncasecmp.c
EXTRA_DIST = NTMakefile version-script.map