[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNU Crypto] Native BC build
From: |
Casey Marshall |
Subject: |
[GNU Crypto] Native BC build |
Date: |
Sat, 16 Nov 2002 14:57:27 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've put together a repackaged version of the BouncyCastle JCE library,
with the supporting files necessary for building this as a shared
relocatable library, which can then be used to build all of GNU Crypto
with GCJ.
It should be as simple as `./configure; make; make install':
http://metastatic.org/src/jce-1.15.tar.gz
The attached patch modifies gcj/configure.in and gcj/source/Makefile.am
to optionally build the JCE adapter classes when the configure option
- --with-jce-jar. I didn't check this in yet since I'd like someone else to
I'm also still of the opinion that the CVS sources should not contain
Makefile.in's or configure's. These are fine for releases, but I think
if someone is hacker enough to check out CVS, they should be able to
figure out the extra steps.
Cheers,
- --
Casey Marshall < address@hidden > http://metastatic.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org
iD8DBQE91s1WgAuWMgRGsWsRAqlWAJ9XTX2exf2NmtzfnYYBQ/OdJXhxbQCbBHsx
yMAvG8+wJWZVmg0Dq6A45vs=
=FRkV
-----END PGP SIGNATURE-----
Index: gcj/configure.in
===================================================================
RCS file: /cvsroot/gnu-crypto/gnu-crypto/gcj/configure.in,v
retrieving revision 1.6
diff -u -r1.6 configure.in
--- gcj/configure.in 2 Nov 2002 09:43:56 -0000 1.6
+++ gcj/configure.in 16 Nov 2002 22:47:23 -0000
@@ -18,6 +18,12 @@
[ --with-junit-jar Path to junit.jar.])
dnl --------------------------------------------------------------------------
+dnl JCE classes configuration.
+dnl
+AC_ARG_WITH(jce_jar,
+ [ --with-jce-jar=... Path to JCE classes (javax.crypto) jar.])
+
+dnl --------------------------------------------------------------------------
dnl Check whether or not junit.jar was supplied.
dnl
if test "x$with_junit_jar" != x; then
@@ -31,9 +37,25 @@
fi
dnl --------------------------------------------------------------------------
+dnl Check whether or not a JCE jar was supplied.
+dnl
+if test "x$with_jce_jar" != x; then
+ if test ! -f $with_jce_jar; then
+ AC_MSG_ERROR([Could not find file: $with_jce_jar.])
+ fi
+
+ jce_cp="$with_jce_jar$PATH_SEPARATOR"
+else
+ jce_cp=
+fi
+
+dnl --------------------------------------------------------------------------
dnl JUnit conditional and variable substitution.
dnl
AM_CONDITIONAL(JUNIT, test "x$junit_cp" != x)
AC_SUBST(junit_cp)
+
+AM_CONDITIONAL(HAVE_JCE, test "x$jce_cp" != x)
+AC_SUBST(jce_cp)
AC_OUTPUT(Makefile source/Makefile)
Index: gcj/source/Makefile.am
===================================================================
RCS file: /cvsroot/gnu-crypto/gnu-crypto/gcj/source/Makefile.am,v
retrieving revision 1.12
diff -u -r1.12 Makefile.am
--- gcj/source/Makefile.am 7 Nov 2002 17:30:01 -0000 1.12
+++ gcj/source/Makefile.am 16 Nov 2002 22:47:23 -0000
@@ -49,8 +49,8 @@
#
crypto_jar = gnu-crypto.jar
encoding_flag = --encoding=UTF-8
-AM_JAVACFLAGS = $(encoding_flag) -fCLASSPATH=$(srcdir) -d .
-AM_GCJFLAGS = $(encoding_flag) -fassume-compiled address@hidden@.:$(srcdir)
+AM_JAVACFLAGS = $(encoding_flag) address@hidden@$(srcdir) -d .
+AM_GCJFLAGS = $(encoding_flag) -fassume-compiled
address@hidden@@address@hidden:$(srcdir)
BUILT_SOURCES = $(crypto_jar)
data_DATA = $(crypto_jar)
@@ -74,13 +74,57 @@
junit_tests =
endif
+# Build JCE adapter classes only if we have a JCE installed.
+if HAVE_JCE
+ jce_sources = \
+ gnu/crypto/jce/cipher/AESSpi.java \
+ gnu/crypto/jce/cipher/AnubisSpi.java \
+ gnu/crypto/jce/cipher/BlowfishSpi.java \
+ gnu/crypto/jce/cipher/CipherAdapter.java \
+ gnu/crypto/jce/cipher/KhazadSpi.java \
+ gnu/crypto/jce/cipher/NullCipherSpi.java \
+ gnu/crypto/jce/cipher/RijndaelSpi.java \
+ gnu/crypto/jce/cipher/SerpentBitSliceSpi.java \
+ gnu/crypto/jce/cipher/SerpentSpi.java \
+ gnu/crypto/jce/cipher/SquareSpi.java \
+ gnu/crypto/jce/cipher/TwofishSpi.java \
+ gnu/crypto/jce/mac/HMacMD2Spi.java \
+ gnu/crypto/jce/mac/HMacMD4Spi.java \
+ gnu/crypto/jce/mac/HMacMD5Spi.java \
+ gnu/crypto/jce/mac/HMacRipeMD128Spi.java \
+ gnu/crypto/jce/mac/HMacRipeMD160Spi.java \
+ gnu/crypto/jce/mac/HMacSHA160Spi.java \
+ gnu/crypto/jce/mac/HMacWhirlpoolSpi.java \
+ gnu/crypto/jce/mac/MacAdapter.java \
+ gnu/crypto/jce/mac/TMMH16Spi.java \
+ gnu/crypto/jce/mac/UHash32Spi.java \
+ gnu/crypto/jce/mac/UMac32Spi.java \
+ gnu/crypto/jce/params/BlockCipherParameters.java \
+ gnu/crypto/jce/params/DEREncodingException.java \
+ gnu/crypto/jce/params/DERReader.java \
+ gnu/crypto/jce/params/DERWriter.java \
+ gnu/crypto/jce/spec/BlockCipherParameterSpec.java \
+ gnu/crypto/jce/spec/TMMHParameterSpec.java \
+ gnu/crypto/jce/spec/UMac32ParameterSpec.java
+ jce_junit_sources = \
+ test/jce/TestOfCipher.java \
+ test/jce/TestOfMac.java
+else
+ jce_sources =
+ jce_junit_sources =
+endif
+
lib_LTLIBRARIES = lib-gnu-crypto.la
check_PROGRAMS = $(junit_tests) $(tool_tests)
# #############################################################################
# Crypto library config
#
-lib_gnu_crypto_la_LIBADD =
+if HAVE_JCE
+ lib_gnu_crypto_la_LIBADD = -l-jce
+else
+ lib_gnu_crypto_la_LIBADD =
+endif
lib_gnu_crypto_la_LDFLAGS = -version-info 1:0
lib_gnu_crypto_la_SOURCES = $(crypto_sources)
@@ -173,31 +217,31 @@
gnu/crypto/hash/Sha160.java \
gnu/crypto/hash/Whirlpool.java \
\
- gnu/crypto/jce/DSSKeyPairGeneratorSpi.java \
- gnu/crypto/jce/DSSRawSignatureSpi.java \
gnu/crypto/jce/GnuCrypto.java \
- gnu/crypto/jce/ICMRandomSpi.java \
- gnu/crypto/jce/KeyPairGeneratorAdapter.java \
- gnu/crypto/jce/MD2RandomSpi.java \
- gnu/crypto/jce/MD2Spi.java \
- gnu/crypto/jce/MD4RandomSpi.java \
- gnu/crypto/jce/MD4Spi.java \
- gnu/crypto/jce/MD5RandomSpi.java \
- gnu/crypto/jce/MD5Spi.java \
- gnu/crypto/jce/MessageDigestAdapter.java \
- gnu/crypto/jce/RipeMD128RandomSpi.java \
- gnu/crypto/jce/RipeMD128Spi.java \
- gnu/crypto/jce/RipeMD160RandomSpi.java \
- gnu/crypto/jce/RipeMD160Spi.java \
- gnu/crypto/jce/RSAKeyPairGeneratorSpi.java \
- gnu/crypto/jce/RSAPSSRawSignatureSpi.java \
- gnu/crypto/jce/SecureRandomAdapter.java \
- gnu/crypto/jce/Sha160RandomSpi.java \
- gnu/crypto/jce/Sha160Spi.java \
- gnu/crypto/jce/SignatureAdapter.java \
- gnu/crypto/jce/UMacRandomSpi.java \
- gnu/crypto/jce/WhirlpoolRandomSpi.java \
- gnu/crypto/jce/WhirlpoolSpi.java \
+ gnu/crypto/jce/hash/MD2Spi.java \
+ gnu/crypto/jce/hash/MD4Spi.java \
+ gnu/crypto/jce/hash/MD5Spi.java \
+ gnu/crypto/jce/hash/MessageDigestAdapter.java \
+ gnu/crypto/jce/hash/RipeMD128Spi.java \
+ gnu/crypto/jce/hash/RipeMD160Spi.java \
+ gnu/crypto/jce/hash/Sha160Spi.java \
+ gnu/crypto/jce/hash/WhirlpoolSpi.java \
+ gnu/crypto/jce/prng/ICMRandomSpi.java \
+ gnu/crypto/jce/prng/MD2RandomSpi.java \
+ gnu/crypto/jce/prng/MD4RandomSpi.java \
+ gnu/crypto/jce/prng/MD5RandomSpi.java \
+ gnu/crypto/jce/prng/RipeMD128RandomSpi.java \
+ gnu/crypto/jce/prng/RipeMD160RandomSpi.java \
+ gnu/crypto/jce/prng/SecureRandomAdapter.java \
+ gnu/crypto/jce/prng/Sha160RandomSpi.java \
+ gnu/crypto/jce/prng/UMacRandomSpi.java \
+ gnu/crypto/jce/prng/WhirlpoolRandomSpi.java \
+ gnu/crypto/jce/sig/DSSKeyPairGeneratorSpi.java \
+ gnu/crypto/jce/sig/DSSRawSignatureSpi.java \
+ gnu/crypto/jce/sig/KeyPairGeneratorAdapter.java \
+ gnu/crypto/jce/sig/RSAKeyPairGeneratorSpi.java \
+ gnu/crypto/jce/sig/RSAPSSRawSignatureSpi.java \
+ gnu/crypto/jce/sig/SignatureAdapter.java \
\
gnu/crypto/mac/BaseMac.java \
gnu/crypto/mac/HMac.java \
@@ -259,7 +303,8 @@
\
gnu/crypto/util/Prime.java \
gnu/crypto/util/PRNG.java \
- gnu/crypto/util/Util.java
+ gnu/crypto/util/Util.java \
+ $(jce_sources)
junit_test_sources = \
test/AllTests.java \
@@ -327,7 +372,8 @@
test/sig/rsa/AllTests.java \
test/sig/rsa/TestOfRSACodec.java \
test/sig/rsa/TestOfRSAKeyGeneration.java \
- test/sig/rsa/TestOfRSAPSSSignature.java
+ test/sig/rsa/TestOfRSAPSSSignature.java \
+ $(jce_junit_sources)
# #############################################################################
# .class files
- [GNU Crypto] Native BC build,
Casey Marshall <=