From: Greg Hudson Date: Wed, 16 May 2018 17:17:34 +0000 (-0700) Subject: Build and install SPAKE module for Windows X-Git-Tag: krb5-1.17-beta1~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7692be7ccc3c5c993fdb43a11f51580cb56f7b5b;p=thirdparty%2Fkrb5.git Build and install SPAKE module for Windows For now only the edwards25519 group is supported, since we are not adding an OpenSSL dependency. ticket: 8657 --- diff --git a/src/Makefile.in b/src/Makefile.in index bd7a2dc2a4..fee0ea75ea 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -31,7 +31,7 @@ SUBDIRS=util include lib \ plugins/tls/k5tls \ kdc kadmin slave clients appl tests \ config-files build-tools man doc @po@ -WINSUBDIRS=include util lib ccapi windows clients appl +WINSUBDIRS=include util lib ccapi windows clients appl plugins\preauth\spake BUILDTOP=$(REL). SRCS = @@ -153,7 +153,8 @@ WINMAKEFILES=Makefile \ util\wshelper\Makefile \ windows\Makefile windows\lib\Makefile windows\ms2mit\Makefile \ windows\kfwlogon\Makefile windows\leashdll\Makefile \ - windows\leash\Makefile windows\leash\htmlhelp\Makefile + windows\leash\Makefile windows\leash\htmlhelp\Makefile \ + plugins\preauth\spake\Makefile ##DOS##Makefile-windows: $(MKFDEP) $(WINMAKEFILES) @@ -279,6 +280,8 @@ WINMAKEFILES=Makefile \ ##DOS## $(WCONFIG) config < $@.in > $@ ##DOS##windows\leash\htmlhelp\Makefile: windows\leash\htmlhelp\Makefile.in $(MKFDEP) ##DOS## $(WCONFIG) config < $@.in > $@ +##DOS##plugins\preauth\spake\Makefile: plugins\preauth\spake\Makefile.in $(MKFDEP) +##DOS## $(WCONFIG) config < $@.in > $@ clean-windows:: Makefile-windows @@ -430,6 +433,8 @@ install-windows: @if not exist "$(KRB_INSTALL_DIR)\include\gssapi\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include\gssapi" @if not exist "$(KRB_INSTALL_DIR)\lib\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\lib" @if not exist "$(KRB_INSTALL_DIR)\bin\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\bin" + @if not exist "$(KRB_INSTALL_DIR)\bin\plugins\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\bin\plugins" + @if not exist "$(KRB_INSTALL_DIR)\bin\plugins\preauth\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\bin\plugins\preauth" copy include\krb5.h "$(KRB_INSTALL_DIR)\include\." copy include\krb5\krb5.h "$(KRB_INSTALL_DIR)\include\krb5\." copy include\win-mac.h "$(KRB_INSTALL_DIR)\include\." @@ -485,6 +490,8 @@ install-windows: $(INSTALLDBGSYMS) clients\kdeltkt\$(OUTPRE)kdeltkt.pdb "$(KRB_INSTALL_DIR)\bin\." $(INSTALLDBGSYMS) clients\kpasswd\$(OUTPRE)kpasswd.pdb "$(KRB_INSTALL_DIR)\bin\." $(INSTALLDBGSYMS) clients\kswitch\$(OUTPRE)kswitch.pdb "$(KRB_INSTALL_DIR)\bin\." + copy plugins\preauth\spake\$(OUTPRE)$(SPAKELIB).dll "$(KRB_INSTALL_DIR)\bin\plugins\preauth\." + $(INSTALLDBGSYMS) plugins\preauth\spake\$(OUTPRE)$(SPAKELIB).pdb "$(KRB_INSTALL_DIR)\bin\plugins\preauth\." check-prerecurse: runenv.py $(RM) $(SKIPTESTS) diff --git a/src/config/win-pre.in b/src/config/win-pre.in index 52152c397c..8190415897 100644 --- a/src/config/win-pre.in +++ b/src/config/win-pre.in @@ -201,6 +201,7 @@ SLIB=$(BUILDTOP)\lib\$(OUTPRE)k5sprt32.lib GLIB=$(BUILDTOP)\lib\$(OUTPRE)gssapi32.lib DLIB=wshelp32 CCLIB=krbcc32 +SPAKELIB=spake32 WLIB= !if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) @@ -212,6 +213,7 @@ SLIB=$(BUILDTOP)\lib\$(OUTPRE)k5sprt64.lib GLIB=$(BUILDTOP)\lib\$(OUTPRE)gssapi64.lib DLIB=wshelp64 CCLIB=krbcc64 +SPAKELIB=spake64 WLIB= !endif diff --git a/src/lib/krb5_32.def b/src/lib/krb5_32.def index f7b428e169..7dee65da6c 100644 --- a/src/lib/krb5_32.def +++ b/src/lib/krb5_32.def @@ -473,3 +473,14 @@ EXPORTS ; new in 1.16 k5_enctype_to_ssf @438 ; PRIVATE GSSAPI + +; new in 1.17 +; private symbols used by SPAKE client module + profile_get_string @439 ; PRIVATE + profile_release_string @440 ; PRIVATE + k5_sha256 @441 ; PRIVATE + krb5_encrypt_helper @442 ; PRIVATE + encode_krb5_spake_factor @443 ; PRIVATE + encode_krb5_pa_spake @444 ; PRIVATE + decode_krb5_pa_spake @445 ; PRIVATE + k5_free_pa_spake @446 ; PRIVATE diff --git a/src/plugins/preauth/spake/Makefile.in b/src/plugins/preauth/spake/Makefile.in index dd1b90730d..d127e92906 100644 --- a/src/plugins/preauth/spake/Makefile.in +++ b/src/plugins/preauth/spake/Makefile.in @@ -13,6 +13,8 @@ RELDIR=../plugins/preauth/spake SHLIB_EXPDEPS=$(KRB5_BASE_DEPLIBS) SHLIB_EXPLIBS=$(KRB5_BASE_LIBS) $(SPAKE_OPENSSL_LIBS) +WINLIBS = $(SLIB) $(KLIB) $(CLIB) + STLIBOBJS=util.o iana.o groups.o openssl.o edwards25519.o \ spake_client.o spake_kdc.o @@ -25,6 +27,15 @@ SRCS= \ $(srcdir)/spake_client.c \ $(srcdir)/spake_kdc.c +# Don't include spake_kdc.c in the Windows object list since we don't +# need it. +OBJS= $(OUTPRE)util.$(OBJEXT) \ + $(OUTPRE)iana.$(OBJEXT) \ + $(OUTPRE)groups.$(OBJEXT) \ + $(OUTPRE)openssl.$(OBJEXT) \ + $(OUTPRE)edwards25519.$(OBJEXT) \ + $(OUTPRE)spake_client.$(OBJEXT) + t_vectors: t_vectors.o $(STLIBOBJS) $(SHLIB_EXPDEPS) $(CC_LINK) -o $@ t_vectors.o $(STLIBOBJS) $(SHLIB_EXPLIBS) @@ -35,5 +46,12 @@ clean-unix:: clean-liblinks clean-libs clean-libobjs check-unix: t_vectors $(RUN_TEST_LOCAL_CONF) ./t_vectors +all-windows: $(OUTPRE)$(SPAKELIB).dll +clean-windows:: + $(RM) $(OUTPRE)$(SPAKELIB).dll + +$(OUTPRE)$(SPAKELIB).dll: spake.def $(OBJS) + link /dll $(LOPTS) -def:spake.def -out:$*.dll $(OBJS) $(WINLIBS) + @libnover_frag@ @libobj_frag@ diff --git a/src/plugins/preauth/spake/spake.def b/src/plugins/preauth/spake/spake.def new file mode 100644 index 0000000000..1b2cf4dcb3 --- /dev/null +++ b/src/plugins/preauth/spake/spake.def @@ -0,0 +1,3 @@ +EXPORTS + + clpreauth_spake_initvt diff --git a/src/windows/installer/wix/config.wxi b/src/windows/installer/wix/config.wxi index ae0efaf824..313f2f132a 100644 --- a/src/windows/installer/wix/config.wxi +++ b/src/windows/installer/wix/config.wxi @@ -39,6 +39,7 @@ + diff --git a/src/windows/installer/wix/features.wxi b/src/windows/installer/wix/features.wxi index 5fe17f02a7..dbfab4f840 100644 --- a/src/windows/installer/wix/features.wxi +++ b/src/windows/installer/wix/features.wxi @@ -51,6 +51,7 @@ Level="$(var.DebugSymLowLevel)" Title="!(loc.StrKerberosClientDebugTitle)"> + @@ -64,6 +65,7 @@ + @@ -86,6 +88,7 @@ + diff --git a/src/windows/installer/wix/files.wxi b/src/windows/installer/wix/files.wxi index faf16b7c15..d1382a8510 100644 --- a/src/windows/installer/wix/files.wxi +++ b/src/windows/installer/wix/files.wxi @@ -346,6 +346,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/windows/installer/wix/platform.wxi b/src/windows/installer/wix/platform.wxi index 105138633c..118f4116fb 100644 --- a/src/windows/installer/wix/platform.wxi +++ b/src/windows/installer/wix/platform.wxi @@ -18,6 +18,8 @@ + + @@ -95,6 +97,8 @@ + + @@ -103,6 +107,7 @@ + @@ -169,6 +174,7 @@ +