author | weijun |
Thu, 18 Jul 2019 08:53:06 +0800 | |
changeset 57488 | 94691d8e746f |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
1 |
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
2 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
3 |
# |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
4 |
# This code is free software; you can redistribute it and/or modify it |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
5 |
# under the terms of the GNU General Public License version 2 only, as |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
6 |
# published by the Free Software Foundation. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
7 |
# |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
8 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
9 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
10 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
11 |
# version 2 for more details (a copy is included in the LICENSE file that |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
12 |
# accompanied this code). |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
13 |
# |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
14 |
# You should have received a copy of the GNU General Public License version |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
15 |
# 2 along with this work; if not, write to the Free Software Foundation, |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
16 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
17 |
# |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
18 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
19 |
# or visit www.oracle.com if you need additional information or have any |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
20 |
# questions. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
21 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
22 |
##### Summary ##### |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
23 |
This test is used to verify the compatibility on jarsigner cross different JDK |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
24 |
releases. It also can be used to check jar signing (w/ and w/o TSA) and verifying |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
25 |
on some specific key algorithms and digest algorithms. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
26 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
27 |
##### Output ##### |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
28 |
The test will generate a report, at JTwork/scratch/report.html, to display the |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
29 |
key parameters for signing and the status of signing and verifying. And it will |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
30 |
generate another report, at JTwork/scratch/failedReport.html, to collect all of |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
31 |
failed cases. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
32 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
33 |
Please note that, the test may output a great deal of logs if the jdk list and |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
34 |
TSA list are big, and that would lead to jtreg output overflow. So, it redirects |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
35 |
stdout and stderr to file JTwork/scratch/details.out. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
36 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
37 |
##### Report Columns ##### |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
38 |
|
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
39 |
Jarfile |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
40 |
The filenames used in the tests |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
41 |
|
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
42 |
Certificate |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
43 |
Certificate identifier. The identifier consists of specific attributes of |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
44 |
the certificate. Generally, the naming convention is: |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
45 |
KeyAlgorithm_DigestAlgorithm_[KeySize][_Expired] |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
46 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
47 |
Signer JDK |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
48 |
The JDK version that signs jar. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
49 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
50 |
Signature Algorithm |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
51 |
The signature algorithm used to sign the key as in 'keytool -sigalg'. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
52 |
|
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
53 |
Note: The values displayed in this column are specified to jarsigner only |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
54 |
in case a test does not work with a default value. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
55 |
In any case the specified value or expected default value is compared in |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
56 |
verifying phase against jarsigner's output and the test fails if it does |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
57 |
not match. |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
58 |
|
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
59 |
Jar Digest Algorithm |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
60 |
The digest algorithm used to digest the files contained in the JAR file and |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
61 |
the manifest and signature files as in 'jarsigner -digestalg'. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
62 |
See also note above about default values for Signature Algorithm. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
63 |
|
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
64 |
TSA Digest Algorithm |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
65 |
The timestamp digest algorithm used by TSA as in 'jarsigner -tsadigestalg'. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
66 |
Shows no value if no TSA used. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
67 |
See also note above about default values for Signature Algorithm. |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
68 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
69 |
TSA |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
70 |
TSA URL index. All of TSA URLs and their indices can be found at the top |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
71 |
of this report. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
72 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
73 |
Signing Status |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
74 |
Signing process result status. The status are the followings: |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
75 |
[1]NONE, no action. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
76 |
[2]NORMAL, no any error and warning. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
77 |
[3]WARNING, no any error but some warnings raise. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
78 |
[4]ERROR, some errors raise. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
79 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
80 |
Verifier JDK |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
81 |
The JDK version that verifies signed jars. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
82 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
83 |
Verifying Status |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
84 |
Verifying process result status. The status are the same as those for |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
85 |
"Status of Signing". |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
86 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
87 |
Delay Verifying Status |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
88 |
Delay verifying process result status. The status are the same as those |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
89 |
for "Status of Signing". |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
90 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
91 |
Failed |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
92 |
It highlights which case fails. The failed cases (rows) are marked with |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
93 |
letter X. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
94 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
95 |
##### Usages ##### |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
96 |
jtreg [-options] \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
97 |
-jdk:<path/to/testing/JDK> |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
98 |
[-DproxyHost=<host> \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
99 |
-DproxyPort=<port> \ |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
100 |
-Dteeout=filename \ |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
101 |
-DtsaListFile=</url/to/tsaListFile> \ |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
102 |
-DtsaList=</path/to/tsa1#/path/to/tsa2#/path/to/tsa3#...|notsa> \ |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
103 |
-DjdkListFile=</path/to/jdkListFile> \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
104 |
-DjdkList=</path/to/jdk1#/path/to/jdk2#/path/to/jdk3#...> \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
105 |
-DjavaSecurityFile=</path/to/java/security/properties/file> \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
106 |
-DdelayVerify=<true|false> \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
107 |
-DcertValidity=<[1, 1440]>] \ |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
108 |
<JDK_REPO>/test/jdk/sun/security/tools/jarsigner/compatibility/Compatibility.java |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
109 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
110 |
Besides the common jtreg options, like -jdk, this test introduces a set of |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
111 |
properties for receiving users' inputs and making the test more flexible. These |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
112 |
properties are (all to specify after -D as system properties): |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
113 |
|
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
114 |
proxyHost=<host> |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
115 |
This property indicates proxy host. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
116 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
117 |
proxyPort=<port> |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
118 |
This property indicates proxy port. The default value is 80. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
119 |
|
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
120 |
o=filename |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
121 |
Redirects a copy of what is written to stdout into the specified file which |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
122 |
allows for observing progress or problems during a longer running test. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
123 |
(Compatibility test replaces System.out to collect the output but even if |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
124 |
it didn't jtreg would not print anything until the test would have ended.) |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
125 |
Note that relative paths resolve relatively to some temporary working |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
126 |
directory created by jtreg. Defaults to JTwork/scratch/details.out. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
127 |
The specified file is not deleted or emptied and the output is appended |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
128 |
though jtreg deletes the default file with the whole directory if this |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
129 |
option is not specified or the file point into JTwork/scratch. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
130 |
Example (Bash style): tail -F log & jtreg ... -Do=$(pwd)/log ... |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
131 |
|
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
132 |
tsaListFile=</path/to/tsaListFile> |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
133 |
This property indicates a local file, which contains a set of TSA URLs and |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
134 |
the supported digest algorithms (by optional parameter digests). The format |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
135 |
of the file content looks like the below, |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
136 |
http://path/to/tsa1 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
137 |
http://path/to/tsa2;digests=SHA-1,SHA-256 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
138 |
https://path/to/tsa3 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
139 |
... |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
140 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
141 |
If a TSA line does not list the supported digest algorithms, that means |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
142 |
the TSA supports SHA-1, SHA-256 and SHA-512. Because the test only focus |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
143 |
on SHA-1, SHA-256 and SHA-512. So, if other digest algorithms, like SHA-224 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
144 |
and SHA-384, are listed, they just be ignored. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
145 |
|
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
146 |
tsaList=</path/to/tsa1#/path/to/tsa2;digests=SHA-1,SHA-256#...|notsa> |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
147 |
This property directly lists a set of TSAs in command. "#" is the delimiter. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
148 |
Note that, if both of tsaListFile and tsaList are specified, only property |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
149 |
tsaListFile is selected. If neither of tsaListFile and tsaList is specified, |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
150 |
the test fails immediately. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
151 |
If tsaList has a value of "notsa", no tsa is used. |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
152 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
153 |
jdkListFile=</path/to/jdkListFile> |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
154 |
This property indicates a local file, which contains a set of local JDK |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
155 |
paths. The style of the file content looks like the below, |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
156 |
/path/to/jdk1 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
157 |
/path/to/jdk2 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
158 |
/path/to/jdk3 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
159 |
... |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
160 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
161 |
jdkList=</path/to/jdk1#/path/to/jdk2#/path/to/jdk3#...> |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
162 |
This property directly lists a set of local JDK paths in command. "#" is |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
163 |
the delimiter. |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
164 |
An element "TEST_JDK" as in |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
165 |
jdkList=</path/to/jdk1#/path/to/jdk2#TEST_JDK#...> |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
166 |
adds the testing JDK, which is specified by jtreg option -jdk, to the jdk |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
167 |
list. All signed jars are verified with the current testing JDK, which is |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
168 |
specified by jtreg option -jdk, by default in addition to the JDKs given |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
169 |
in jdkList but it is not used to also sign jars by default. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
170 |
If neither jdkList nor jdkListFile are specified, the current testing JDK, |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
171 |
which is specified by jtreg option -jdk, is used to sign the jars, like: |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
172 |
jdkList=TEST_JDK |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
173 |
Note that, if both of jdkListFile and jdkList are specified, only property |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
174 |
jdkListFile is selected. If neither of jdkListFile nor jdkList is specified, |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
175 |
the testing JDK, which is specified by jtreg option -jdk, will be used as |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
176 |
the only one JDK in the JDK list. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
177 |
|
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
178 |
The testing JDK, which is specified by jtreg option "-jdk", should include |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
179 |
the fix for JDK-8163304. Otherwise, the signature algorithm and timestamp |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
180 |
digest algorithm cannot be extracted from verification output. And this JDK |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
181 |
should support as many as possible signature algorithms. Anyway the latest |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
182 |
JDK build is always recommended. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
183 |
|
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
184 |
testComprehensiveJarContents=<false|true> |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
185 |
If false, all tests are executed with only one typical JAR file. Otherwise, |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
186 |
if true, a whole bunch of JAR files with several edge case contents are |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
187 |
fed through the tests such as empty manifest or manifests with non-default |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
188 |
line breaks. Default is false. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
189 |
|
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
190 |
testJarUpdate=<false|true> |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
191 |
If false, all tested JAR files are signed with one JDK and verified with |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
192 |
each JDK, same or other. If true, in addition, all JAR files are modified |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
193 |
after having been signed, and are then each signed again with each JDK and |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
194 |
verified each JDK, same or other. Default is false. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
195 |
|
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
196 |
strict=<false|true> |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
197 |
If true, '-strict' option is specified to jarsigner along with '-verify'. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
198 |
Default is false. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
199 |
|
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
200 |
javaSecurityFile=</path/to/java/security/properties/file> |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
201 |
This property indicates an alternative java security properties file. The |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
202 |
default file is the path of file java.scurity that is distributed with |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
203 |
this test. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
204 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
205 |
delayVerify=<true|false> |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
206 |
This property indicates if doing an additional verifying after all of valid |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
207 |
certificates expire. The default value is false. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
208 |
|
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
209 |
expired=<false|true> |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
210 |
This property indicates whether or not all tests should be repeated with an |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
211 |
expired certificate. Refers to the certificate validity period and not to |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
212 |
TSA. The default value is true. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
213 |
|
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
214 |
certValidity=<[1, 1440]> |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
215 |
This property indicates the remaining validity period in minutes for valid |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
216 |
certificates. The value range is [1, 1440]. The default value is 1440. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
217 |
Note that, if delayVerify is false, this property doesn't take effect. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
218 |
|
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
219 |
keyAlgs=RSA;1024;2048;#DSA;1024;2048;#EC;384;521; |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
220 |
Specifies key algorithms to use in the test. For each key algorithm the |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
221 |
sizes it should be tested with can be specified after semicolons and |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
222 |
otherwise default values are used. An empty keysize denotes the default |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
223 |
keysize and invokes keytool without a keysize specified. On JDK 6 and |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
224 |
earlier, EC is not supported and always skipped. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
225 |
|
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
226 |
digestAlgs=SHA-1#SHA-256#SHA-384#SHA-512# |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
227 |
Specifies the digest algorithms used for both digesting files contained in |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
228 |
the JAR file, manifests and signature files as well as certificates (keys) |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
229 |
and for TSA. |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
230 |
Ignored with TSA for jarsigner versions that don't support '-tsadigestalg' |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
231 |
parameter, for digest algorithms specified not to be supported by a TSA |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
232 |
server ('digests' sub-option is given to a tsaList item where digest |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
233 |
algorithm is not contained in list), or in cases no TSA is used at all |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
234 |
('tsaList=notsa'). |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
235 |
Note that the same set of digest algorithms is used in all three places |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
236 |
(signing the key, digesting the JAR, and for the TSA) and cannot be |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
237 |
specified individually except that some TSAs may exclude some digest |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
238 |
algorithms. |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
239 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
240 |
##### Examples ##### |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
241 |
$ cat /path/to/jdkList |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
242 |
/path/to/jdk6u171-b05 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
243 |
/path/to/jdk7u161-b05 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
244 |
/path/to/jdk8u144-b01 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
245 |
/path/to/jdk9-179 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
246 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
247 |
$ cat /path/to/tsaList |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
248 |
http://timestamp.comodoca.com/rfc3161 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
249 |
http://sha256timestamp.ws.symantec.com/sha256/timestamp |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
250 |
http://tsa.starfieldtech.com |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
251 |
http://timestamp.entrust.net/TSS/RFC3161sha1TS;digests=SHA-1,SHA-256 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
252 |
http://timestamp.entrust.net/TSS/RFC3161sha2TS;digests=SHA-1,SHA-256 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
253 |
http://rfc3161timestamp.globalsign.com/advanced;digests=SHA-256,SHA-512 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
254 |
http://rfc3161timestamp.globalsign.com/standard |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
255 |
http://timestamp.globalsign.com/scripts/timstamp.dll |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
256 |
http://timestamp.globalsign.com/?signature=sha2;digests=SHA-256,SHA-512 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
257 |
http://timestamp.digicert.com |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
258 |
http://time.certum.pl |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
259 |
http://tsa.swisssign.net |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
260 |
http://zeitstempel.dfn.de |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
261 |
https://tsp.iaik.tugraz.at/tsp/TspRequest |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
262 |
|
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
263 |
$ jtreg -va -nr \ |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
264 |
-jdk:/path/to/latest/jdk \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
265 |
-DproxyHost=<proxy> -DproxyPort=<port> \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
266 |
-DjdkListFile=/path/to/jdkList \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
267 |
-DtsaListFile=/path/to/tsaList \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
268 |
-DdelayVerify=true -DcertValidity=60 \ |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
269 |
<JDK_REPO>/test/jdk/sun/security/tools/jarsigner/compatibility/Compatibility.java |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
270 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
271 |
The above is a comprehensive usage example. File "jdkList" lists the paths of |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
272 |
testing JDK builds, and file "tsaList" lists the URLs of TSA services. Some TSAs, |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
273 |
like http://timestamp.entrust.net/TSS/RFC3161sha1TS, specify the supported digest |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
274 |
algorithms. Other TSAs, which don't specify parameter digests, are regarded to |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
275 |
support SHA-1, SHA-256 and SHA-512. The test uses a proxy to access TSA services. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
276 |
And it enables delay verifying and set the certificate validity period to 60 |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
277 |
minutes. So, after the first verification is done, the test will wait for all |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
278 |
of valid certificates expire and then does verification again. |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
279 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
280 |
If don't want to provide such JDK list and TSA list files, the test allows to |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
281 |
specify JDKs and TSAs (via properties jdkList and tsaList respectively) in the |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
282 |
command directly, like the below style, |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
283 |
$ jtreg -va -nr \ |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
284 |
-jdk:/path/to/latest/jdk \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
285 |
-DproxyHost=<proxy> -DproxyPort=<port> \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
286 |
-DjdkList=/path/to/jdk6u171-b05#/path/to/jdk7u161-b05#/path/to/jdk8u144-b01#/path/to/jdk9-179 \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
287 |
-DtsaList=http://timestamp.comodoca.com/rfc3161#http://timestamp.entrust.net/TSS/RFC3161sha1TS;digests=SHA-1,SHA-256 \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
288 |
-DdelayVerify=true -DcertValidity=60 \ |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
289 |
<JDK_REPO>/test/jdk/sun/security/tools/jarsigner/compatibility/Compatibility.java |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
290 |
|
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
291 |
Furthermore, here introduces one of the simplest usages. It doesn't specify any |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
292 |
JDK list, so the testing JDK, which is specified by jtreg option "-jdk", will |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
293 |
be tested. And it doesn't apply delay verifying, and no proxy is used, and use |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
294 |
only one TSA. Now, the command is pretty simple and looks like the followings, |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
295 |
$ jtreg -va -nr \ |
46156
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
296 |
-jdk:/path/to/latest/jdk \ |
79e8a865c5b8
8179614: Test for jarsigner on verifying jars that are signed and timestamped by other JDK releases
mli
parents:
diff
changeset
|
297 |
-DtsaList=http://timestamp.comodoca.com/rfc3161 \ |
57488
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
298 |
<JDK_REPO>/test/jdk/sun/security/tools/jarsigner/compatibility/Compatibility.java |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
299 |
|
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
300 |
It also works without a tsaList but not without the tsaList argument present |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
301 |
in order to prevent it going missing or ignored unnoticed. May be useful for |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
302 |
local tests but not recommended for real regression tests. Together with other |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
303 |
arguments, a very short running test could be started for example with: |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
304 |
$ jtreg -va -nr \ |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
305 |
-jdk:/path/to/latest/jdk \ |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
306 |
-DtsaList=notsa "-DkeyAlgs=EC;" -DdigestAlgs=SHA-256 -Dexpired=false |
94691d8e746f
8217375: jarsigner breaks old signature with long lines in manifest
weijun
parents:
47216
diff
changeset
|
307 |
<JDK_REPO>/test/jdk/sun/security/tools/jarsigner/compatibility/Compatibility.java |