equal
deleted
inserted
replaced
167 * @throws SecurityException if the associated jar is signed but this entry |
167 * @throws SecurityException if the associated jar is signed but this entry |
168 * has been modified after signing (i.e. the section in the manifest |
168 * has been modified after signing (i.e. the section in the manifest |
169 * does not exist in SF files of all signers). |
169 * does not exist in SF files of all signers). |
170 */ |
170 */ |
171 Attributes getTrustedAttributes(String name) { |
171 Attributes getTrustedAttributes(String name) { |
|
172 // Note: Before the verification of MANIFEST.MF/.SF/.RSA files is done, |
|
173 // jv.isTrustedManifestEntry() isn't able to detect MANIFEST.MF change. |
|
174 // Users of this method should call SharedSecrets.javaUtilJarAccess() |
|
175 // .ensureInitialization() first. |
172 Attributes result = getAttributes(name); |
176 Attributes result = getAttributes(name); |
173 if (result != null && jv != null && ! jv.isTrustedManifestEntry(name)) { |
177 if (result != null && jv != null && ! jv.isTrustedManifestEntry(name)) { |
174 throw new SecurityException("Untrusted manifest entry: " + name); |
178 throw new SecurityException("Untrusted manifest entry: " + name); |
175 } |
179 } |
176 return result; |
180 return result; |