1 /*
2 * Copyright (c) 1996, 2011, 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
27 package sun.security.pkcs;
28
29 import java.io.*;
30 import sun.security.util.*;
31
32 /**
33 * A ContentInfo type, as defined in PKCS#7.
34 *
35 * @author Benjamin Renaud
36 */
37
38 @SuppressWarnings({"unchecked", "deprecation", "all"})
39 @libcore.api.CorePlatformApi
40 @libcore.api.Hide
41 public class ContentInfo {
42
ContentInfo(sun.security.util.ObjectIdentifier contentType, sun.security.util.DerValue content)43 public ContentInfo(sun.security.util.ObjectIdentifier contentType, sun.security.util.DerValue content) { throw new RuntimeException("Stub!"); }
44
45 /**
46 * Make a contentInfo of type data.
47 */
48
ContentInfo(byte[] bytes)49 public ContentInfo(byte[] bytes) { throw new RuntimeException("Stub!"); }
50
51 /**
52 * Parses a PKCS#7 content info.
53 */
54
ContentInfo(sun.security.util.DerInputStream derin)55 public ContentInfo(sun.security.util.DerInputStream derin) throws java.io.IOException, sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
56
57 /**
58 * Parses a PKCS#7 content info.
59 *
60 * <p>This constructor is used only for backwards compatibility with
61 * PKCS#7 blocks that were generated using JDK1.1.x.
62 *
63 * @param derin the ASN.1 encoding of the content info.
64 * @param oldStyle flag indicating whether or not the given content info
65 * is encoded according to JDK1.1.x.
66 */
67
ContentInfo(sun.security.util.DerInputStream derin, boolean oldStyle)68 public ContentInfo(sun.security.util.DerInputStream derin, boolean oldStyle) throws java.io.IOException, sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
69
getContent()70 public sun.security.util.DerValue getContent() { throw new RuntimeException("Stub!"); }
71
getContentType()72 public sun.security.util.ObjectIdentifier getContentType() { throw new RuntimeException("Stub!"); }
73
getData()74 public byte[] getData() throws java.io.IOException { throw new RuntimeException("Stub!"); }
75
encode(sun.security.util.DerOutputStream out)76 public void encode(sun.security.util.DerOutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
77
78 /**
79 * Returns a byte array representation of the data held in
80 * the content field.
81 */
82
83 @libcore.api.CorePlatformApi
getContentBytes()84 public byte[] getContentBytes() throws java.io.IOException { throw new RuntimeException("Stub!"); }
85
toString()86 public java.lang.String toString() { throw new RuntimeException("Stub!"); }
87
88 public static sun.security.util.ObjectIdentifier DATA_OID;
89
90 public static sun.security.util.ObjectIdentifier DIGESTED_DATA_OID;
91
92 public static sun.security.util.ObjectIdentifier ENCRYPTED_DATA_OID;
93
94 public static sun.security.util.ObjectIdentifier ENVELOPED_DATA_OID;
95
96 public static sun.security.util.ObjectIdentifier NETSCAPE_CERT_SEQUENCE_OID;
97
98 public static sun.security.util.ObjectIdentifier OLD_DATA_OID;
99
100 public static sun.security.util.ObjectIdentifier OLD_SIGNED_DATA_OID;
101
102 public static sun.security.util.ObjectIdentifier PKCS7_OID;
103
104 public static sun.security.util.ObjectIdentifier SIGNED_AND_ENVELOPED_DATA_OID;
105
106 public static sun.security.util.ObjectIdentifier SIGNED_DATA_OID;
107
108 public static sun.security.util.ObjectIdentifier TIMESTAMP_TOKEN_INFO_OID;
109 }
110
111