]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Build and install SPAKE module for Windows
authorGreg Hudson <ghudson@mit.edu>
Wed, 16 May 2018 17:17:34 +0000 (10:17 -0700)
committerGreg Hudson <ghudson@mit.edu>
Tue, 12 Jun 2018 17:11:26 +0000 (13:11 -0400)
For now only the edwards25519 group is supported, since we are not
adding an OpenSSL dependency.

ticket: 8657

src/Makefile.in
src/config/win-pre.in
src/lib/krb5_32.def
src/plugins/preauth/spake/Makefile.in
src/plugins/preauth/spake/spake.def [new file with mode: 0644]
src/windows/installer/wix/config.wxi
src/windows/installer/wix/features.wxi
src/windows/installer/wix/files.wxi
src/windows/installer/wix/platform.wxi

index bd7a2dc2a4a0b08bd98b9e45e6e287cc71b86f86..fee0ea75ea536d7eb270853e1987b0cd3862a248 100644 (file)
@@ -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)
index 52152c397c84b82eb6505cda760c52806e26666f..819041589719b0d496850a05f7e042aaaafc5c7c 100644 (file)
@@ -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
index f7b428e1692868304d333bda4b3ccc042e9ec8db..7dee65da6c6c56046414ba7413b0deb237f4b199 100644 (file)
@@ -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
index dd1b90730d2f47470fc101f60a167f97058babf5..d127e92906a755d32bd8610a68c2a1134453ca21 100644 (file)
@@ -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 (file)
index 0000000..1b2cf4d
--- /dev/null
@@ -0,0 +1,3 @@
+EXPORTS
+
+       clpreauth_spake_initvt
index ae0efaf8247b11ea5e728868e489c2bea729c38e..313f2f132a7aa6fa6af76e18baacea4635152b55 100644 (file)
@@ -39,6 +39,7 @@
         <?error CPU is not set ?>
     <?endif?>
     <?define BinDir="$(env.KRB_INSTALL_DIR)\bin\"?>
+    <?define PreauthDir=$(env.KRB_INSTALL_DIR)\bin\plugins\preauth?>
     <?define LibDir="$(env.KRB_INSTALL_DIR)\lib\"?>
     <?define InstallerVersion="450"?>
     <?if $(env.CPU) = "i386"?>
index 5fe17f02a7bdc59a18b2405ecfa0e6ac44cfa3ce..dbfab4f840729760124e3b646b7a5bf4acb5f08f 100644 (file)
@@ -51,6 +51,7 @@
                     Level="$(var.DebugSymLowLevel)" 
                     Title="!(loc.StrKerberosClientDebugTitle)">
                     <ComponentRef Id="cmf_bin_debug"/>
+                    <ComponentRef Id="cmf_preauth_debug"/>
                    <ComponentRef Id="cmp_ClientSystemDebug"/>
                     <?include runtime_debug.wxi?>
                </Feature>
@@ -64,6 +65,7 @@
           <ComponentRef Id="cmf_leashw64_dll" />
           <ComponentRef Id="cmf_wshelp64_dll" />
           <ComponentRef Id="cmf_xpprof64_dll" />
+          <ComponentRef Id="cmf_spake64_dll" />
        <?endif?>
 
             <ComponentRef Id="cmf_comerr32_dll" />
@@ -86,6 +88,7 @@
             <ComponentRef Id="cmf_mit2ms_exe" />
             <ComponentRef Id="cmf_wshelp32_dll" />
             <ComponentRef Id="cmf_xpprof32_dll" />
+            <ComponentRef Id="cmf_spake32_dll" />
 
             <ComponentRef Id="cmf_leashw32_dll" />
 
index faf16b7c1553c0d53496eb5b6d9286aee4429826..d1382a8510f9903dec7f8709dac5b34ba68e6ded 100644 (file)
                     </Component>
                 <?endif?>
 
+                  <Directory Id="dirplugins" Name="plugins">
+                    <Directory Id="dirpreauth" Name="preauth" FileSource="$(var.PreauthDir)">
+                      <Component Win64="$(var.Win64)" Id="cmf_spake32_dll" Guid="$(var.cmf_spake32_dll_guid)" DiskId="1">
+                        <File Id="fil_spake32_dll" Name="$(var.cmf_spake32_dll_name)" KeyPath="yes" />
+                      </Component>
+                      <?if $(var.Platform) = "x64"?>
+                        <Component Win64="$(var.Win64)" Id="cmf_spake64_dll" Guid="$(var.cmf_spake64_dll_guid)" DiskId="1">
+                          <File Id="fil_spake64_dll" Name="$(var.cmf_spake64_dll_name)" KeyPath="yes" />
+                        </Component>
+                      <?endif?>
+                      <?ifdef DebugSyms?>
+                        <Component Win64="$(var.Win64)" Id="cmf_preauth_debug" Guid="$(var.cmf_preauth_debug_guid)" DiskId="1">
+                          <?if $(var.Platform) = "Intel" ?>
+                            <File Id="fil_spake32_pdb" Name="spake32.pdb" />
+                          <?else?>
+                            <File Id="fil_spake32_pdb" Name="spake64.pdb" />
+                          <?endif?>
+                        </Component>
+                      <?endif?>
+                    </Directory> <!-- /preauth -->
+                  </Directory> <!-- /plugins -->
                 </Directory> <!-- /bin -->
                 
                 <Directory Id="dirinc" Name="include" FileSource="$(var.IncDir)">
index 105138633ca1019f3d17fa6b2311c36fcbad89a1..118f4116fbbd1274dbb06ee8105fd13fa9f3968e 100644 (file)
@@ -18,6 +18,8 @@
   <?define cmf_wshelp32_dll_name="wshelp32.dll"?>
   <?define cmf_xpprof32_dll_guid="A7DF8BAF-7188-4C24-89FB-C8EB51571FD2"?>
   <?define cmf_xpprof32_dll_name="xpprof32.dll"?>
+  <?define cmf_spake32_dll_guid="36A1695B-A2B4-4A93-8C35-733A121923D4"?>
+  <?define cmf_spake32_dll_name="spake32.dll"?>
   <?if $(var.Platform) = "x64" ?>
         <?define UpgradeCode="6DA9CD86-6028-4852-8C94-452CAC229244"?>
         <?define PISystemFolder="System64Folder"?>
@@ -95,6 +97,8 @@
         <?define cmf_wshelp64_dll_name="wshelp64.dll"?>
         <?define cmf_xpprof64_dll_guid="B1112677-50A4-4430-846B-F824C859E3DF"?>
         <?define cmf_xpprof64_dll_name="xpprof64.dll"?>
+        <?define cmf_spake64_dll_guid="0E97B52A-EC8E-494C-BF5D-83AAACFEFDBA"?>
+        <?define cmf_spake64_dll_name="spake64.dll"?>
         <?define cmf_nidmgr32_dll_guid="8538212A-9BD5-4d62-BF29-36D853385F0A"?>
         <?define cmf_nidmgr32_dll_name="nidmgr64.dll"?>
         <?define cmf_nidmgr32_dll_w2k_guid="01655D48-C596-48f8-A0C3-5DB3FC833444"?>
         <?define cmf_krb5cred_en_us_dll_guid="223B7E9D-290F-40b8-89B3-F8337A8E082D"?>
         <?define cmf_krb5cred_en_us_dll_name="krb5cred_en_us.dll"?>
         <?define cmf_bin_debug_guid="F3432C85-89D9-4bd6-BD82-4ED49A118338"?>
+        <?define cmf_preauth_debug_guid="53491A4E-CB96-44D9-9B92-4ADF37C3A2D6"?>
 <?elseif $(var.Platform) = "Intel"?>
         <?define UpgradeCode="61211594-AAA1-4A98-A299-757326763CC7"?>
         <?define PISystemFolder="SystemFolder"?>
         <?define cmf_krb5cred_en_us_dll_guid="EA9ABE05-A85B-43BB-8741-50D3C3128632"?>
         <?define cmf_krb5cred_en_us_dll_name="krb5cred_en_us.dll"?>
         <?define cmf_bin_debug_guid="C8468854-8261-4781-8119-A612636841E3"?>
+        <?define cmf_preauth_debug_guid="169C0A38-EB79-4AA9-B78B-998B55084ECD"?>
 <?else?>
         <?error Unknown platform?>
 <?endif?>