1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. Oracle designates this 9 * particular file as subject to the "Classpath" exception as provided 10 * by Oracle in the LICENSE file that accompanied this code. 11 * 12 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 * version 2 for more details (a copy is included in the LICENSE file that 16 * accompanied this code). 17 * 18 * You should have received a copy of the GNU General Public License version 19 * 2 along with this work; if not, write to the Free Software Foundation, 20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 * 22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 23 * or visit www.oracle.com if you need additional information or have any 24 * questions. 25 */ 26 27 package sun.security.pkcs; 28 29 import java.io.*; 30 import java.security.*; 31 import java.util.*; 32 import sun.security.timestamp.*; 33 import sun.security.util.*; 34 35 @SuppressWarnings({"unchecked", "deprecation", "all"}) 36 public class PKCS7 { 37 PKCS7(java.io.InputStream in)38 public PKCS7(java.io.InputStream in) 39 throws java.io.IOException, sun.security.pkcs.ParsingException { 40 throw new RuntimeException("Stub!"); 41 } 42 PKCS7(sun.security.util.DerInputStream derin)43 public PKCS7(sun.security.util.DerInputStream derin) throws sun.security.pkcs.ParsingException { 44 throw new RuntimeException("Stub!"); 45 } 46 47 @android.compat.annotation.UnsupportedAppUsage PKCS7(byte[] bytes)48 public PKCS7(byte[] bytes) throws sun.security.pkcs.ParsingException { 49 throw new RuntimeException("Stub!"); 50 } 51 52 @android.compat.annotation.UnsupportedAppUsage PKCS7( sun.security.x509.AlgorithmId[] digestAlgorithmIds, sun.security.pkcs.ContentInfo contentInfo, java.security.cert.X509Certificate[] certificates, java.security.cert.X509CRL[] crls, sun.security.pkcs.SignerInfo[] signerInfos)53 public PKCS7( 54 sun.security.x509.AlgorithmId[] digestAlgorithmIds, 55 sun.security.pkcs.ContentInfo contentInfo, 56 java.security.cert.X509Certificate[] certificates, 57 java.security.cert.X509CRL[] crls, 58 sun.security.pkcs.SignerInfo[] signerInfos) { 59 throw new RuntimeException("Stub!"); 60 } 61 62 @android.compat.annotation.UnsupportedAppUsage PKCS7( sun.security.x509.AlgorithmId[] digestAlgorithmIds, sun.security.pkcs.ContentInfo contentInfo, java.security.cert.X509Certificate[] certificates, sun.security.pkcs.SignerInfo[] signerInfos)63 public PKCS7( 64 sun.security.x509.AlgorithmId[] digestAlgorithmIds, 65 sun.security.pkcs.ContentInfo contentInfo, 66 java.security.cert.X509Certificate[] certificates, 67 sun.security.pkcs.SignerInfo[] signerInfos) { 68 throw new RuntimeException("Stub!"); 69 } 70 parse(sun.security.util.DerInputStream derin)71 private void parse(sun.security.util.DerInputStream derin) 72 throws sun.security.pkcs.ParsingException { 73 throw new RuntimeException("Stub!"); 74 } 75 parse(sun.security.util.DerInputStream derin, boolean oldStyle)76 private void parse(sun.security.util.DerInputStream derin, boolean oldStyle) 77 throws java.io.IOException { 78 throw new RuntimeException("Stub!"); 79 } 80 parseNetscapeCertChain(sun.security.util.DerValue val)81 private void parseNetscapeCertChain(sun.security.util.DerValue val) 82 throws java.io.IOException, sun.security.pkcs.ParsingException { 83 throw new RuntimeException("Stub!"); 84 } 85 parseSignedData(sun.security.util.DerValue val)86 private void parseSignedData(sun.security.util.DerValue val) 87 throws java.io.IOException, sun.security.pkcs.ParsingException { 88 throw new RuntimeException("Stub!"); 89 } 90 parseOldSignedData(sun.security.util.DerValue val)91 private void parseOldSignedData(sun.security.util.DerValue val) 92 throws java.io.IOException, sun.security.pkcs.ParsingException { 93 throw new RuntimeException("Stub!"); 94 } 95 96 @android.compat.annotation.UnsupportedAppUsage encodeSignedData(java.io.OutputStream out)97 public void encodeSignedData(java.io.OutputStream out) throws java.io.IOException { 98 throw new RuntimeException("Stub!"); 99 } 100 encodeSignedData(sun.security.util.DerOutputStream out)101 public void encodeSignedData(sun.security.util.DerOutputStream out) throws java.io.IOException { 102 throw new RuntimeException("Stub!"); 103 } 104 105 @android.compat.annotation.UnsupportedAppUsage verify(sun.security.pkcs.SignerInfo info, byte[] bytes)106 public sun.security.pkcs.SignerInfo verify(sun.security.pkcs.SignerInfo info, byte[] bytes) 107 throws java.security.NoSuchAlgorithmException, java.security.SignatureException { 108 throw new RuntimeException("Stub!"); 109 } 110 verify( sun.security.pkcs.SignerInfo info, java.io.InputStream dataInputStream)111 public sun.security.pkcs.SignerInfo verify( 112 sun.security.pkcs.SignerInfo info, java.io.InputStream dataInputStream) 113 throws java.io.IOException, java.security.NoSuchAlgorithmException, 114 java.security.SignatureException { 115 throw new RuntimeException("Stub!"); 116 } 117 118 @android.compat.annotation.UnsupportedAppUsage verify(byte[] bytes)119 public sun.security.pkcs.SignerInfo[] verify(byte[] bytes) 120 throws java.security.NoSuchAlgorithmException, java.security.SignatureException { 121 throw new RuntimeException("Stub!"); 122 } 123 verify()124 public sun.security.pkcs.SignerInfo[] verify() 125 throws java.security.NoSuchAlgorithmException, java.security.SignatureException { 126 throw new RuntimeException("Stub!"); 127 } 128 getVersion()129 public java.math.BigInteger getVersion() { 130 throw new RuntimeException("Stub!"); 131 } 132 getDigestAlgorithmIds()133 public sun.security.x509.AlgorithmId[] getDigestAlgorithmIds() { 134 throw new RuntimeException("Stub!"); 135 } 136 137 @android.compat.annotation.UnsupportedAppUsage getContentInfo()138 public sun.security.pkcs.ContentInfo getContentInfo() { 139 throw new RuntimeException("Stub!"); 140 } 141 142 @android.compat.annotation.UnsupportedAppUsage getCertificates()143 public java.security.cert.X509Certificate[] getCertificates() { 144 throw new RuntimeException("Stub!"); 145 } 146 getCRLs()147 public java.security.cert.X509CRL[] getCRLs() { 148 throw new RuntimeException("Stub!"); 149 } 150 151 @android.compat.annotation.UnsupportedAppUsage getSignerInfos()152 public sun.security.pkcs.SignerInfo[] getSignerInfos() { 153 throw new RuntimeException("Stub!"); 154 } 155 getCertificate( java.math.BigInteger serial, sun.security.x509.X500Name issuerName)156 public java.security.cert.X509Certificate getCertificate( 157 java.math.BigInteger serial, sun.security.x509.X500Name issuerName) { 158 throw new RuntimeException("Stub!"); 159 } 160 populateCertIssuerNames()161 private void populateCertIssuerNames() { 162 throw new RuntimeException("Stub!"); 163 } 164 toString()165 public java.lang.String toString() { 166 throw new RuntimeException("Stub!"); 167 } 168 isOldStyle()169 public boolean isOldStyle() { 170 throw new RuntimeException("Stub!"); 171 } 172 173 private java.security.Principal[] certIssuerNames; 174 175 private java.security.cert.X509Certificate[] certificates; 176 177 private sun.security.pkcs.ContentInfo contentInfo; 178 179 private sun.security.util.ObjectIdentifier contentType; 180 181 private java.security.cert.X509CRL[] crls; 182 183 private sun.security.x509.AlgorithmId[] digestAlgorithmIds; 184 185 private boolean oldStyle = false; 186 187 private sun.security.pkcs.SignerInfo[] signerInfos; 188 189 private java.math.BigInteger version; 190 191 @SuppressWarnings({"unchecked", "deprecation", "all"}) 192 private static class VerbatimX509Certificate 193 extends sun.security.pkcs.PKCS7.WrappedX509Certificate { 194 VerbatimX509Certificate( java.security.cert.X509Certificate wrapped, byte[] encodedVerbatim)195 public VerbatimX509Certificate( 196 java.security.cert.X509Certificate wrapped, byte[] encodedVerbatim) { 197 super(null); 198 throw new RuntimeException("Stub!"); 199 } 200 getEncoded()201 public byte[] getEncoded() throws java.security.cert.CertificateEncodingException { 202 throw new RuntimeException("Stub!"); 203 } 204 205 private byte[] encodedVerbatim; 206 } 207 208 @SuppressWarnings({"unchecked", "deprecation", "all"}) 209 private static class WrappedX509Certificate extends java.security.cert.X509Certificate { 210 WrappedX509Certificate(java.security.cert.X509Certificate wrapped)211 public WrappedX509Certificate(java.security.cert.X509Certificate wrapped) { 212 throw new RuntimeException("Stub!"); 213 } 214 getCriticalExtensionOIDs()215 public java.util.Set<java.lang.String> getCriticalExtensionOIDs() { 216 throw new RuntimeException("Stub!"); 217 } 218 getExtensionValue(java.lang.String oid)219 public byte[] getExtensionValue(java.lang.String oid) { 220 throw new RuntimeException("Stub!"); 221 } 222 getNonCriticalExtensionOIDs()223 public java.util.Set<java.lang.String> getNonCriticalExtensionOIDs() { 224 throw new RuntimeException("Stub!"); 225 } 226 hasUnsupportedCriticalExtension()227 public boolean hasUnsupportedCriticalExtension() { 228 throw new RuntimeException("Stub!"); 229 } 230 checkValidity()231 public void checkValidity() 232 throws java.security.cert.CertificateExpiredException, 233 java.security.cert.CertificateNotYetValidException { 234 throw new RuntimeException("Stub!"); 235 } 236 checkValidity(java.util.Date date)237 public void checkValidity(java.util.Date date) 238 throws java.security.cert.CertificateExpiredException, 239 java.security.cert.CertificateNotYetValidException { 240 throw new RuntimeException("Stub!"); 241 } 242 getVersion()243 public int getVersion() { 244 throw new RuntimeException("Stub!"); 245 } 246 getSerialNumber()247 public java.math.BigInteger getSerialNumber() { 248 throw new RuntimeException("Stub!"); 249 } 250 getIssuerDN()251 public java.security.Principal getIssuerDN() { 252 throw new RuntimeException("Stub!"); 253 } 254 getSubjectDN()255 public java.security.Principal getSubjectDN() { 256 throw new RuntimeException("Stub!"); 257 } 258 getNotBefore()259 public java.util.Date getNotBefore() { 260 throw new RuntimeException("Stub!"); 261 } 262 getNotAfter()263 public java.util.Date getNotAfter() { 264 throw new RuntimeException("Stub!"); 265 } 266 getTBSCertificate()267 public byte[] getTBSCertificate() throws java.security.cert.CertificateEncodingException { 268 throw new RuntimeException("Stub!"); 269 } 270 getSignature()271 public byte[] getSignature() { 272 throw new RuntimeException("Stub!"); 273 } 274 getSigAlgName()275 public java.lang.String getSigAlgName() { 276 throw new RuntimeException("Stub!"); 277 } 278 getSigAlgOID()279 public java.lang.String getSigAlgOID() { 280 throw new RuntimeException("Stub!"); 281 } 282 getSigAlgParams()283 public byte[] getSigAlgParams() { 284 throw new RuntimeException("Stub!"); 285 } 286 getIssuerUniqueID()287 public boolean[] getIssuerUniqueID() { 288 throw new RuntimeException("Stub!"); 289 } 290 getSubjectUniqueID()291 public boolean[] getSubjectUniqueID() { 292 throw new RuntimeException("Stub!"); 293 } 294 getKeyUsage()295 public boolean[] getKeyUsage() { 296 throw new RuntimeException("Stub!"); 297 } 298 getBasicConstraints()299 public int getBasicConstraints() { 300 throw new RuntimeException("Stub!"); 301 } 302 getEncoded()303 public byte[] getEncoded() throws java.security.cert.CertificateEncodingException { 304 throw new RuntimeException("Stub!"); 305 } 306 verify(java.security.PublicKey key)307 public void verify(java.security.PublicKey key) 308 throws java.security.cert.CertificateException, java.security.InvalidKeyException, 309 java.security.NoSuchAlgorithmException, 310 java.security.NoSuchProviderException, java.security.SignatureException { 311 throw new RuntimeException("Stub!"); 312 } 313 verify(java.security.PublicKey key, java.lang.String sigProvider)314 public void verify(java.security.PublicKey key, java.lang.String sigProvider) 315 throws java.security.cert.CertificateException, java.security.InvalidKeyException, 316 java.security.NoSuchAlgorithmException, 317 java.security.NoSuchProviderException, java.security.SignatureException { 318 throw new RuntimeException("Stub!"); 319 } 320 toString()321 public java.lang.String toString() { 322 throw new RuntimeException("Stub!"); 323 } 324 getPublicKey()325 public java.security.PublicKey getPublicKey() { 326 throw new RuntimeException("Stub!"); 327 } 328 getExtendedKeyUsage()329 public java.util.List<java.lang.String> getExtendedKeyUsage() 330 throws java.security.cert.CertificateParsingException { 331 throw new RuntimeException("Stub!"); 332 } 333 getIssuerAlternativeNames()334 public java.util.Collection<java.util.List<?>> getIssuerAlternativeNames() 335 throws java.security.cert.CertificateParsingException { 336 throw new RuntimeException("Stub!"); 337 } 338 getIssuerX500Principal()339 public javax.security.auth.x500.X500Principal getIssuerX500Principal() { 340 throw new RuntimeException("Stub!"); 341 } 342 getSubjectAlternativeNames()343 public java.util.Collection<java.util.List<?>> getSubjectAlternativeNames() 344 throws java.security.cert.CertificateParsingException { 345 throw new RuntimeException("Stub!"); 346 } 347 getSubjectX500Principal()348 public javax.security.auth.x500.X500Principal getSubjectX500Principal() { 349 throw new RuntimeException("Stub!"); 350 } 351 verify(java.security.PublicKey key, java.security.Provider sigProvider)352 public void verify(java.security.PublicKey key, java.security.Provider sigProvider) 353 throws java.security.cert.CertificateException, java.security.InvalidKeyException, 354 java.security.NoSuchAlgorithmException, java.security.SignatureException { 355 throw new RuntimeException("Stub!"); 356 } 357 358 private final java.security.cert.X509Certificate wrapped; 359 360 { 361 wrapped = null; 362 } 363 } 364 } 365