Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
084466ba
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
084466ba
编写于
10月 23, 2012
作者:
W
wetmore
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7197071: Makefiles for various security providers aren't including the default manifest
Reviewed-by: valeriep, mullan, katleman
上级
79f108cb
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
133 addition
and
10 deletion
+133
-10
make/com/oracle/security/ucrypto/Makefile
make/com/oracle/security/ucrypto/Makefile
+2
-2
make/javax/crypto/Defs-jce.gmk
make/javax/crypto/Defs-jce.gmk
+2
-2
make/sun/security/ec/Makefile
make/sun/security/ec/Makefile
+2
-2
make/sun/security/mscapi/Makefile
make/sun/security/mscapi/Makefile
+2
-2
make/sun/security/pkcs11/Makefile
make/sun/security/pkcs11/Makefile
+2
-2
test/javax/crypto/sanity/CheckManifestForRelease.java
test/javax/crypto/sanity/CheckManifestForRelease.java
+123
-0
未找到文件。
make/com/oracle/security/ucrypto/Makefile
浏览文件 @
084466ba
...
...
@@ -198,9 +198,9 @@ ifndef OPENJDK
#
# Build ucrypto.jar.
#
$(UNSIGNED_DIR)/ucrypto.jar
:
build
$(UNSIGNED_DIR)/ucrypto.jar
:
build
$(JCE_MANIFEST_FILE)
$
(
prep-target
)
$(BOOT_JAR_CMD)
c
f
$@
$(JAR_DIRS)
\
$(BOOT_JAR_CMD)
c
mf
$(JCE_MANIFEST_FILE)
$@
$(JAR_DIRS)
\
$(BOOT_JAR_JFLAGS)
@
$
(
java-vm-cleanup
)
...
...
make/javax/crypto/Defs-jce.gmk
浏览文件 @
084466ba
#
# Copyright (c) 2007, 201
1
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 201
2
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -31,7 +31,7 @@ include $(BUILDDIR)/common/Release.gmk
JCE_MANIFEST_FILE = $(TEMPDIR)/manifest.mf
$(JCE_MANIFEST_FILE): $(MAINMANIFEST)
$(prep-target)
$(SED) -e "s#@@RELEASE@@#$(
RELEASE)#"
\
$(SED) -e "s#@@RELEASE@@#$(
JDK_VERSION)#"
\
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
$(MAINMANIFEST) >> $@
$(ECHO) "Extension-Name: javax.crypto" >> $@
...
...
make/sun/security/ec/Makefile
浏览文件 @
084466ba
...
...
@@ -246,9 +246,9 @@ build-jar: $(UNSIGNED_DIR)/sunec.jar
#
# Build sunec.jar.
#
$(UNSIGNED_DIR)/sunec.jar
:
build
$(UNSIGNED_DIR)/sunec.jar
:
build
$(JCE_MANIFEST_FILE)
$
(
prep-target
)
$(BOOT_JAR_CMD)
c
f
$@
$(JAR_DIRS)
\
$(BOOT_JAR_CMD)
c
mf
$(JCE_MANIFEST_FILE)
$@
$(JAR_DIRS)
\
$(BOOT_JAR_JFLAGS)
@
$
(
java-vm-cleanup
)
...
...
make/sun/security/mscapi/Makefile
浏览文件 @
084466ba
...
...
@@ -209,9 +209,9 @@ build-jar: $(UNSIGNED_DIR)/sunmscapi.jar
#
# Build sunmscapi.jar.
#
$(UNSIGNED_DIR)/sunmscapi.jar
:
build
$(UNSIGNED_DIR)/sunmscapi.jar
:
build
$(JCE_MANIFEST_FILE)
$
(
prep-target
)
$(BOOT_JAR_CMD)
c
f
$@
$(JAR_DIRS)
\
$(BOOT_JAR_CMD)
c
mf
$(JCE_MANIFEST_FILE)
$@
$(JAR_DIRS)
\
$(BOOT_JAR_JFLAGS)
@
$
(
java-vm-cleanup
)
...
...
make/sun/security/pkcs11/Makefile
浏览文件 @
084466ba
...
...
@@ -225,9 +225,9 @@ build-jar: $(UNSIGNED_DIR)/sunpkcs11.jar
#
# Build sunpkcs11.jar.
#
$(UNSIGNED_DIR)/sunpkcs11.jar
:
build
$(UNSIGNED_DIR)/sunpkcs11.jar
:
build
$(JCE_MANIFEST_FILE)
$
(
prep-target
)
$(BOOT_JAR_CMD)
c
f
$@
$(JAR_DIRS)
\
$(BOOT_JAR_CMD)
c
mf
$(JCE_MANIFEST_FILE)
$@
$(JAR_DIRS)
\
$(BOOT_JAR_JFLAGS)
@
$
(
java-vm-cleanup
)
...
...
test/javax/crypto/sanity/CheckManifestForRelease.java
0 → 100644
浏览文件 @
084466ba
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 7197071
* @summary Makefiles for various security providers aren't including
* the default manifest.
*/
import
java.net.*
;
import
java.io.*
;
/**
* When the Java specification version is incremented, all of the providers
* must be recompiled with the proper implementation version to match.
*/
public
class
CheckManifestForRelease
{
/**
* @param args the command line arguments
*/
public
static
void
main
(
String
[]
args
)
throws
Exception
{
checkFileManifests
();
}
/*
* Iterate over the files of interest: JCE framework and providers
*/
static
private
void
checkFileManifests
()
throws
Exception
{
System
.
out
.
println
(
"============="
);
String
libDirName
=
System
.
getProperty
(
"java.home"
,
"."
)
+
"/lib"
;
String
extDirName
=
libDirName
+
"/ext"
;
System
.
out
.
println
(
"Checking Manifest in directory: \n "
+
extDirName
);
/*
* Current list of JCE providers, all of which currently live in
* the extensions directory. Add if more are created.
*/
String
[]
providers
=
new
String
[]{
"sunjce_provider.jar"
,
"sunec.jar"
,
"sunmscapi.jar"
,
"sunpkcs11.jar"
,
"ucrypto.jar"
};
checkManifest
(
libDirName
,
"jce.jar"
);
for
(
String
provider
:
providers
)
{
checkManifest
(
extDirName
,
provider
);
}
System
.
out
.
println
(
"Passed."
);
}
// Helper method to format the URL properly.
static
private
String
formatURL
(
String
dir
,
String
file
)
{
return
"jar:file:///"
+
dir
+
"/"
+
file
+
"!/"
;
}
static
private
String
specVersion
=
System
.
getProperty
(
"java.specification.version"
);
/*
* Test the root cause, which is that there were no manifest values
* for many of the providers, and for those that had them, there was
* no test to make sure that the impl version was appropriate for
* the spec version.
*/
static
private
void
checkManifest
(
String
dir
,
String
file
)
throws
Exception
{
System
.
out
.
println
(
"Checking: "
+
file
);
String
url
=
formatURL
(
dir
,
file
);
JarURLConnection
urlc
=
(
JarURLConnection
)
(
new
URL
(
url
).
openConnection
());
String
implVersion
;
try
{
implVersion
=
urlc
.
getManifest
().
getMainAttributes
().
getValue
(
"Implementation-Version"
);
}
catch
(
FileNotFoundException
e
)
{
/*
* If the file doesn't exist (e.g. mscapi on solaris),
* skip it. If there are other problems, fail out.
*/
System
.
out
.
println
(
" "
+
file
+
" not found, skipping..."
);
return
;
}
if
(
implVersion
==
null
)
{
throw
new
Exception
(
"Implementation-Version not found in Manifest"
);
}
if
(!
implVersion
.
startsWith
(
specVersion
))
{
throw
new
Exception
(
"Implementation-Version does not match "
+
"Specification-Version"
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录