You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/03/30 13:21:53 UTC

svn commit: r390087 - in /incubator/harmony/enhanced/classlib/trunk: make/ modules/crypto/ modules/crypto/META-INF/ modules/crypto/make/ modules/crypto/make/common/ modules/crypto/src/ modules/crypto/src/main/ modules/crypto/src/main/java/ modules/cryp...

Author: tellison
Date: Thu Mar 30 03:21:47 2006
New Revision: 390087

URL: http://svn.apache.org/viewcvs?rev=390087&view=rev
Log:
Apply patch HARMONY-279 (Extract crypto component from security module)

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/META-INF/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/META-INF/MANIFEST.MF
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/hyproperties.xml
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/java/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/java/javax/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/java/javax/crypto/
      - copied from r389571, incubator/harmony/enhanced/classlib/trunk/modules/security/src/common/javasrc/javax/crypto/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/java/org/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/java/org/apache/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/java/org/apache/harmony/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/java/org/apache/harmony/security/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/java/org/apache/harmony/security/x/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/main/java/org/apache/harmony/security/x/crypto/
      - copied from r389571, incubator/harmony/enhanced/classlib/trunk/modules/security/src/common/javasrc/org/apache/harmony/security/x/crypto/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/java/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/java/javax/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/java/javax/crypto/
      - copied from r389571, incubator/harmony/enhanced/classlib/trunk/modules/security/test/common/unit/javax/crypto/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/java/org/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/java/org/apache/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/java/org/apache/harmony/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/java/org/apache/harmony/security/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/java/org/apache/harmony/security/x/
    incubator/harmony/enhanced/classlib/trunk/modules/crypto/src/test/java/org/apache/harmony/security/x/crypto/
      - copied from r389571, incubator/harmony/enhanced/classlib/trunk/modules/security/test/common/unit/org/apache/harmony/security/x/crypto/
Removed:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/common/javasrc/javax/crypto/
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/common/javasrc/org/apache/harmony/security/x/crypto/
    incubator/harmony/enhanced/classlib/trunk/modules/security/test/common/unit/javax/crypto/
    incubator/harmony/enhanced/classlib/trunk/modules/security/test/common/unit/org/apache/harmony/security/x/crypto/
Modified:
    incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
    incubator/harmony/enhanced/classlib/trunk/make/build-test.xml
    incubator/harmony/enhanced/classlib/trunk/modules/security/   (props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/security/META-INF/MANIFEST.MF

Modified: incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/build-java.xml?rev=390087&r1=390086&r2=390087&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-java.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-java.xml Thu Mar 30 03:21:47 2006
@@ -166,7 +166,8 @@
         </jar>
 
         <!-- Create crypto jar -->
-        <jar destfile="${components.output}/crypto.jar">  <!-- TODO: manifest -->
+        <jar destfile="${components.output}/crypto.jar"
+        	manifest="modules/crypto/META-INF/MANIFEST.MF">
             <fileset dir="${build.output}"
                 includesfile="${components.patternsets}/crypto.txt"
                 excludesfile="${components.patternsets}/kernel.txt" />
@@ -250,6 +251,7 @@
             <src path="modules/applet/src/main/java" />
             <src path="modules/awt/src/main/java" />
             <src path="modules/beans/src/main/java" />
+            <src path="modules/crypto/src/main/java" />
             <src path="modules/kernel/src/main/java" />
             <src path="modules/regex/src/main/java" />
             <src path="modules/math/src/main/java" />
@@ -303,6 +305,9 @@
                 <exclude name="**/*.java" />
             </fileset>
             <fileset dir="modules/beans/src/main/java">
+                <exclude name="**/*.java" />
+            </fileset>
+            <fileset dir="modules/crypto/src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
             <fileset dir="modules/luni/src/main/java">

Modified: incubator/harmony/enhanced/classlib/trunk/make/build-test.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/build-test.xml?rev=390087&r1=390086&r2=390087&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-test.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-test.xml Thu Mar 30 03:21:47 2006
@@ -76,6 +76,15 @@
 
 	</target>
 
+	<target name="test-crypto" depends="compile-support">
+        <echo message="=================================="/>
+        <echo message="Running tests for module crypto"/>
+        <echo message="=================================="/>
+
+        <ant antfile="make/build.xml" dir="modules/crypto" target="test" />
+
+	</target>
+
 	<target name="test-text" depends="compile-support">
         <echo message="=================================="/>
         <echo message="Running tests for module text"/>

Added: incubator/harmony/enhanced/classlib/trunk/modules/crypto/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/crypto/META-INF/MANIFEST.MF?rev=390087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/crypto/META-INF/MANIFEST.MF (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/crypto/META-INF/MANIFEST.MF Thu Mar 30 03:21:47 2006
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Harmony Crypto
+Bundle-SymbolicName: org.apache.harmony.crypto
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Eclipse-JREBundle: true
+Import-Package: org.apache.harmony.security.asn1,
+ org.apache.harmony.security.fortress,
+ org.apache.harmony.security.x509,
+ java.io,
+ java.lang,
+ java.math,
+ java.nio,
+ java.security,
+ java.security.cert,
+ java.security.spec,
+ java.util,
+Export-Package: javax.crypto,
+ javax.crypto.interfaces,
+ javax.crypto.spec

Added: incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/build.xml?rev=390087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/build.xml Thu Mar 30 03:21:47 2006
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project name="CRYPTO Build" default="build" basedir="..">
+	<description>Build for CRYPTO component</description>
+
+	<!-- set global properties for this build. -->
+	<xmlproperty file="make/common/hyproperties.xml" semanticAttributes="true"/>
+	<property environment="env"/>
+
+	<!-- Determine the (normalized) operating system family -->
+	<condition property="if.win">
+		<os family="Windows" />
+	</condition>
+	<condition property="hy.os_family" value="windows">
+		<isset property="if.win"/>
+	</condition>
+
+	<condition property="if.linux">
+		<and>
+			<os name="linux" />
+			<os family="unix" />
+		</and>
+	</condition>
+	<condition property="hy.os_family" value="linux">
+		<isset property="if.linux"/>
+	</condition>
+
+
+	<!-- Determine the (normalized) processor family -->
+	<condition property="if.x86_64">
+		<contains string="${os.arch}" substring="x86_64"/>
+	</condition>
+	<condition property="hy.cpu_family" value="x86_64">
+		<isset property="if.x86_64"/>
+	</condition>
+	
+	<condition property="if.x86">
+		<and>
+			<contains string="${os.arch}" substring="86"/>
+			<not>
+				<isset property="if.x86_64"/>
+			</not>
+		</and>
+	</condition>
+	<condition property="hy.cpu_family" value="x86">
+		<isset property="if.x86"/>
+	</condition>
+	
+	<condition property="if.ipf">
+		<contains string="${os.arch}" substring="ia64"/>
+	</condition>
+	<condition property="hy.cpu_family" value="ipf">
+		<isset property="if.ipf"/>
+	</condition>
+
+	<!-- Define the platform property dependant upon the OS and platform -->
+	<property name="hy.platform" value="${hy.os_family}.${hy.cpu_family}"/>
+
+	<!-- Set the java compiler to be the Eclipse Java compiler -->
+	<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
+
+
+	<target name="init">
+		<tstamp>
+			<format property="build-date" pattern="yyyyMMdd" locale="en" />
+		</tstamp>
+		<tstamp>
+			<format property="build-time" pattern="yyyyMMdd_HHmm" />
+		</tstamp>
+		<echo message="build-date=${build-date}" />
+		<echo message="build-time=${build-time}" />
+		<echo message="on platform=${os.name} version=${os.version} arch=${os.arch}" />
+
+		<property name="java.debug.option" value="on" />
+		<property name="native.debug.option" value="on" />
+
+		<property name="source.ver" value="1.4" />
+	</target>
+	
+	<!-- CRYPTO TARGETS -->
+
+	<target name="build" depends="init">
+		<ant dir="make/common" target="compile.java" />
+		<ant dir="make/common" target="build.jar" />
+		<ant dir="make/common" target="copy.resources" />
+	</target>
+
+
+	<target name="test" depends="build">
+		<ant dir="make/common" target="compile.tests" />
+		<ant dir="make/common" target="run.tests" />
+	</target>
+
+	<target name="clean">
+		<delete dir="${hy.crypto.bin.main}"/>
+		<delete dir="${hy.crypto.bin.test}"/>
+	</target>
+
+</project>

Added: incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/build.xml?rev=390087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/build.xml Thu Mar 30 03:21:47 2006
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project name="Common_CRYPTO_Build">
+	
+	<target name="compile.java" description="Compile CRYPTO java code">
+		<echo message="Compiling CRYPTO classes from ${hy.crypto.src.main.java}" />
+		
+		<mkdir dir="${hy.crypto.bin.main}" />
+
+		<javac sourcepath=""
+			srcdir="${hy.crypto.src.main.java}"
+			destdir="${hy.crypto.bin.main}"
+			source="${source.ver}"
+			debug="${java.debug.option}">
+
+			<bootclasspath>
+				<fileset dir="${hy.target}/jre/lib/boot">
+					<include name="*.jar" />
+				</fileset>
+			</bootclasspath>
+		</javac>
+	</target>
+	
+	<target name="build.jar">
+		<jar destfile="${hy.target}/jre/lib/boot/${hy.crypto.packaging.jarname}.jar"
+			manifest="${hy.crypto}/META-INF/MANIFEST.MF">
+			<fileset dir="${hy.crypto.bin.main}" />
+		</jar>
+	</target>
+
+	
+	<target name="compile.tests">
+		<echo message="Compiling CRYPTO tests from ${hy.crypto.src.test.java}" />
+
+		<mkdir dir="${hy.crypto.bin.test}" />
+
+		<javac 	destdir="${hy.crypto.bin.test}"
+			source="${source.ver}"
+			debug="${java.debug.option}">
+
+                    <!-- FIXME: CRYPTO tests should not reach into security module code -->
+                    <src>
+                        <pathelement location="${hy.crypto.src.test.java}"/>
+                        <pathelement location="${hy.crypto}/../security/test/common/unit"/>
+                    </src>
+
+                    <include name="javax/crypto/**/*Test*.java" />
+                    <include name="org/apache/harmony/security/test/**/*" />
+                    <exclude name="**/SecurityTest.java"/>
+
+                    <bootclasspath>
+                        <fileset dir="${hy.target}/jre/lib/boot">
+                            <include name="*.jar" />
+                        </fileset>
+                    </bootclasspath>
+		</javac>
+	</target>
+
+
+	<target name="run.tests">
+		
+	        <mkdir dir="${hy.tests.reports}" />
+
+	        <junit fork="yes"
+			forkmode="once"
+			printsummary="withOutAndErr"
+			errorproperty="test.error"
+			showoutput="on"
+			dir="${hy.crypto.bin.test}"
+			jvm="${hy.target}/jre/bin/java">
+
+			<jvmarg value="-showversion"/>
+	        
+			<!-- Required for running the serialization unit tests -->
+			<!-- Note: will be deleted after improving             -->
+			<!-- SerializationTest support class: all resource     -->
+			<!-- files will be placed on the classpath             -->
+			<jvmarg value="-DTEST_SRC_DIR=${hy.crypto.src.test.java}"/>
+
+			<env key="JAVA_HOME" value="${hy.target}/jre"/>
+
+			<!-- to pick up junit.jar               -->
+			<!-- FIXME: package access tests and    -->
+			<!-- public API tests must be separated -->
+			<jvmarg value="-Xbootclasspath/a:${hy.crypto.bin.test}${path.separator}${env.CLASSPATH}"/>
+
+			<formatter type="xml" />
+
+			<batchtest todir="${hy.tests.reports}" haltonfailure="no">
+				<fileset dir="${hy.crypto.src.test.java}">
+					<include name="**/*Test.java"/>
+				</fileset>
+			</batchtest>
+		</junit>
+	</target>
+	
+	
+	<target name="copy.resources">
+		<!-- Nothing for CRYPTO -->
+	</target>
+</project>
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/hyproperties.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/hyproperties.xml?rev=390087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/hyproperties.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/crypto/make/common/hyproperties.xml Thu Mar 30 03:21:47 2006
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<hy>
+   <crypto location=".">
+      <src>
+         <main>
+            <java location="src/main/java" />
+        	<resources location="src/main/resources" />
+         </main>
+         <test>
+            <java location="src/test/java" />
+            <resources location="src/main/resources" />
+         </test>
+         <natives location="src/natives" />
+      </src>
+      <bin>
+        <main location="bin/main" />
+        <test location="bin/test" />
+      </bin>
+      <packaging>
+        <jarname>crypto</jarname>
+      </packaging>
+   </crypto>
+
+   <target location="../../deploy" />
+
+   <tests>
+      <reports location="../../build/test_report" />
+   </tests>
+</hy>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Mar 30 03:21:47 2006
@@ -1,2 +1 @@
-build
 bin

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/security/META-INF/MANIFEST.MF?rev=390087&r1=390086&r2=390087&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/META-INF/MANIFEST.MF (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/META-INF/MANIFEST.MF Thu Mar 30 03:21:47 2006
@@ -15,6 +15,7 @@
  java.text,
  java.util,
  java.util.zip
+ org.apache.harmony.security.x.crypto.utils
 Export-Package: java.security,
  java.security.acl,
  java.security.cert,
@@ -29,5 +30,7 @@
  javax.security.cert,
  javax.security.sasl,
  org.ietf.jgss,
+ org.apache.harmony.security.asn1;version="1.0.0",
+ org.apache.harmony.security.x509;version="1.0.0",
  org.apache.harmony.security.utils;version="1.0.0";x-friends:="org.apache.harmony.archive,org.apache.harmony.luni",
  org.apache.harmony.security.fortress;version="1.0.0"