makefiles/CreateJars.gmk

Print this page

        

@@ -133,13 +133,11 @@
 
 # Full JRE exclude list for rt.jar and resources.jar
 # This value should exclude types destined for jars other than rt.jar and resources.jar. 
 # When building a Profile this value augments the profile specific exclusions
 RT_JAR_EXCLUDES += \
-        com/oracle/security \
         com/sun/codemodel \
-        com/sun/crypto/provider \
         com/sun/istack/internal/tools \
         com/sun/jarsigner \
         com/sun/java/accessibility \
         com/sun/javadoc \
         com/sun/jdi \

@@ -215,26 +213,10 @@
         sun/awt/motif/X11KSC5601\$$$$Encoder.class \
         sun/jvmstat \
         sun/net/spi/nameservice/dns \
         sun/nio/cs/ext \
         sun/rmi/rmic \
-        sun/security/ec/ECDHKeyAgreement.class \
-        sun/security/ec/ECDSASignature.class \
-        sun/security/ec/ECDSASignature\$$$$Raw.class \
-        sun/security/ec/ECDSASignature\$$$$SHA1.class \
-        sun/security/ec/ECDSASignature\$$$$SHA224.class \
-        sun/security/ec/ECDSASignature\$$$$SHA256.class \
-        sun/security/ec/ECDSASignature\$$$$SHA384.class \
-        sun/security/ec/ECDSASignature\$$$$SHA512.class \
-        sun/security/ec/ECKeyFactory.class \
-        sun/security/ec/ECKeyPairGenerator.class \
-        sun/security/ec/SunEC\$$$$1.class \
-        sun/security/ec/SunEC.class \
-        sun/security/ec/SunECEntries.class \
-        sun/security/internal \
-        sun/security/mscapi \
-        sun/security/pkcs11 \
         sun/security/provider/Sun.class \
         sun/security/rsa/SunRsaSign.class \
         sun/security/ssl \
         sun/security/tools/jarsigner \
         sun/swing/BeanInfoUtils.class \

@@ -462,85 +444,10 @@
                 SKIP_METAINF:=true,\
                 MANIFEST:=$(MAINMANIFEST), \
                 CHECK_COMPRESS_JAR:=true))
 
 ##########################################################################################
-# Create manifest for security jars
-
-#
-# Include these extra attributes for now, should probably take out.
-#
-JCE_MANIFEST := $(IMAGES_OUTPUTDIR)/lib/_the.security.manifest.mf
-$(JCE_MANIFEST): $(MAINMANIFEST)
-        $(MKDIR) -p $(@D)
-        $(RM) $@ $@.tmp
-        $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#"       \
-               -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
-               $(MAINMANIFEST) >> $@.tmp
-        $(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
-        $(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
-        $(MV) $@.tmp $@
-
-##########################################################################################
-# For all security jars, always build the jar, but for closed, install the prebuilt signed
-# version instead of the newly built jar. Unsigned jars are treated as intermediate targets
-# and explicitly added to the JARS list. For open, signing is not needed. See SignJars.gmk
-# for more information.
-
-SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
-SUNPKCS11_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunpkcs11.jar
-
-$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,,\
-        SRCS:=$(JDK_OUTPUTDIR)/classes, \
-        SUFFIXES:=.class,\
-        INCLUDES:=sun/security/pkcs11,\
-        JAR:=$(SUNPKCS11_JAR_UNSIGNED), \
-        MANIFEST:=$(JCE_MANIFEST), \
-        SKIP_METAINF := true))
-
-$(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
-
-ifndef OPENJDK
-    SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
-    $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
-        @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
-        $(install-file)
-else
-    $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_UNSIGNED)
-        $(install-file)
-endif
-
-JARS += $(SUNPKCS11_JAR_UNSIGNED)
-
-##########################################################################################
-
-SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar
-SUNEC_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunec.jar
-
-$(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
-                SRCS:=$(JDK_OUTPUTDIR)/classes, \
-                SUFFIXES:=.class,\
-                INCLUDES:=sun/security/ec,\
-                JAR:=$(SUNEC_JAR_UNSIGNED), \
-                MANIFEST:=$(JCE_MANIFEST), \
-                SKIP_METAINF := true))
-
-$(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
-
-ifndef OPENJDK
-    SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
-    $(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
-        @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
-        $(install-file)
-else
-    $(SUNEC_JAR_DST) : $(SUNEC_JAR_UNSIGNED)
-        $(install-file)
-endif
-
-JARS += $(SUNEC_JAR_UNSIGNED)
-
-##########################################################################################
 
 $(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,,\
                 SRCS:=$(JDK_OUTPUTDIR)/classes,\
                 SUFFIXES:=BeanInfo.class .gif,\
                 INCLUDES:=javax/swing sun/swing,\

@@ -549,204 +456,10 @@
                 JAR:=$(IMAGES_OUTPUTDIR)/lib/dt.jar,\
                 SKIP_METAINF:=true))
 
 ##########################################################################################
 
-SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
-SUNJCE_PROVIDER_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunjce_provider.jar
-
-$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
-                SRCS:=$(JDK_OUTPUTDIR)/classes, \
-                SUFFIXES:=.class,\
-                INCLUDES:= com/sun/crypto/provider,\
-                JAR:=$(SUNJCE_PROVIDER_JAR_UNSIGNED), \
-                MANIFEST:=$(JCE_MANIFEST), \
-                SKIP_METAINF := true))
-
-$(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
-
-ifndef OPENJDK
-    SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
-    $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_SRC)
-        @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
-        $(install-file)
-else
-    $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_UNSIGNED)
-        $(install-file)
-endif
-
-JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
-
-##########################################################################################
-
-JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
-JCE_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/jce.jar
-
-$(eval $(call SetupArchive,BUILD_JCE_JAR,,\
-                SRCS:=$(JDK_OUTPUTDIR)/classes, \
-                SUFFIXES:=.class,\
-                INCLUDES:= javax/crypto sun/security/internal,\
-                JAR:=$(JCE_JAR_UNSIGNED), \
-                MANIFEST:=$(JCE_MANIFEST), \
-                SKIP_METAINF := true))
-
-$(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
-
-ifndef OPENJDK
-    JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
-    $(JCE_JAR_DST) : $(JCE_JAR_SRC)
-        @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
-        $(install-file)
-else
-    $(JCE_JAR_DST) : $(JCE_JAR_UNSIGNED)
-        $(install-file)
-endif
-
-JARS +=  $(JCE_JAR_UNSIGNED)
-
-##########################################################################################
-
-US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
-US_EXPORT_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/US_export_policy.jar
-
-#
-# TODO fix so that SetupArchive does not write files into SRCS
-#   then we don't need this extra copying
-#
-# NOTE:  We currently do not place restrictions on our limited export
-# policy.  This was not a typo.
-#
-US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
-US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
-
-$(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
-        $(install-file)
-
-US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
-
-$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
-                SRCS:=$(US_EXPORT_POLICY_JAR_TMP), \
-                SUFFIXES:= .policy,\
-                JAR:=$(US_EXPORT_POLICY_JAR_UNSIGNED), \
-                EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
-                SKIP_METAINF := true))
-
-ifndef OPENJDK
-    $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
-        $(ECHO) $(LOG_INFO) Copying $(@F)
-        $(install-file)
-else
-    $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED)
-        $(install-file)
-endif
-
-JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED)
-
-##########################################################################################
-
-LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
-LOCAL_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/local_policy.jar
-
-#
-# TODO fix so that SetupArchive does not write files into SRCS
-#   then we don't need this extra copying
-#
-LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
-
-ifeq ($(UNLIMITED_CRYPTO), true)
-    LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
-    LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
-    LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
-else
-    LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
-    LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
-                             $(LOCAL_POLICY_JAR_TMP)/default_local.policy
-    LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
-endif
-
-$(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
-        $(install-file)
-
-$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
-                SRCS:=$(LOCAL_POLICY_JAR_TMP),\
-                SUFFIXES:= .policy,\
-                JAR:=$(LOCAL_POLICY_JAR_UNSIGNED), \
-                EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
-                SKIP_METAINF := true))
-
-ifndef OPENJDK
-    $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
-        $(ECHO) $(LOG_INFO) Copying $(@F)
-        $(install-file)
-else
-    $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED)
-        $(install-file)
-endif
-
-JARS += $(LOCAL_POLICY_JAR_UNSIGNED)
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS),windows)
-
-SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
-SUNMSCAPI_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunmscapi.jar
-
-$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,,\
-                SRCS:=$(JDK_OUTPUTDIR)/classes, \
-                SUFFIXES:=.class,\
-                INCLUDES:= sun/security/mscapi,\
-                JAR:=$(SUNMSCAPI_JAR_UNSIGNED), \
-                MANIFEST:=$(JCE_MANIFEST), \
-                SKIP_METAINF:=true))
-
-$(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
-
-ifndef OPENJDK
-    SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
-    $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_SRC)
-        @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
-        $(install-file)
-else
-    $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_UNSIGNED)
-        $(install-file)
-endif
-
-JARS += $(SUNMSCAPI_JAR_UNSIGNED)
-
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-ifndef OPENJDK
-
-UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
-UCRYPTO_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/ucrypto.jar
-UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
-
-$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR,,\
-                SRCS:=$(JDK_OUTPUTDIR)/classes, \
-                SUFFIXES:=.class,\
-                INCLUDES:=com/oracle/security/ucrypto,\
-                JAR:=$(UCRYPTO_JAR_UNSIGNED), \
-                MANIFEST:=$(JCE_MANIFEST), \
-                SKIP_METAINF:=true))
-
-$(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
-
-$(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC)
-        @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
-        $(install-file)
-
-JARS += $(UCRYPTO_JAR_UNSIGNED) 
-
-endif
-endif
-
-##########################################################################################
-
 # Get the CLDRVERSION
 include GensrcCLDR.gmk
 
 CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
 

@@ -1106,10 +819,17 @@
     JARS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
 endif
 
 ##########################################################################################
 
+# This rule copies all jars from jdk/lib/... to images/lib/... to avoid having to track 
+# which jars are where
+$(IMAGES_OUTPUTDIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
+        $(install-file)
+
+##########################################################################################
+
 # Import nashorn.jar from nashorn dist dir.
 $(IMAGES_OUTPUTDIR)/lib/ext/nashorn.jar: $(NASHORN_DIST)/nashorn.jar
         $(install-file)
 
 ##########################################################################################