2362N/A * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A ContentInfo type, as defined in PKCS#7. 0N/A * @author Benjamin Renaud 0N/A // pkcs7 pre-defined content types 0N/A private static int[]
pkcs7 = {
1,
2,
840,
113549,
1,
7};
0N/A private static int[]
data = {
1,
2,
840,
113549,
1,
7,
1};
0N/A private static int[]
sdata = {
1,
2,
840,
113549,
1,
7,
2};
0N/A private static int[]
edata = {
1,
2,
840,
113549,
1,
7,
3};
0N/A private static int[]
sedata = {
1,
2,
840,
113549,
1,
7,
4};
0N/A private static int[]
ddata = {
1,
2,
840,
113549,
1,
7,
5};
0N/A private static int[]
crdata = {
1,
2,
840,
113549,
1,
7,
6};
0N/A private static int[]
nsdata = {
2,
16,
840,
1,
113730,
2,
5};
0N/A // timestamp token (id-ct-TSTInfo) from RFC 3161 0N/A private static int[]
tstInfo = {
1,
2,
840,
113549,
1,
9,
16,
1,
4};
0N/A // this is for backwards-compatibility with JDK 1.1.x 0N/A private static final int[]
OLD_SDATA = {
1,
2,
840,
1113549,
1,
7,
2};
0N/A private static final int[]
OLD_DATA = {
1,
2,
840,
1113549,
1,
7,
1};
0N/A * The ASN.1 systax for the Netscape Certificate Sequence 0N/A * data type is defined 0N/A * Make a contentInfo of type data. 0N/A * Parses a PKCS#7 content info. 0N/A * Parses a PKCS#7 content info. 0N/A * <p>This constructor is used only for backwards compatibility with 0N/A * PKCS#7 blocks that were generated using JDK1.1.x. 0N/A * @param derin the ASN.1 encoding of the content info. 0N/A * @param oldStyle flag indicating whether or not the given content info 0N/A * is encoded according to JDK1.1.x. 0N/A // Parse the content type 0N/A // JDK1.1.x-style encoding 0N/A // This is the correct, standards-compliant encoding. 0N/A // Parse the content (OPTIONAL field). 0N/A // Skip the [0] EXPLICIT tag by pretending that the content is the 0N/A // one and only element in an implicitly tagged set 0N/A // content is optional, it could be external 0N/A // Add the [0] EXPLICIT tag in front of the content encoding 0N/A * Returns a byte array representation of the data held in 0N/A * the content field.