• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 1997, 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
23  * questions.
24  */
25 
26 package sun.security.util;
27 
28 
29 @SuppressWarnings({"unchecked", "deprecation", "all"})
30 public class SignatureFileVerifier {
31 
SignatureFileVerifier( java.util.ArrayList<java.security.CodeSigner[]> signerCache, sun.security.util.ManifestDigester md, java.lang.String name, byte[] rawBytes)32     public SignatureFileVerifier(
33             java.util.ArrayList<java.security.CodeSigner[]> signerCache,
34             sun.security.util.ManifestDigester md,
35             java.lang.String name,
36             byte[] rawBytes)
37             throws java.security.cert.CertificateException, java.io.IOException {
38         throw new RuntimeException("Stub!");
39     }
40 
needSignatureFileBytes()41     public boolean needSignatureFileBytes() {
42         throw new RuntimeException("Stub!");
43     }
44 
needSignatureFile(java.lang.String name)45     public boolean needSignatureFile(java.lang.String name) {
46         throw new RuntimeException("Stub!");
47     }
48 
setSignatureFile(byte[] sfBytes)49     public void setSignatureFile(byte[] sfBytes) {
50         throw new RuntimeException("Stub!");
51     }
52 
53     @android.compat.annotation.UnsupportedAppUsage
isBlockOrSF(java.lang.String s)54     public static boolean isBlockOrSF(java.lang.String s) {
55         throw new RuntimeException("Stub!");
56     }
57 
isSigningRelated(java.lang.String name)58     public static boolean isSigningRelated(java.lang.String name) {
59         throw new RuntimeException("Stub!");
60     }
61 
getDigest(java.lang.String algorithm)62     private java.security.MessageDigest getDigest(java.lang.String algorithm)
63             throws java.security.SignatureException {
64         throw new RuntimeException("Stub!");
65     }
66 
process( java.util.Hashtable<java.lang.String, java.security.CodeSigner[]> signers, java.util.List<java.lang.Object> manifestDigests)67     public void process(
68             java.util.Hashtable<java.lang.String, java.security.CodeSigner[]> signers,
69             java.util.List<java.lang.Object> manifestDigests)
70             throws java.security.cert.CertificateException, java.io.IOException,
71                     java.util.jar.JarException, java.security.NoSuchAlgorithmException,
72                     java.security.SignatureException {
73         throw new RuntimeException("Stub!");
74     }
75 
processImpl( java.util.Hashtable<java.lang.String, java.security.CodeSigner[]> signers, java.util.List<java.lang.Object> manifestDigests)76     private void processImpl(
77             java.util.Hashtable<java.lang.String, java.security.CodeSigner[]> signers,
78             java.util.List<java.lang.Object> manifestDigests)
79             throws java.security.cert.CertificateException, java.io.IOException,
80                     java.util.jar.JarException, java.security.NoSuchAlgorithmException,
81                     java.security.SignatureException {
82         throw new RuntimeException("Stub!");
83     }
84 
verifyManifestHash( java.util.jar.Manifest sf, sun.security.util.ManifestDigester md, java.util.List<java.lang.Object> manifestDigests)85     private boolean verifyManifestHash(
86             java.util.jar.Manifest sf,
87             sun.security.util.ManifestDigester md,
88             java.util.List<java.lang.Object> manifestDigests)
89             throws java.io.IOException, java.security.SignatureException {
90         throw new RuntimeException("Stub!");
91     }
92 
verifyManifestMainAttrs( java.util.jar.Manifest sf, sun.security.util.ManifestDigester md)93     private boolean verifyManifestMainAttrs(
94             java.util.jar.Manifest sf, sun.security.util.ManifestDigester md)
95             throws java.io.IOException, java.security.SignatureException {
96         throw new RuntimeException("Stub!");
97     }
98 
verifySection( java.util.jar.Attributes sfAttr, java.lang.String name, sun.security.util.ManifestDigester md)99     private boolean verifySection(
100             java.util.jar.Attributes sfAttr,
101             java.lang.String name,
102             sun.security.util.ManifestDigester md)
103             throws java.io.IOException, java.security.SignatureException {
104         throw new RuntimeException("Stub!");
105     }
106 
getSigners( sun.security.pkcs.SignerInfo[] infos, sun.security.pkcs.PKCS7 block)107     private java.security.CodeSigner[] getSigners(
108             sun.security.pkcs.SignerInfo[] infos, sun.security.pkcs.PKCS7 block)
109             throws java.security.cert.CertificateException, java.io.IOException,
110                     java.security.NoSuchAlgorithmException, java.security.SignatureException {
111         throw new RuntimeException("Stub!");
112     }
113 
toHex(byte[] data)114     static java.lang.String toHex(byte[] data) {
115         throw new RuntimeException("Stub!");
116     }
117 
contains(java.security.CodeSigner[] set, java.security.CodeSigner signer)118     static boolean contains(java.security.CodeSigner[] set, java.security.CodeSigner signer) {
119         throw new RuntimeException("Stub!");
120     }
121 
isSubSet(java.security.CodeSigner[] subset, java.security.CodeSigner[] set)122     static boolean isSubSet(java.security.CodeSigner[] subset, java.security.CodeSigner[] set) {
123         throw new RuntimeException("Stub!");
124     }
125 
matches( java.security.CodeSigner[] signers, java.security.CodeSigner[] oldSigners, java.security.CodeSigner[] newSigners)126     static boolean matches(
127             java.security.CodeSigner[] signers,
128             java.security.CodeSigner[] oldSigners,
129             java.security.CodeSigner[] newSigners) {
130         throw new RuntimeException("Stub!");
131     }
132 
updateSigners( java.security.CodeSigner[] newSigners, java.util.Hashtable<java.lang.String, java.security.CodeSigner[]> signers, java.lang.String name)133     void updateSigners(
134             java.security.CodeSigner[] newSigners,
135             java.util.Hashtable<java.lang.String, java.security.CodeSigner[]> signers,
136             java.lang.String name) {
137         throw new RuntimeException("Stub!");
138     }
139 
140     private static final java.lang.String ATTR_DIGEST;
141 
142     static {
143         ATTR_DIGEST = null;
144     }
145 
146     private static final java.util.Set<java.security.CryptoPrimitive> DIGEST_PRIMITIVE_SET;
147 
148     static {
149         DIGEST_PRIMITIVE_SET = null;
150     }
151 
152     private static final sun.security.util.DisabledAlgorithmConstraints JAR_DISABLED_CHECK;
153 
154     static {
155         JAR_DISABLED_CHECK = null;
156     }
157 
158     private sun.security.pkcs.PKCS7 block;
159 
160     private java.security.cert.CertificateFactory certificateFactory;
161 
162     private java.util.HashMap<java.lang.String, java.security.MessageDigest> createdDigests;
163 
164     private static final sun.security.util.Debug debug;
165 
166     static {
167         debug = null;
168     }
169 
170     private static final char[] hexc;
171 
172     static {
173         hexc = new char[0];
174     }
175 
176     private sun.security.util.ManifestDigester md;
177 
178     private java.lang.String name;
179 
180     private byte[] sfBytes;
181 
182     private java.util.ArrayList<java.security.CodeSigner[]> signerCache;
183 
184     private boolean workaround = false;
185 }
186