Print this page
9156 Remove openssl dependency from pkcs11_tpm

@@ -19,13 +19,26 @@
 # CDDL HEADER END
 #
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2018 Jason King
+#
 LIBRARY =       pkcs11_tpm.a
 VERS =          .1
 
+RSA_DIR =               $(SRC)/common/crypto/rsa
+RSA_FLAGS =             -I$(RSA_DIR)
+
+BIGNUM_DIR =            $(SRC)/common/bignum
+BIGNUM_FLAGS =          -I$(BIGNUM_DIR)
+
+PADDING_DIR =           $(SRC)/common/crypto/padding
+PADDING_FLAGS =         -I$(PADDING_DIR)
+
+SOFTCRYPTOFLAGS =       $(RSA_FLAGS) $(PADDING_FLAGS) $(BIGNUM_FLAGS)
+
 OBJECTS= api_interface.o \
         apiutil.o \
         asn1.o \
         cert.o \
         data_obj.o \

@@ -71,12 +84,12 @@
 TSPIINCDIR=$(TSSROOT)/usr/include
 TSSLIB=-L$(TSPILIBDIR)
 TSSLIB64=-L$(TSPILIBDIR)/$(MACH64)
 TSSINC=-I$(TSPIINCDIR)
 
-LDLIBS += $(TSSLIB) -L$(ADJUNCT_PROTO)/lib -lc -luuid -lmd -ltspi -lcrypto
-CPPFLAGS += -xCC -D_POSIX_PTHREAD_SEMANTICS $(TSSINC)
+LDLIBS += $(TSSLIB) -L$(ADJUNCT_PROTO)/lib -lc -luuid -lmd -ltspi -lsoftcrypto
+CPPFLAGS += -xCC -D_POSIX_PTHREAD_SEMANTICS $(TSSINC) $(SOFTCRYPTOFLAGS)
 CPPFLAGS64 += $(CPPFLAGS)
 CSTD=        $(CSTD_GNU99)
 
 CERRWARN +=     -_gcc=-Wno-parentheses
 CERRWARN +=     -_gcc=-Wno-unused-label