< prev index next >

make/CreateSecurityJars.gmk

Print this page
rev 12525 : 8157561: Ship the unlimited policy files in JDK Updates
Reviewed-by: wetmore, erikj
   1 #
   2 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


 161 
 162   $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
 163 
 164   TARGETS += $(JCE_JAR_UNSIGNED)
 165 endif
 166 
 167 ifndef OPENJDK
 168   JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
 169   $(JCE_JAR_DST): $(JCE_JAR_SRC)
 170         @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
 171         $(install-file)
 172 else
 173   $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
 174         $(install-file)
 175 endif
 176 
 177 TARGETS += $(JCE_JAR_DST)
 178 
 179 ##########################################################################################
 180 
 181 US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar



 182 
 183 ifneq ($(BUILD_CRYPTO), no)
 184 
 185   US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \
 186       $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar
 187   US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \
 188       $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar
 189 
 190   #
 191   # TODO fix so that SetupArchive does not write files into SRCS
 192   # then we don't need this extra copying
 193   #
 194   # NOTE: We currently do not place restrictions on our limited export
 195   # policy. This was not a typo. This means we are shipping the same file
 196   # for both limimted and unlimited US_export_policy.jar.
 197   #
 198   US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
 199   US_EXPORT_POLICY_JAR_TMP := \
 200       $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp
 201 


 203         $(install-file)
 204 
 205   US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
 206 
 207   $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
 208       SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
 209       SUFFIXES := .policy, \
 210       JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
 211       EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
 212       SKIP_METAINF := true))
 213 
 214   $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
 215         $(ECHO) $(LOG_INFO) Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 216         $(install-file)
 217 
 218   TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \
 219       $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
 220 endif
 221 
 222 ifndef OPENJDK
 223   ifeq ($(UNLIMITED_CRYPTO), true)
 224     $(error No prebuilt unlimited crypto jars available)
 225   endif
 226   $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar


 227         $(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
 228         $(install-file)
 229 else
 230   ifeq ($(UNLIMITED_CRYPTO), true)
 231     $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
 232         $(install-file)
 233   else
 234     $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)
 235         $(install-file)
 236   endif
 237 endif
 238 
 239 TARGETS += $(US_EXPORT_POLICY_JAR_DST)
 240 
 241 ##########################################################################################
 242 
 243 LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar



 244 
 245 ifneq ($(BUILD_CRYPTO), no)
 246 
 247   LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \
 248       $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar
 249   LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \
 250       $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar
 251 
 252   #
 253   # TODO fix so that SetupArchive does not write files into SRCS
 254   # then we don't need this extra copying
 255   #
 256   LOCAL_POLICY_JAR_LIMITED_TMP := \
 257       $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp
 258   LOCAL_POLICY_JAR_UNLIMITED_TMP := \
 259       $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp
 260 
 261   $(LOCAL_POLICY_JAR_LIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
 262         $(install-file)
 263 


 276   $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
 277       $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
 278       SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
 279       SUFFIXES := .policy, \
 280       JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \
 281       EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
 282       SKIP_METAINF := true))
 283 
 284   TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
 285 
 286   ifndef OPENJDK
 287     $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt: \
 288         $(JDK_TOPDIR)/make/closed/javax/crypto/doc/README.txt
 289                 $(install-file)
 290 
 291     TARGETS += $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt
 292   endif
 293 endif
 294 
 295 ifndef OPENJDK
 296   $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar



 297         $(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
 298         $(install-file)
 299 else
 300   ifeq ($(UNLIMITED_CRYPTO), true)
 301     $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
 302         $(install-file)
 303   else
 304     $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)
 305         $(install-file)
 306   endif
 307 endif
 308 
 309 TARGETS += $(LOCAL_POLICY_JAR_DST)
 310 
 311 ##########################################################################################
 312 
 313 ifeq ($(OPENJDK_TARGET_OS), windows)
 314 
 315   SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
 316   SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
 317 
 318   $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
 319       SRCS := $(JDK_OUTPUTDIR)/classes_security, \
 320       SUFFIXES := .class, \
 321       INCLUDES := sun/security/mscapi, \
 322       JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
 323       MANIFEST := $(JCE_MANIFEST), \
 324       SKIP_METAINF := true))
 325 
 326   $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
 327 
 328   ifndef OPENJDK
 329     SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar


   1 #
   2 # Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


 161 
 162   $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
 163 
 164   TARGETS += $(JCE_JAR_UNSIGNED)
 165 endif
 166 
 167 ifndef OPENJDK
 168   JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
 169   $(JCE_JAR_DST): $(JCE_JAR_SRC)
 170         @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
 171         $(install-file)
 172 else
 173   $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
 174         $(install-file)
 175 endif
 176 
 177 TARGETS += $(JCE_JAR_DST)
 178 
 179 ##########################################################################################
 180 
 181 US_EXPORT_POLICY_JAR_UNLIMITED_DST := \
 182     $(JDK_OUTPUTDIR)/lib/security/policy/unlimited/US_export_policy.jar
 183 US_EXPORT_POLICY_JAR_LIMITED_DST := \
 184     $(JDK_OUTPUTDIR)/lib/security/policy/limited/US_export_policy.jar
 185 
 186 ifneq ($(BUILD_CRYPTO), no)
 187 
 188   US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \
 189       $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar
 190   US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \
 191       $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar
 192 
 193   #
 194   # TODO fix so that SetupArchive does not write files into SRCS
 195   # then we don't need this extra copying
 196   #
 197   # NOTE: We currently do not place restrictions on our limited export
 198   # policy. This was not a typo. This means we are shipping the same file
 199   # for both limimted and unlimited US_export_policy.jar.
 200   #
 201   US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
 202   US_EXPORT_POLICY_JAR_TMP := \
 203       $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp
 204 


 206         $(install-file)
 207 
 208   US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
 209 
 210   $(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
 211       SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
 212       SUFFIXES := .policy, \
 213       JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
 214       EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
 215       SKIP_METAINF := true))
 216 
 217   $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
 218         $(ECHO) $(LOG_INFO) Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 219         $(install-file)
 220 
 221   TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \
 222       $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
 223 endif
 224 
 225 ifndef OPENJDK
 226   $(US_EXPORT_POLICY_JAR_UNLIMITED_DST): \
 227     $(JDK_TOPDIR)/make/closed/tools/crypto/jce/unlimited/US_export_policy.jar
 228         $(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
 229         $(install-file)
 230   $(US_EXPORT_POLICY_JAR_LIMITED_DST): \
 231     $(JDK_TOPDIR)/make/closed/tools/crypto/jce/limited/US_export_policy.jar
 232         $(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
 233         $(install-file)
 234 else
 235   $(US_EXPORT_POLICY_JAR_UNLIMITED_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)

 236         $(install-file)
 237   $(US_EXPORT_POLICY_JAR_LIMITED_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)

 238         $(install-file)
 239   endif

 240 
 241 TARGETS += $(US_EXPORT_POLICY_JAR_UNLIMITED_DST) $(US_EXPORT_POLICY_JAR_LIMITED_DST)
 242 
 243 ##########################################################################################
 244 
 245 LOCAL_POLICY_JAR_LIMITED_DST := \
 246     $(JDK_OUTPUTDIR)/lib/security/policy/limited/local_policy.jar
 247 LOCAL_POLICY_JAR_UNLIMITED_DST := \
 248     $(JDK_OUTPUTDIR)/lib/security/policy/unlimited/local_policy.jar
 249 
 250 ifneq ($(BUILD_CRYPTO), no)
 251 
 252   LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \
 253       $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar
 254   LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \
 255       $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar
 256 
 257   #
 258   # TODO fix so that SetupArchive does not write files into SRCS
 259   # then we don't need this extra copying
 260   #
 261   LOCAL_POLICY_JAR_LIMITED_TMP := \
 262       $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp
 263   LOCAL_POLICY_JAR_UNLIMITED_TMP := \
 264       $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp
 265 
 266   $(LOCAL_POLICY_JAR_LIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
 267         $(install-file)
 268 


 281   $(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
 282       $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
 283       SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
 284       SUFFIXES := .policy, \
 285       JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \
 286       EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
 287       SKIP_METAINF := true))
 288 
 289   TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
 290 
 291   ifndef OPENJDK
 292     $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt: \
 293         $(JDK_TOPDIR)/make/closed/javax/crypto/doc/README.txt
 294                 $(install-file)
 295 
 296     TARGETS += $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt
 297   endif
 298 endif
 299 
 300 ifndef OPENJDK
 301   $(LOCAL_POLICY_JAR_UNLIMITED_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/unlimited/local_policy.jar
 302         $(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
 303         $(install-file)
 304   $(LOCAL_POLICY_JAR_LIMITED_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/limited/local_policy.jar
 305         $(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
 306         $(install-file)
 307 else
 308   $(LOCAL_POLICY_JAR_UNLIMITED_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)

 309         $(install-file)
 310   $(LOCAL_POLICY_JAR_LIMITED_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)

 311         $(install-file)
 312   endif

 313 
 314 TARGETS += $(LOCAL_POLICY_JAR_UNLIMITED_DST) $(LOCAL_POLICY_JAR_LIMITED_DST)
 315 
 316 ##########################################################################################
 317 
 318 ifeq ($(OPENJDK_TARGET_OS), windows)
 319 
 320   SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
 321   SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
 322 
 323   $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
 324       SRCS := $(JDK_OUTPUTDIR)/classes_security, \
 325       SUFFIXES := .class, \
 326       INCLUDES := sun/security/mscapi, \
 327       JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
 328       MANIFEST := $(JCE_MANIFEST), \
 329       SKIP_METAINF := true))
 330 
 331   $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
 332 
 333   ifndef OPENJDK
 334     SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar


< prev index next >