1 /*
2  * Copyright (c) 1996, 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
23  * questions.
24  */
25 
26 package sun.security.x509;
27 
28 @SuppressWarnings({"unchecked", "deprecation", "all"})
29 public class X509CertImpl extends java.security.cert.X509Certificate
30         implements sun.security.util.DerEncoder {
31 
X509CertImpl()32     public X509CertImpl() {
33         throw new RuntimeException("Stub!");
34     }
35 
36     @android.compat.annotation.UnsupportedAppUsage
X509CertImpl(byte[] certData)37     public X509CertImpl(byte[] certData) throws java.security.cert.CertificateException {
38         throw new RuntimeException("Stub!");
39     }
40 
41     @android.compat.annotation.UnsupportedAppUsage
X509CertImpl(sun.security.x509.X509CertInfo certInfo)42     public X509CertImpl(sun.security.x509.X509CertInfo certInfo) {
43         throw new RuntimeException("Stub!");
44     }
45 
46     @android.compat.annotation.UnsupportedAppUsage
X509CertImpl(sun.security.util.DerValue derVal)47     public X509CertImpl(sun.security.util.DerValue derVal)
48             throws java.security.cert.CertificateException {
49         throw new RuntimeException("Stub!");
50     }
51 
X509CertImpl(sun.security.util.DerValue derVal, byte[] encoded)52     public X509CertImpl(sun.security.util.DerValue derVal, byte[] encoded)
53             throws java.security.cert.CertificateException {
54         throw new RuntimeException("Stub!");
55     }
56 
encode(java.io.OutputStream out)57     public void encode(java.io.OutputStream out)
58             throws java.security.cert.CertificateEncodingException {
59         throw new RuntimeException("Stub!");
60     }
61 
derEncode(java.io.OutputStream out)62     public void derEncode(java.io.OutputStream out) throws java.io.IOException {
63         throw new RuntimeException("Stub!");
64     }
65 
getEncoded()66     public byte[] getEncoded() throws java.security.cert.CertificateEncodingException {
67         throw new RuntimeException("Stub!");
68     }
69 
70     @android.compat.annotation.UnsupportedAppUsage
getEncodedInternal()71     public byte[] getEncodedInternal() throws java.security.cert.CertificateEncodingException {
72         throw new RuntimeException("Stub!");
73     }
74 
verify(java.security.PublicKey key)75     public void verify(java.security.PublicKey key)
76             throws java.security.cert.CertificateException, java.security.InvalidKeyException,
77                     java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException,
78                     java.security.SignatureException {
79         throw new RuntimeException("Stub!");
80     }
81 
verify(java.security.PublicKey key, java.lang.String sigProvider)82     public synchronized void verify(java.security.PublicKey key, java.lang.String sigProvider)
83             throws java.security.cert.CertificateException, java.security.InvalidKeyException,
84                     java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException,
85                     java.security.SignatureException {
86         throw new RuntimeException("Stub!");
87     }
88 
verify(java.security.PublicKey key, java.security.Provider sigProvider)89     public synchronized void verify(java.security.PublicKey key, java.security.Provider sigProvider)
90             throws java.security.cert.CertificateException, java.security.InvalidKeyException,
91                     java.security.NoSuchAlgorithmException, java.security.SignatureException {
92         throw new RuntimeException("Stub!");
93     }
94 
verify( java.security.cert.X509Certificate cert, java.security.PublicKey key, java.security.Provider sigProvider)95     public static void verify(
96             java.security.cert.X509Certificate cert,
97             java.security.PublicKey key,
98             java.security.Provider sigProvider)
99             throws java.security.cert.CertificateException, java.security.InvalidKeyException,
100                     java.security.NoSuchAlgorithmException, java.security.SignatureException {
101         throw new RuntimeException("Stub!");
102     }
103 
104     @android.compat.annotation.UnsupportedAppUsage
sign(java.security.PrivateKey key, java.lang.String algorithm)105     public void sign(java.security.PrivateKey key, java.lang.String algorithm)
106             throws java.security.cert.CertificateException, java.security.InvalidKeyException,
107                     java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException,
108                     java.security.SignatureException {
109         throw new RuntimeException("Stub!");
110     }
111 
sign( java.security.PrivateKey key, java.lang.String algorithm, java.lang.String provider)112     public void sign(
113             java.security.PrivateKey key, java.lang.String algorithm, java.lang.String provider)
114             throws java.security.cert.CertificateException, java.security.InvalidKeyException,
115                     java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException,
116                     java.security.SignatureException {
117         throw new RuntimeException("Stub!");
118     }
119 
checkValidity()120     public void checkValidity()
121             throws java.security.cert.CertificateExpiredException,
122                     java.security.cert.CertificateNotYetValidException {
123         throw new RuntimeException("Stub!");
124     }
125 
checkValidity(java.util.Date date)126     public void checkValidity(java.util.Date date)
127             throws java.security.cert.CertificateExpiredException,
128                     java.security.cert.CertificateNotYetValidException {
129         throw new RuntimeException("Stub!");
130     }
131 
132     @android.compat.annotation.UnsupportedAppUsage
get(java.lang.String name)133     public java.lang.Object get(java.lang.String name)
134             throws java.security.cert.CertificateParsingException {
135         throw new RuntimeException("Stub!");
136     }
137 
set(java.lang.String name, java.lang.Object obj)138     public void set(java.lang.String name, java.lang.Object obj)
139             throws java.security.cert.CertificateException, java.io.IOException {
140         throw new RuntimeException("Stub!");
141     }
142 
delete(java.lang.String name)143     public void delete(java.lang.String name)
144             throws java.security.cert.CertificateException, java.io.IOException {
145         throw new RuntimeException("Stub!");
146     }
147 
getElements()148     public java.util.Enumeration<java.lang.String> getElements() {
149         throw new RuntimeException("Stub!");
150     }
151 
getName()152     public java.lang.String getName() {
153         throw new RuntimeException("Stub!");
154     }
155 
toString()156     public java.lang.String toString() {
157         throw new RuntimeException("Stub!");
158     }
159 
getPublicKey()160     public java.security.PublicKey getPublicKey() {
161         throw new RuntimeException("Stub!");
162     }
163 
getVersion()164     public int getVersion() {
165         throw new RuntimeException("Stub!");
166     }
167 
getSerialNumber()168     public java.math.BigInteger getSerialNumber() {
169         throw new RuntimeException("Stub!");
170     }
171 
getSerialNumberObject()172     public sun.security.x509.SerialNumber getSerialNumberObject() {
173         throw new RuntimeException("Stub!");
174     }
175 
getSubjectDN()176     public java.security.Principal getSubjectDN() {
177         throw new RuntimeException("Stub!");
178     }
179 
getSubjectX500Principal()180     public javax.security.auth.x500.X500Principal getSubjectX500Principal() {
181         throw new RuntimeException("Stub!");
182     }
183 
getIssuerDN()184     public java.security.Principal getIssuerDN() {
185         throw new RuntimeException("Stub!");
186     }
187 
getIssuerX500Principal()188     public javax.security.auth.x500.X500Principal getIssuerX500Principal() {
189         throw new RuntimeException("Stub!");
190     }
191 
getNotBefore()192     public java.util.Date getNotBefore() {
193         throw new RuntimeException("Stub!");
194     }
195 
getNotAfter()196     public java.util.Date getNotAfter() {
197         throw new RuntimeException("Stub!");
198     }
199 
getTBSCertificate()200     public byte[] getTBSCertificate() throws java.security.cert.CertificateEncodingException {
201         throw new RuntimeException("Stub!");
202     }
203 
getSignature()204     public byte[] getSignature() {
205         throw new RuntimeException("Stub!");
206     }
207 
getSigAlgName()208     public java.lang.String getSigAlgName() {
209         throw new RuntimeException("Stub!");
210     }
211 
getSigAlgOID()212     public java.lang.String getSigAlgOID() {
213         throw new RuntimeException("Stub!");
214     }
215 
getSigAlgParams()216     public byte[] getSigAlgParams() {
217         throw new RuntimeException("Stub!");
218     }
219 
getIssuerUniqueID()220     public boolean[] getIssuerUniqueID() {
221         throw new RuntimeException("Stub!");
222     }
223 
getSubjectUniqueID()224     public boolean[] getSubjectUniqueID() {
225         throw new RuntimeException("Stub!");
226     }
227 
getAuthKeyId()228     public sun.security.x509.KeyIdentifier getAuthKeyId() {
229         throw new RuntimeException("Stub!");
230     }
231 
getSubjectKeyId()232     public sun.security.x509.KeyIdentifier getSubjectKeyId() {
233         throw new RuntimeException("Stub!");
234     }
235 
getAuthorityKeyIdentifierExtension()236     public sun.security.x509.AuthorityKeyIdentifierExtension getAuthorityKeyIdentifierExtension() {
237         throw new RuntimeException("Stub!");
238     }
239 
getBasicConstraintsExtension()240     public sun.security.x509.BasicConstraintsExtension getBasicConstraintsExtension() {
241         throw new RuntimeException("Stub!");
242     }
243 
getCertificatePoliciesExtension()244     public sun.security.x509.CertificatePoliciesExtension getCertificatePoliciesExtension() {
245         throw new RuntimeException("Stub!");
246     }
247 
getExtendedKeyUsageExtension()248     public sun.security.x509.ExtendedKeyUsageExtension getExtendedKeyUsageExtension() {
249         throw new RuntimeException("Stub!");
250     }
251 
getIssuerAlternativeNameExtension()252     public sun.security.x509.IssuerAlternativeNameExtension getIssuerAlternativeNameExtension() {
253         throw new RuntimeException("Stub!");
254     }
255 
getNameConstraintsExtension()256     public sun.security.x509.NameConstraintsExtension getNameConstraintsExtension() {
257         throw new RuntimeException("Stub!");
258     }
259 
getPolicyConstraintsExtension()260     public sun.security.x509.PolicyConstraintsExtension getPolicyConstraintsExtension() {
261         throw new RuntimeException("Stub!");
262     }
263 
getPolicyMappingsExtension()264     public sun.security.x509.PolicyMappingsExtension getPolicyMappingsExtension() {
265         throw new RuntimeException("Stub!");
266     }
267 
getPrivateKeyUsageExtension()268     public sun.security.x509.PrivateKeyUsageExtension getPrivateKeyUsageExtension() {
269         throw new RuntimeException("Stub!");
270     }
271 
getSubjectAlternativeNameExtension()272     public sun.security.x509.SubjectAlternativeNameExtension getSubjectAlternativeNameExtension() {
273         throw new RuntimeException("Stub!");
274     }
275 
getSubjectKeyIdentifierExtension()276     public sun.security.x509.SubjectKeyIdentifierExtension getSubjectKeyIdentifierExtension() {
277         throw new RuntimeException("Stub!");
278     }
279 
getCRLDistributionPointsExtension()280     public sun.security.x509.CRLDistributionPointsExtension getCRLDistributionPointsExtension() {
281         throw new RuntimeException("Stub!");
282     }
283 
hasUnsupportedCriticalExtension()284     public boolean hasUnsupportedCriticalExtension() {
285         throw new RuntimeException("Stub!");
286     }
287 
getCriticalExtensionOIDs()288     public java.util.Set<java.lang.String> getCriticalExtensionOIDs() {
289         throw new RuntimeException("Stub!");
290     }
291 
getNonCriticalExtensionOIDs()292     public java.util.Set<java.lang.String> getNonCriticalExtensionOIDs() {
293         throw new RuntimeException("Stub!");
294     }
295 
getExtension(sun.security.util.ObjectIdentifier oid)296     public sun.security.x509.Extension getExtension(sun.security.util.ObjectIdentifier oid) {
297         throw new RuntimeException("Stub!");
298     }
299 
getUnparseableExtension( sun.security.util.ObjectIdentifier oid)300     public sun.security.x509.Extension getUnparseableExtension(
301             sun.security.util.ObjectIdentifier oid) {
302         throw new RuntimeException("Stub!");
303     }
304 
getExtensionValue(java.lang.String oid)305     public byte[] getExtensionValue(java.lang.String oid) {
306         throw new RuntimeException("Stub!");
307     }
308 
getKeyUsage()309     public boolean[] getKeyUsage() {
310         throw new RuntimeException("Stub!");
311     }
312 
getExtendedKeyUsage()313     public synchronized java.util.List<java.lang.String> getExtendedKeyUsage()
314             throws java.security.cert.CertificateParsingException {
315         throw new RuntimeException("Stub!");
316     }
317 
getExtendedKeyUsage( java.security.cert.X509Certificate cert)318     public static java.util.List<java.lang.String> getExtendedKeyUsage(
319             java.security.cert.X509Certificate cert)
320             throws java.security.cert.CertificateParsingException {
321         throw new RuntimeException("Stub!");
322     }
323 
getBasicConstraints()324     public int getBasicConstraints() {
325         throw new RuntimeException("Stub!");
326     }
327 
makeAltNames( sun.security.x509.GeneralNames names)328     private static java.util.Collection<java.util.List<?>> makeAltNames(
329             sun.security.x509.GeneralNames names) {
330         throw new RuntimeException("Stub!");
331     }
332 
cloneAltNames( java.util.Collection<java.util.List<?>> altNames)333     private static java.util.Collection<java.util.List<?>> cloneAltNames(
334             java.util.Collection<java.util.List<?>> altNames) {
335         throw new RuntimeException("Stub!");
336     }
337 
getSubjectAlternativeNames()338     public synchronized java.util.Collection<java.util.List<?>> getSubjectAlternativeNames()
339             throws java.security.cert.CertificateParsingException {
340         throw new RuntimeException("Stub!");
341     }
342 
getSubjectAlternativeNames( java.security.cert.X509Certificate cert)343     public static java.util.Collection<java.util.List<?>> getSubjectAlternativeNames(
344             java.security.cert.X509Certificate cert)
345             throws java.security.cert.CertificateParsingException {
346         throw new RuntimeException("Stub!");
347     }
348 
getIssuerAlternativeNames()349     public synchronized java.util.Collection<java.util.List<?>> getIssuerAlternativeNames()
350             throws java.security.cert.CertificateParsingException {
351         throw new RuntimeException("Stub!");
352     }
353 
getIssuerAlternativeNames( java.security.cert.X509Certificate cert)354     public static java.util.Collection<java.util.List<?>> getIssuerAlternativeNames(
355             java.security.cert.X509Certificate cert)
356             throws java.security.cert.CertificateParsingException {
357         throw new RuntimeException("Stub!");
358     }
359 
getAuthorityInfoAccessExtension()360     public sun.security.x509.AuthorityInfoAccessExtension getAuthorityInfoAccessExtension() {
361         throw new RuntimeException("Stub!");
362     }
363 
364     @android.compat.annotation.UnsupportedAppUsage
parse(sun.security.util.DerValue val)365     private void parse(sun.security.util.DerValue val)
366             throws java.security.cert.CertificateException, java.io.IOException {
367         throw new RuntimeException("Stub!");
368     }
369 
parse(sun.security.util.DerValue val, byte[] originalEncodedForm)370     private void parse(sun.security.util.DerValue val, byte[] originalEncodedForm)
371             throws java.security.cert.CertificateException, java.io.IOException {
372         throw new RuntimeException("Stub!");
373     }
374 
getX500Principal( java.security.cert.X509Certificate cert, boolean getIssuer)375     private static javax.security.auth.x500.X500Principal getX500Principal(
376             java.security.cert.X509Certificate cert, boolean getIssuer) throws java.lang.Exception {
377         throw new RuntimeException("Stub!");
378     }
379 
getSubjectX500Principal( java.security.cert.X509Certificate cert)380     public static javax.security.auth.x500.X500Principal getSubjectX500Principal(
381             java.security.cert.X509Certificate cert) {
382         throw new RuntimeException("Stub!");
383     }
384 
getIssuerX500Principal( java.security.cert.X509Certificate cert)385     public static javax.security.auth.x500.X500Principal getIssuerX500Principal(
386             java.security.cert.X509Certificate cert) {
387         throw new RuntimeException("Stub!");
388     }
389 
getEncodedInternal(java.security.cert.Certificate cert)390     public static byte[] getEncodedInternal(java.security.cert.Certificate cert)
391             throws java.security.cert.CertificateEncodingException {
392         throw new RuntimeException("Stub!");
393     }
394 
toImpl(java.security.cert.X509Certificate cert)395     public static sun.security.x509.X509CertImpl toImpl(java.security.cert.X509Certificate cert)
396             throws java.security.cert.CertificateException {
397         throw new RuntimeException("Stub!");
398     }
399 
isSelfIssued(java.security.cert.X509Certificate cert)400     public static boolean isSelfIssued(java.security.cert.X509Certificate cert) {
401         throw new RuntimeException("Stub!");
402     }
403 
isSelfSigned( java.security.cert.X509Certificate cert, java.lang.String sigProvider)404     public static boolean isSelfSigned(
405             java.security.cert.X509Certificate cert, java.lang.String sigProvider) {
406         throw new RuntimeException("Stub!");
407     }
408 
getFingerprint( java.lang.String algorithm, java.security.cert.X509Certificate cert)409     public static java.lang.String getFingerprint(
410             java.lang.String algorithm, java.security.cert.X509Certificate cert) {
411         throw new RuntimeException("Stub!");
412     }
413 
byte2hex(byte b, java.lang.StringBuffer buf)414     private static void byte2hex(byte b, java.lang.StringBuffer buf) {
415         throw new RuntimeException("Stub!");
416     }
417 
418     public static final java.lang.String ALG_ID = "algorithm";
419 
420     private static final java.lang.String AUTH_INFO_ACCESS_OID = "1.3.6.1.5.5.7.1.1";
421 
422     private static final java.lang.String BASIC_CONSTRAINT_OID = "2.5.29.19";
423 
424     private static final java.lang.String DOT = ".";
425 
426     private static final java.lang.String EXTENDED_KEY_USAGE_OID = "2.5.29.37";
427 
428     public static final java.lang.String INFO = "info";
429 
430     private static final java.lang.String ISSUER_ALT_NAME_OID = "2.5.29.18";
431 
432     public static final java.lang.String ISSUER_DN = "x509.info.issuer.dname";
433 
434     private static final java.lang.String KEY_USAGE_OID = "2.5.29.15";
435 
436     public static final java.lang.String NAME = "x509";
437 
438     private static final int NUM_STANDARD_KEY_USAGE = 9; // 0x9
439 
440     public static final java.lang.String PUBLIC_KEY = "x509.info.key.value";
441 
442     public static final java.lang.String SERIAL_ID = "x509.info.serialNumber.number";
443 
444     public static final java.lang.String SIG = "x509.signature";
445 
446     public static final java.lang.String SIGNATURE = "signature";
447 
448     public static final java.lang.String SIGNED_CERT = "signed_cert";
449 
450     public static final java.lang.String SIG_ALG = "x509.algorithm";
451 
452     private static final java.lang.String SUBJECT_ALT_NAME_OID = "2.5.29.17";
453 
454     public static final java.lang.String SUBJECT_DN = "x509.info.subject.dname";
455 
456     public static final java.lang.String VERSION = "x509.info.version.number";
457 
458     @android.compat.annotation.UnsupportedAppUsage protected sun.security.x509.AlgorithmId algId;
459 
460     private java.util.Set<sun.security.x509.AccessDescription> authInfoAccess;
461 
462     private java.util.List<java.lang.String> extKeyUsage;
463 
464     private java.util.concurrent.ConcurrentHashMap<java.lang.String, java.lang.String> fingerprints;
465 
466     protected sun.security.x509.X509CertInfo info;
467 
468     private java.util.Collection<java.util.List<?>> issuerAlternativeNames;
469 
470     @android.compat.annotation.UnsupportedAppUsage private boolean readOnly = false;
471 
472     private static final long serialVersionUID = -3457612960190864406L; // 0xd0041754f90963eaL
473 
474     @android.compat.annotation.UnsupportedAppUsage protected byte[] signature;
475 
476     @android.compat.annotation.UnsupportedAppUsage private byte[] signedCert;
477 
478     private java.util.Collection<java.util.List<?>> subjectAlternativeNames;
479 
480     private boolean verificationResult;
481 
482     private java.lang.String verifiedProvider;
483 
484     private java.security.PublicKey verifiedPublicKey;
485 }
486