]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Merge trunk changes from r22791 to r22815 to enc-perf branch
authorGreg Hudson <ghudson@mit.edu>
Thu, 1 Oct 2009 14:50:04 +0000 (14:50 +0000)
committerGreg Hudson <ghudson@mit.edu>
Thu, 1 Oct 2009 14:50:04 +0000 (14:50 +0000)
bigredbutton: whitespace

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/enc-perf@22816 dc483132-0cff-0310-8789-dd5450dbe970

34 files changed:
src/Makefile.in
src/configure.in
src/lib/crypto/Makefile.in
src/lib/crypto/builtin/Makefile.in
src/lib/crypto/builtin/arcfour/Makefile.in
src/lib/crypto/builtin/deps
src/lib/crypto/builtin/hash_provider/Makefile.in [moved from src/lib/crypto/krb/hash_provider/Makefile.in with 81% similarity]
src/lib/crypto/builtin/hash_provider/deps [moved from src/lib/crypto/krb/hash_provider/deps with 97% similarity]
src/lib/crypto/builtin/hash_provider/hash_crc32.c [moved from src/lib/crypto/krb/hash_provider/hash_crc32.c with 100% similarity]
src/lib/crypto/builtin/hash_provider/hash_md4.c [moved from src/lib/crypto/krb/hash_provider/hash_md4.c with 100% similarity]
src/lib/crypto/builtin/hash_provider/hash_md5.c [moved from src/lib/crypto/krb/hash_provider/hash_md5.c with 100% similarity]
src/lib/crypto/builtin/hash_provider/hash_provider.h [moved from src/lib/crypto/krb/hash_provider/hash_provider.h with 100% similarity]
src/lib/crypto/builtin/hash_provider/hash_sha1.c [moved from src/lib/crypto/krb/hash_provider/hash_sha1.c with 100% similarity]
src/lib/crypto/builtin/yhash.h [moved from src/lib/crypto/krb/yarrow/yhash.h with 100% similarity]
src/lib/crypto/crypto_tests/Makefile.in
src/lib/crypto/krb/Makefile.in
src/lib/crypto/krb/deps
src/lib/crypto/krb/keyhash_provider/Makefile.in
src/lib/crypto/krb/keyhash_provider/deps
src/lib/crypto/krb/prf/Makefile.in
src/lib/crypto/krb/prf/deps
src/lib/crypto/krb/yarrow/Makefile.in
src/lib/crypto/krb/yarrow/deps
src/lib/crypto/krb/yarrow/yarrow.c
src/lib/crypto/krb/yarrow/yarrow.h
src/lib/crypto/openssl/hash_provider/hash_crc32.c [new file with mode: 0644]
src/lib/crypto/openssl/hash_provider/hash_md4.c [new file with mode: 0644]
src/lib/crypto/openssl/hash_provider/hash_md5.c [new file with mode: 0644]
src/lib/crypto/openssl/hash_provider/hash_provider.h [new file with mode: 0644]
src/lib/crypto/openssl/hash_provider/hash_sha1.c [new file with mode: 0644]
src/lib/crypto/openssl/hmac.c
src/lib/crypto/openssl/sha1/shs.c
src/lib/crypto/openssl/sha1/shs.h
src/lib/crypto/openssl/yhash.h [new file with mode: 0644]

index 3ac3dc4e32ad43bfa6b41a3ebed6836ba0380d03..e5be6e1647b934c2077cfe3244a36351b06a698f 100644 (file)
@@ -196,7 +196,7 @@ WINMAKEFILES=Makefile \
        lib\Makefile lib\crypto\Makefile \
        lib\crypto\krb\crc32\Makefile lib\crypto\builtin\des\Makefile \
        lib\crypto\krb\dk\Makefile lib\crypto\builtin\enc_provider\Makefile \
-       lib\crypto\krb\hash_provider\Makefile \
+       lib\crypto\builtin\hash_provider\Makefile \
        lib\crypto\krb\keyhash_provider\Makefile \
        lib\crypto\krb\prf\Makefile lib\crypto\krb\rand2key\Makefile \
        lib\crypto\krb\raw\Makefile lib\crypto\krb\old\Makefile \
@@ -271,7 +271,7 @@ WINMAKEFILES=Makefile \
 ##DOS##        $(WCONFIG) config < $@.in > $@
 ##DOS##lib\crypto\builtin\enc_provider\Makefile: lib\crypto\builtin\enc_provider\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\krb\hash_provider\Makefile: lib\crypto\krb\hash_provider\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\builtin\hash_provider\Makefile: lib\crypto\builtin\hash_provider\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
 ##DOS##lib\crypto\krb\keyhash_provider\Makefile: lib\crypto\krb\keyhash_provider\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
@@ -396,7 +396,7 @@ FILES= ./* \
        config/* include/* include/kerberosIV/* \
        include/krb5/* include/krb5/stock/* include/sys/* lib/* \
        lib/crypto/* lib/crypto/krb/crc32/* lib/crypto/builtin/des/* lib/crypto/krb/dk/* \
-       lib/crypto/builtin/enc_provider/* lib/crypto/krb/hash_provider/* \
+       lib/crypto/builtin/enc_provider/* lib/crypto/builtin/hash_provider/* \
        lib/crypto/krb/keyhash_provider/* \
        lib/crypto/krb/prf/* lib/crypto/krb/rand2key/* \
        lib/crypto/krb/old/* lib/crypto/krb/raw/* \
index 8773ee17d4299281fd25fc228585c833da8e2c9d..415115172e47e71972f58f5e6315a300394e3bb5 100644 (file)
@@ -1061,7 +1061,7 @@ V5_AC_OUTPUT_MAKEFILE(.
 
        lib/crypto lib/crypto/krb lib/crypto/krb/crc32 lib/crypto/builtin/des
        lib/crypto/krb/dk lib/crypto/builtin/enc_provider
-       lib/crypto/krb/hash_provider lib/crypto/krb/keyhash_provider
+       lib/crypto/builtin/hash_provider lib/crypto/krb/keyhash_provider
        lib/crypto/krb/prf lib/crypto/krb/rand2key
        lib/crypto/builtin lib/crypto/builtin/md4 lib/crypto/builtin/md5
        lib/crypto/krb/old lib/crypto/krb/raw lib/crypto/builtin/sha1
index 3a3bab5ff638a3efc8b56dcf44a8c13eea9a93fd..b89619f4f1170a045cb207655e3090f5c881ff97 100644 (file)
@@ -21,7 +21,7 @@ LIBFINIFUNC=cryptoint_cleanup_library
 RELDIR=crypto
 
 STOBJLISTS=krb/crc32/OBJS.ST krb/dk/OBJS.ST builtin/enc_provider/OBJS.ST       \
-       krb/hash_provider/OBJS.ST krb/keyhash_provider/OBJS.ST                  \
+       builtin/hash_provider/OBJS.ST krb/keyhash_provider/OBJS.ST              \
        krb/prf/OBJS.ST krb/rand2key/OBJS.ST                                    \
        krb/old/OBJS.ST krb/raw/OBJS.ST krb/yarrow/OBJS.ST                      \
        builtin/md4/OBJS.ST builtin/md5/OBJS.ST builtin/sha1/OBJS.ST            \
@@ -29,7 +29,7 @@ STOBJLISTS=krb/crc32/OBJS.ST krb/dk/OBJS.ST builtin/enc_provider/OBJS.ST      \
        krb/OBJS.ST  builtin/OBJS.ST
 
 SUBDIROBJLISTS=krb/crc32/OBJS.ST krb/dk/OBJS.ST builtin/enc_provider/OBJS.ST   \
-       krb/hash_provider/OBJS.ST krb/keyhash_provider/OBJS.ST                  \
+       builtin/hash_provider/OBJS.ST krb/keyhash_provider/OBJS.ST              \
        krb/prf/OBJS.ST krb/rand2key/OBJS.ST                                    \
        krb/old/OBJS.ST krb/raw/OBJS.ST  krb/yarrow/OBJS.ST                     \
        builtin/md4/OBJS.ST builtin/md5/OBJS.ST builtin/sha1/OBJS.ST            \
index c1d8a554be51404ffde84ad5b40117d209a00060..deccbd647c2e7806612636da497e999da0a4f168 100644 (file)
@@ -2,7 +2,7 @@ thisconfigdir=../../..
 myfulldir=lib/crypto/builtin
 mydir=lib/crypto/builtin
 BUILDTOP=$(REL)..$(S)..$(S)..
-SUBDIRS=des arcfour aes         md4 md5  sha1 enc_provider
+SUBDIRS=des arcfour aes         md4 md5  sha1 enc_provider hash_provider
 LOCALINCLUDES = -I$(srcdir)/../krb                     \
                -I$(srcdir)/../krb/hash_provider        \
                -I$(srcdir)/../@CRYPTO_IMPL@/des        \
@@ -11,7 +11,8 @@ LOCALINCLUDES = -I$(srcdir)/../krb                    \
                -I$(srcdir)/../@CRYPTO_IMPL@/sha1       \
                -I$(srcdir)/../@CRYPTO_IMPL@/md4        \
                -I$(srcdir)/../@CRYPTO_IMPL@/md5        \
-               -I$(srcdir)/../@CRYPTO_IMPL@/enc_provider       
+               -I$(srcdir)/../@CRYPTO_IMPL@/enc_provider       \
+               -I$(srcdir)/../@CRYPTO_IMPL@/hash_provider      
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 DEFS=
@@ -38,6 +39,7 @@ SRCS=\
 STOBJLISTS= des/OBJS.ST md4/OBJS.ST    \
        md5/OBJS.ST sha1/OBJS.ST        \
        enc_provider/OBJS.ST            \
+       hash_provider/OBJS.ST           \
        arcfour/OBJS.ST                 \
        aes/OBJS.ST                     \
        OBJS.ST
@@ -45,8 +47,9 @@ STOBJLISTS= des/OBJS.ST md4/OBJS.ST   \
 SUBDIROBJLISTS= des/OBJS.ST md4/OBJS.ST        \
                md5/OBJS.ST sha1/OBJS.ST        \
                enc_provider/OBJS.ST            \
+               hash_provider/OBJS.ST           \
                arcfour/OBJS.ST                 \
-               aes/OBJS.ST OBJS.ST
+               aes/OBJS.ST 
 
 ##DOS##LIBOBJS = $(OBJS)
 
@@ -70,6 +73,9 @@ all-windows::
        cd ..\sha1
        @echo Making in crypto\sha1
        $(MAKE) -$(MFLAGS)
+       cd ..\hash_provider
+       @echo Making in crypto\hash_provider
+       $(MAKE) -$(MFLAGS)
        cd ..\enc_provider
        @echo Making in crypto\enc_provider
        $(MAKE) -$(MFLAGS)
@@ -94,6 +100,9 @@ clean-windows::
        cd ..\sha1
        @echo Making clean in crypto\sha1
        $(MAKE) -$(MFLAGS) clean
+       cd ..\hash_provider
+       @echo Making clean in crypto\hash_provider
+       $(MAKE) -$(MFLAGS) clean
        cd ..\enc_provider
        @echo Making clean in crypto\enc_provider
        $(MAKE) -$(MFLAGS) clean
@@ -118,6 +127,9 @@ check-windows::
        cd ..\sha1
        @echo Making check in crypto\sha1
        $(MAKE) -$(MFLAGS) check
+       cd ..\hash_provider
+       @echo Making check in crypto\hash_provider
+       $(MAKE) -$(MFLAGS) check
        cd ..\enc_provider
        @echo Making check in crypto\enc_provider
        $(MAKE) -$(MFLAGS) check
index 499c0a0765d68d250d756715c7bdea35d8c828b4..6b54f494b91d5337162871b0e47f38ad3c6612e9 100644 (file)
@@ -2,7 +2,7 @@ thisconfigdir=../../../..
 myfulldir=lib/crypto/builtin/arcfour
 mydir=lib/crypto/builtin/arcfour
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../md4 -I$(srcdir)/../../krb
+LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../@CRYPTO_IMPL@/md4  -I$(srcdir)/../../krb
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
index fb4163ea6c3c6326cd0de82c0e3633e54077c3c7..55016e958e6a2e2f7023b08d9309b1b071f48f18 100644 (file)
@@ -21,4 +21,4 @@ pbkdf2.so pbkdf2.po $(OUTPRE)pbkdf2.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
   $(SRCTOP)/include/k5-thread.h $(SRCTOP)/include/krb5.h \
   $(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
   $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
-  $(srcdir)/../builtin/pbkdf2.c $(srcdir)/../krb/hash_provider/hash_provider.h
+  $(srcdir)/../builtin/pbkdf2.c $(srcdir)/../builtin/hash_provider/hash_provider.h
similarity index 81%
rename from src/lib/crypto/krb/hash_provider/Makefile.in
rename to src/lib/crypto/builtin/hash_provider/Makefile.in
index ece3a99ba332cf7efab22222a9c2b6182efb0852..75b3d1b0cbb2ae3f082e61855d0ade2318982cc7 100644 (file)
@@ -1,8 +1,8 @@
 thisconfigdir=../../../..
-myfulldir=lib/crypto/krb/hash_provider
-mydir=lib/crypto/krb/hash_provider
+myfulldir=lib/crypto/builtin/hash_provider
+mydir=lib/crypto/builtin/hash_provider
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/../crc32 -I$(srcdir)/../../@CRYPTO_IMPL@/md4 \
+LOCALINCLUDES = -I$(srcdir)/../../krb/crc32 -I$(srcdir)/../../@CRYPTO_IMPL@/md4 \
        -I$(srcdir)/../../@CRYPTO_IMPL@/md5 -I$(srcdir)/../../@CRYPTO_IMPL@/sha1
 DEFS=
 
similarity index 97%
rename from src/lib/crypto/krb/hash_provider/deps
rename to src/lib/crypto/builtin/hash_provider/deps
index 970777048711ad3a4eac2734e536016c174f315a..deca38437cd6be7697c373a3f7c5581785665196 100644 (file)
@@ -10,7 +10,7 @@ hash_crc32.so hash_crc32.po $(OUTPRE)hash_crc32.$(OBJEXT): \
   $(SRCTOP)/include/k5-plugin.h $(SRCTOP)/include/k5-thread.h \
   $(SRCTOP)/include/krb5.h $(SRCTOP)/include/krb5/locate_plugin.h \
   $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
-  $(SRCTOP)/include/socket-utils.h $(srcdir)/../crc32/crc-32.h \
+  $(SRCTOP)/include/socket-utils.h $(srcdir)/../../krb/crc32/crc-32.h \
   hash_crc32.c hash_provider.h
 hash_md4.so hash_md4.po $(OUTPRE)hash_md4.$(OBJEXT): \
   $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
index 41704c85c28451ce68125e00bb3e573d05289bf4..3d7eca18b639a1f00a14e9a8c46c26ae64bf1f74 100644 (file)
@@ -3,7 +3,7 @@ myfulldir=lib/crypto/crypto_tests
 mydir=lib/crypto/crypto_tests
 BUILDTOP=$(REL)..$(S)..$(S)..
 LOCALINCLUDES = -I$(srcdir)/../krb -I$(srcdir)/../@CRYPTO_IMPL@/enc_provider           \
-       -I$(srcdir)/../krb/hash_provider -I$(srcdir)/../krb/keyhash_provider    \
+       -I$(srcdir)/../@CRYPTO_IMPL@/hash_provider -I$(srcdir)/../krb/keyhash_provider  \
        -I$(srcdir)/../krb/dk -I$(srcdir)/../@CRYPTO_IMPL@/                     \
        -I$(srcdir)/../krb/yarrow       \
        -I$(srcdir)/../krb/crc32 -I$(srcdir)/../krb/old -I$(srcdir)/../krb/raw  \
index c80761497d5672b87474d7673cf0277b354d4ff7..fe96eba8527be05ce9d22e88e94b55b39f8d63fe 100644 (file)
@@ -2,15 +2,15 @@ thisconfigdir=../../..
 myfulldir=lib/crypto/krb
 mydir=lib/crypto/krb
 BUILDTOP=$(REL)..$(S)..$(S)..
-SUBDIRS= crc32 dk hash_provider keyhash_provider \
+SUBDIRS= crc32 dk keyhash_provider \
        prf rand2key old raw yarrow 
 LOCALINCLUDES = -I$(srcdir) -I$(srcdir)/../@CRYPTO_IMPL@/enc_provider -I$(srcdir)/dk   \
-               -I$(srcdir)/hash_provider -I$(srcdir)/keyhash_provider                  \
+               -I$(srcdir)/../@CRYPTO_IMPL@/hash_provider -I$(srcdir)/keyhash_provider \
                -I$(srcdir)/prf -I$(srcdir)/rand2key                                    \
                -I$(srcdir)/old -I$(srcdir)/raw -I$(srcdir)/yarrow                      \
                -I$(srcdir)/../@CRYPTO_IMPL@/ -I$(srcdir)/../@CRYPTO_IMPL@/des          \
                -I$(srcdir)/../@CRYPTO_IMPL@/aes -I$(srcdir)/../@CRYPTO_IMPL@/arcfour   \
-               -I$(srcdir)/../@CRYPTO_IMPL@/sha1
+               -I$(srcdir)/../@CRYPTO_IMPL@/sha1 -I$(srcdir)/../@CRYPTO_IMPL@
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 DEFS=
@@ -154,14 +154,14 @@ SRCS=\
        $(srcdir)/verify_checksum_iov.c
 
 STOBJLISTS=crc32/OBJS.ST  dk/OBJS.ST                           \
-       hash_provider/OBJS.ST keyhash_provider/OBJS.ST          \
+       keyhash_provider/OBJS.ST                                \
        prf/OBJS.ST rand2key/OBJS.ST                            \
        old/OBJS.ST raw/OBJS.ST  yarrow/OBJS.ST  OBJS.ST
 
 SUBDIROBJLISTS=crc32/OBJS.ST  dk/OBJS.ST                       \
-       hash_provider/OBJS.ST keyhash_provider/OBJS.ST          \
+       keyhash_provider/OBJS.ST                                \
        prf/OBJS.ST rand2key/OBJS.ST                            \
-       old/OBJS.ST raw/OBJS.ST  yarrow/OBJS.ST OBJS.ST 
+       old/OBJS.ST raw/OBJS.ST  yarrow/OBJS.ST 
 
 ##DOS##LIBOBJS = $(OBJS)
 
@@ -179,9 +179,6 @@ all-windows::
        cd ..\dk
        @echo Making in crypto\dk
        $(MAKE) -$(MFLAGS)
-       cd ..\hash_provider
-       @echo Making in crypto\hash_provider
-       $(MAKE) -$(MFLAGS)
        cd ..\keyhash_provider
        @echo Making in crypto\keyhash_provider
        $(MAKE) -$(MFLAGS)
@@ -209,9 +206,6 @@ clean-windows::
        cd ..\dk
        @echo Making clean in crypto\dk
        $(MAKE) -$(MFLAGS) clean
-       cd ..\hash_provider
-       @echo Making clean in crypto\hash_provider
-       $(MAKE) -$(MFLAGS) clean
        cd ..\keyhash_provider
        @echo Making clean in crypto\keyhash_provider
        $(MAKE) -$(MFLAGS) clean
@@ -239,9 +233,6 @@ check-windows::
        cd ..\dk
        @echo Making check in crypto\dk
        $(MAKE) -$(MFLAGS) check
-       cd ..\hash_provider
-       @echo Making check in crypto\hash_provider
-       $(MAKE) -$(MFLAGS) check
        cd ..\keyhash_provider
        @echo Making check in crypto\keyhash_provider
        $(MAKE) -$(MFLAGS) check
index 271ec907f50ab476bdfa461b1aa52a9f5d99570c..aafb06b005e3c87e4d728dfbf73162b5bebf6272 100644 (file)
@@ -52,7 +52,7 @@ cksumtypes.so cksumtypes.po $(OUTPRE)cksumtypes.$(OBJEXT): \
   $(SRCTOP)/include/k5-plugin.h $(SRCTOP)/include/k5-thread.h \
   $(SRCTOP)/include/krb5.h $(SRCTOP)/include/krb5/locate_plugin.h \
   $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
-  $(SRCTOP)/include/socket-utils.h $(srcdir)/hash_provider/hash_provider.h \
+  $(SRCTOP)/include/socket-utils.h $(srcdir)/../builtin/hash_provider/hash_provider.h \
   $(srcdir)/keyhash_provider/keyhash_provider.h cksumtypes.c \
   cksumtypes.h
 coll_proof_cksum.so coll_proof_cksum.po $(OUTPRE)coll_proof_cksum.$(OBJEXT): \
@@ -192,7 +192,7 @@ etypes.so etypes.po $(OUTPRE)etypes.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
   $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
   $(srcdir)/../builtin/aes/aes_s2k.h $(srcdir)/../builtin/arcfour/arcfour.h \
   $(srcdir)/../builtin/des/des_int.h $(srcdir)/../builtin/enc_provider/enc_provider.h \
-  $(srcdir)/dk/dk.h $(srcdir)/hash_provider/hash_provider.h \
+  $(srcdir)/dk/dk.h $(srcdir)/../builtin/hash_provider/hash_provider.h \
   $(srcdir)/old/old.h $(srcdir)/prf/prf_int.h $(srcdir)/raw/raw.h \
   etypes.c etypes.h
 keyblocks.so keyblocks.po $(OUTPRE)keyblocks.$(OBJEXT): \
@@ -329,7 +329,7 @@ prng.so prng.po $(OUTPRE)prng.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
   $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
   $(srcdir)/../builtin/enc_provider/enc_provider.h $(srcdir)/../builtin/sha1/shs.h \
   $(srcdir)/yarrow/yarrow.h $(srcdir)/yarrow/ycipher.h \
-  $(srcdir)/yarrow/yhash.h $(srcdir)/yarrow/ytypes.h \
+  $(srcdir)/../builtin/yhash.h $(srcdir)/yarrow/ytypes.h \
   prng.c
 random_to_key.so random_to_key.po $(OUTPRE)random_to_key.$(OBJEXT): \
   $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
index d84ce7967ecd87409051b7c10499d4332121f6ad..d30f6c4f0909000dd49e3813050e67da6b8d2588 100644 (file)
@@ -4,7 +4,7 @@ mydir=lib/crypto/krb/keyhash_provider
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
 LOCALINCLUDES = -I$(srcdir)/../../@CRYPTO_IMPL@/des -I$(srcdir)/../../@CRYPTO_IMPL@/md4 \
                -I$(srcdir)/../../@CRYPTO_IMPL@/md5 -I$(srcdir)/../../@CRYPTO_IMPL@/arcfour \
-               -I$(srcdir)/../hash_provider
+               -I$(srcdir)/../../@CRYPTO_IMPL@/hash_provider -I$(srcdir)/../../@CRYPTO_IMPL@
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
index bfd980b0ea3e82256e865e570d038e62dada71c4..09af19d598f14236277c05f0ae8d0ed5ba2c033f 100644 (file)
@@ -44,7 +44,7 @@ hmac_md5.so hmac_md5.po $(OUTPRE)hmac_md5.$(OBJEXT): \
   $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
   $(SRCTOP)/include/socket-utils.h $(srcdir)/../../builtin/arcfour/arcfour-int.h \
   $(srcdir)/../../builtin/arcfour/arcfour.h $(srcdir)/../../builtin/md5/rsa-md5.h \
-  $(srcdir)/../aead.h $(srcdir)/../cksumtypes.h $(srcdir)/../hash_provider/hash_provider.h \
+  $(srcdir)/../aead.h $(srcdir)/../cksumtypes.h $(srcdir)/../../builtin/hash_provider/hash_provider.h \
   hmac_md5.c keyhash_provider.h
 md5_hmac.so md5_hmac.po $(OUTPRE)md5_hmac.$(OBJEXT): \
   $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
@@ -57,5 +57,5 @@ md5_hmac.so md5_hmac.po $(OUTPRE)md5_hmac.$(OBJEXT): \
   $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
   $(SRCTOP)/include/socket-utils.h $(srcdir)/../../builtin/arcfour/arcfour-int.h \
   $(srcdir)/../../builtin/arcfour/arcfour.h $(srcdir)/../../builtin/md5/rsa-md5.h \
-  $(srcdir)/../hash_provider/hash_provider.h keyhash_provider.h \
+  $(srcdir)/../../builtin/hash_provider/hash_provider.h keyhash_provider.h \
   md5_hmac.c
index f16308b957bdfc88fd02c7300a43a523e8b79610..42b14b95a89601a66e1eca5819df00a984f05863 100644 (file)
@@ -4,6 +4,7 @@ mydir=lib/crypto/krb/prf
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
 LOCALINCLUDES = -I$(srcdir) -I$(srcdir)/..             \
                -I$(srcdir)/../dk                       \
+               -I$(srcdir)/../../@CRYPTO_IMPL@         \
                -I$(srcdir)/../../@CRYPTO_IMPL@/md5     \
                -I$(srcdir)/../../@CRYPTO_IMPL@/sha1 
 DEFS=
index a3c9c7636ecb97ed74249d28016117e81863dde2..c0b02f1c4004383ba0eec78955bfe8012f6d8394 100644 (file)
@@ -30,5 +30,5 @@ rc4_prf.so rc4_prf.po $(OUTPRE)rc4_prf.$(OBJEXT): $(BUILDTOP)/include/autoconf.h
   $(SRCTOP)/include/k5-thread.h $(SRCTOP)/include/krb5.h \
   $(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
   $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
-  $(srcdir)/../hash_provider/hash_provider.h prf_int.h \
+  $(srcdir)/../../builtin/hash_provider/hash_provider.h prf_int.h \
   rc4_prf.c
index b246c6cc05e9b85cb40de4b31178393bf3f64577..0a3c1e708da2665919f84ed89b3cfbfbfe293b3d 100644 (file)
@@ -2,7 +2,10 @@ thisconfigdir=../../../..
 myfulldir=lib/crypto/krb/yarrow
 mydir=lib/crypto/krb/yarrow
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../@CRYPTO_IMPL@ -I$(srcdir)/../../@CRYPTO_IMPL@/sha1 -I$(srcdir)/../../@CRYPTO_IMPL@/enc_provider
+LOCALINCLUDES = -I$(srcdir)/.. \
+               -I$(srcdir)/../../@CRYPTO_IMPL@         \
+               -I$(srcdir)/../../@CRYPTO_IMPL@/sha1    \
+               -I$(srcdir)/../../@CRYPTO_IMPL@/enc_provider
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
index bfda3af5b39610aa00761149c20dd4d8f1d643e0..ebc455065bd9b8d303813e8b783bdefa5c348954 100644 (file)
@@ -11,7 +11,7 @@ yarrow.so yarrow.po $(OUTPRE)yarrow.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
   $(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
   $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
   $(srcdir)/../../builtin/sha1/shs.h yarrow.c yarrow.h \
-  ycipher.h yexcep.h yhash.h ylock.h ystate.h ytypes.h
+  ycipher.h yexcep.h $(srcdir)/../../builtin/yhash.h ylock.h ystate.h ytypes.h
 ycipher.so ycipher.po $(OUTPRE)ycipher.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
   $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
   $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
@@ -23,4 +23,4 @@ ycipher.so ycipher.po $(OUTPRE)ycipher.$(OBJEXT): $(BUILDTOP)/include/autoconf.h
   $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
   $(srcdir)/../../builtin/enc_provider/enc_provider.h \
   $(srcdir)/../../builtin/sha1/shs.h yarrow.h ycipher.c \
-  ycipher.h yhash.h ytypes.h
+  ycipher.h $(srcdir)/../../builtin/yhash.h ytypes.h
index ff25fa9c5d220eb9598c551e77379dd2b39911db..b1533daf485aa1430d1bf1416034fef3b19225ea 100644 (file)
@@ -34,7 +34,6 @@
 
 #define YARROW_IMPL
 #include "yarrow.h"
-#include "yhash.h"
 #include "ycipher.h"
 #include "ylock.h"
 #include "ystate.h"
index 7e1fe1442da195cecb11226f1cc67a4847edacc9..bb8c63ac051246527fa692daf3ef1f575435999a 100644 (file)
@@ -10,7 +10,7 @@
 #define YARROW_NO_MATHLIB
 
 #include "ytypes.h"
-#include "yhash.h"
+#include <yhash.h>
 #include "ycipher.h"
 
 /* These error codes are returned by the functions below. */
diff --git a/src/lib/crypto/openssl/hash_provider/hash_crc32.c b/src/lib/crypto/openssl/hash_provider/hash_crc32.c
new file mode 100644 (file)
index 0000000..a3d3028
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 1998 by the FundsXpress, INC.
+ *
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government.  It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of FundsXpress. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  FundsXpress makes no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
+ * or implied warranty.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#include "k5-int.h"
+#include "crc-32.h"
+#include "hash_provider.h"
+
+static krb5_error_code
+k5_crc32_hash(unsigned int icount, const krb5_data *input,
+             krb5_data *output)
+{
+    unsigned long c, cn;
+    unsigned int i;
+    
+    if (output->length != CRC32_CKSUM_LENGTH)
+       return(KRB5_CRYPTO_INTERNAL);
+
+    c = 0;
+    for (i=0; i<icount; i++) {
+       mit_crc32(input[i].data, input[i].length, &cn);
+       c ^= cn;
+    }
+
+    store_32_le(c, output->data);
+    return(0);
+}
+
+const struct krb5_hash_provider krb5int_hash_crc32 = {
+    "CRC32",
+    CRC32_CKSUM_LENGTH,
+    1,
+    k5_crc32_hash
+};
diff --git a/src/lib/crypto/openssl/hash_provider/hash_md4.c b/src/lib/crypto/openssl/hash_provider/hash_md4.c
new file mode 100644 (file)
index 0000000..f507aaa
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 1998 by the FundsXpress, INC.
+ * 
+ * All rights reserved.
+ * 
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government.  It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ * 
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of FundsXpress. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  FundsXpress makes no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
+ * or implied warranty.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#include "k5-int.h"
+#include "rsa-md4.h"
+#include "hash_provider.h"
+
+static krb5_error_code
+k5_md4_hash(unsigned int icount, const krb5_data *input,
+           krb5_data *output)
+{
+    krb5_MD4_CTX ctx;
+    unsigned int i;
+
+    if (output->length != RSA_MD4_CKSUM_LENGTH)
+       return(KRB5_CRYPTO_INTERNAL);
+
+    krb5_MD4Init(&ctx);
+    for (i=0; i<icount; i++)
+       krb5_MD4Update(&ctx, (unsigned char *) input[i].data, input[i].length);
+    krb5_MD4Final(&ctx);
+
+    memcpy(output->data, ctx.digest, RSA_MD4_CKSUM_LENGTH);
+
+    return(0);
+}
+
+const struct krb5_hash_provider krb5int_hash_md4 = {
+    "MD4",
+    RSA_MD4_CKSUM_LENGTH,
+    64,
+    k5_md4_hash
+};
diff --git a/src/lib/crypto/openssl/hash_provider/hash_md5.c b/src/lib/crypto/openssl/hash_provider/hash_md5.c
new file mode 100644 (file)
index 0000000..a6e380a
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 1998 by the FundsXpress, INC.
+ * 
+ * All rights reserved.
+ * 
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government.  It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ * 
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of FundsXpress. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  FundsXpress makes no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
+ * or implied warranty.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#include "k5-int.h"
+#include "rsa-md5.h"
+#include "hash_provider.h"
+
+static krb5_error_code
+k5_md5_hash(unsigned int icount, const krb5_data *input,
+           krb5_data *output)
+{
+    krb5_MD5_CTX ctx;
+    unsigned int i;
+
+    if (output->length != RSA_MD5_CKSUM_LENGTH)
+       return(KRB5_CRYPTO_INTERNAL);
+
+    krb5_MD5Init(&ctx);
+    for (i=0; i<icount; i++)
+       krb5_MD5Update(&ctx, (unsigned char *) input[i].data, input[i].length);
+    krb5_MD5Final(&ctx);
+
+    memcpy(output->data, ctx.digest, RSA_MD5_CKSUM_LENGTH);
+
+    return(0);
+}
+
+const struct krb5_hash_provider krb5int_hash_md5 = {
+    "MD5",
+    RSA_MD5_CKSUM_LENGTH,
+    64,
+    k5_md5_hash
+};
diff --git a/src/lib/crypto/openssl/hash_provider/hash_provider.h b/src/lib/crypto/openssl/hash_provider/hash_provider.h
new file mode 100644 (file)
index 0000000..4fa4609
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 1998 by the FundsXpress, INC.
+ * 
+ * All rights reserved.
+ * 
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government.  It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ * 
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of FundsXpress. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  FundsXpress makes no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
+ * or implied warranty.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#include "k5-int.h"
+
+extern const struct krb5_hash_provider krb5int_hash_crc32;
+extern const struct krb5_hash_provider krb5int_hash_md4;
+extern const struct krb5_hash_provider krb5int_hash_md5;
+extern const struct krb5_hash_provider krb5int_hash_sha1;
diff --git a/src/lib/crypto/openssl/hash_provider/hash_sha1.c b/src/lib/crypto/openssl/hash_provider/hash_sha1.c
new file mode 100644 (file)
index 0000000..d217086
--- /dev/null
@@ -0,0 +1,61 @@
+/* lib/crypto/openssl/hash/yhash.h
+ *
+ * Copyright (C) 1998 by the FundsXpress, INC.
+ * 
+ * All rights reserved.
+ * 
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government.  It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ * 
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of FundsXpress. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  FundsXpress makes no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
+ * or implied warranty.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#include "k5-int.h"
+#include "shs.h"
+#include "hash_provider.h"
+
+static krb5_error_code
+k5_sha1_hash(unsigned int icount, const krb5_data *input,
+            krb5_data *output)
+{
+    SHS_INFO ctx;
+    unsigned int i;
+
+    if (output->length != SHS_DIGESTSIZE)
+       return(KRB5_CRYPTO_INTERNAL);
+
+    shsInit(&ctx);
+    for (i=0; i<icount; i++)
+       shsUpdate(&ctx, (unsigned char *) input[i].data, input[i].length);
+    shsFinal(&ctx);
+
+    if (ctx.digestLen > 0 && ctx.digestLen <= output->length){
+        output->length = ctx.digestLen;
+        memcpy(output->data, ctx.digestBuf,ctx.digestLen);
+    }
+
+    return(0);
+}
+
+const struct krb5_hash_provider krb5int_hash_sha1 = {
+    "SHA1",
+    SHS_DIGESTSIZE,
+    SHS_DATASIZE,
+    k5_sha1_hash
+};
+
index a5543c97732797d9f82a623a1312d7ffee305920..e0c8dec7968e50c598beedb08268ed6957e42904 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/* lib/crypto/openssl/hmac.c
  */
 
 #include "k5-int.h"
index 9fb60f87c992042342e15ffd44e2b7bd265ea92c..7cc864bb8c40e84643c02b0e61a7ed7a218dcb8e 100644 (file)
@@ -3,12 +3,19 @@
 #include <sys/types.h>
 #endif
 #include <string.h>
+#define h0init  0x67452301L
+#define h1init  0xEFCDAB89L
+#define h2init  0x98BADCFEL
+#define h3init  0x10325476L
+#define h4init  0xC3D2E1F0L
 
 /* Initialize the SHS values */
 void shsInit(SHS_INFO *shsInfo)
 {
     EVP_MD_CTX_init(&shsInfo->ossl_sha1_ctx );
     EVP_DigestInit_ex(&shsInfo->ossl_sha1_ctx , EVP_sha1(), NULL);
+    shsInfo->digestLen = 0;
+    memset(shsInfo->digestBuf, 0 , sizeof(shsInfo->digestBuf));
 }
 
 /* Update SHS for a block of data */
@@ -22,13 +29,8 @@ void shsUpdate(SHS_INFO *shsInfo, const SHS_BYTE *buffer, unsigned int count)
 
 void shsFinal(SHS_INFO *shsInfo)
 {
-    unsigned char *digest_buf = NULL;
-
-    digest_buf =  (unsigned char *)OPENSSL_malloc( sizeof(shsInfo->digest));
-
-    EVP_DigestFinal_ex(&shsInfo->ossl_sha1_ctx , digest_buf , &shsInfo->digest_len); 
-
-    memcpy(shsInfo->digest, digest_buf, shsInfo->digest_len);
-    OPENSSL_free(digest_buf);
+    EVP_DigestFinal_ex(&shsInfo->ossl_sha1_ctx ,(unsigned char *)shsInfo->digestBuf , &shsInfo->digestLen); 
     EVP_MD_CTX_cleanup(&shsInfo->ossl_sha1_ctx );
 }
+
+
index 66e91b69bba621b42f7cc982acd34db18a1d408d..772c72ac6fd723d6c382215d78e324ef397abe20 100644 (file)
@@ -22,11 +22,9 @@ typedef krb5_ui_4    SHS_LONG;
 /* The structure for storing SHS info */
 
 typedef struct {
-    EVP_MD_CTX ossl_sha1_ctx;
-    unsigned int   digest_len;
-    SHS_LONG digest[ 5 ];            /* Message digest */
-    SHS_LONG countLo, countHi;       /* 64-bit bit count */
-    SHS_LONG data[ 16 ];             /* SHS data buffer */
+    EVP_MD_CTX ossl_sha1_ctx;  
+    unsigned char   digestBuf[SHS_DIGESTSIZE]; /* output */
+    unsigned int    digestLen; /* output */
 } SHS_INFO;
 
 /* Message digest functions (shs.c) */
diff --git a/src/lib/crypto/openssl/yhash.h b/src/lib/crypto/openssl/yhash.h
new file mode 100644 (file)
index 0000000..94c557c
--- /dev/null
@@ -0,0 +1,30 @@
+/* -*- Mode: C; c-file-style: "bsd" -*- */
+/* lib/crypto/openssl/hash/yhash.h
+ */
+
+#ifndef YHASH_H
+#define YHASH_H
+
+/* hash function interface */
+
+/* default to SHA1 for yarrow 160 */
+
+#include "shs.h"
+
+
+#define HASH_CTX SHS_INFO
+#define HASH_Init(x) shsInit(x)
+#define HASH_Update(x, buf, sz) shsUpdate(x, (const void*)buf, sz)
+
+#define HASH_Final(x, tdigest)  do { \
+  int loopvar; \
+  unsigned char *out2 = (void *)(tdigest); \
+  HASH_CTX  *ctx = (x); \
+  shsFinal(ctx); \
+  memcpy(out2, ctx->digestBuf, ctx->digestLen); \
+  } while(0) 
+
+#define HASH_DIGEST_SIZE SHS_DIGESTSIZE
+
+#endif /* YHASH_H */
+