9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8048357
27 * @summary PKCS8 Standards Conformance Tests
28 * @library /test/lib
29 * @requires (os.family != "solaris")
30 * @modules java.base/sun.security.pkcs
31 * java.base/sun.security.util
32 * java.base/sun.security.provider
33 * java.base/sun.security.x509
34 * @compile -XDignore.symbol.file PKCS8Test.java
35 * @run main PKCS8Test
36 */
37
38 /*
39 * Skip Solaris since the DSAPrivateKeys returned by
40 * SunPKCS11 Provider are not subclasses of PKCS8Key
41 */
42 import java.io.IOException;
43 import java.math.BigInteger;
44 import java.security.InvalidKeyException;
45 import java.util.Arrays;
46 import sun.security.pkcs.PKCS8Key;
47 import sun.security.provider.DSAPrivateKey;
48 import sun.security.util.DerOutputStream;
49 import sun.security.util.DerValue;
50 import sun.security.x509.AlgorithmId;
51 import jdk.test.lib.hexdump.HexPrinter;
52 import static java.lang.System.out;
53
54 public class PKCS8Test {
55
56 static final DerOutputStream derOutput = new DerOutputStream();
57
58 static final String FORMAT = "PKCS#8";
59 static final String EXPECTED_ALG_ID_CHRS = "DSA\n\tp: 02\n\tq: 03\n"
60 + "\tg: 04\n";
61 static final String ALGORITHM = "DSA";
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8048357
27 * @summary PKCS8 Standards Conformance Tests
28 * @library /test/lib
29 * @modules java.base/sun.security.pkcs
30 * java.base/sun.security.util
31 * java.base/sun.security.provider
32 * java.base/sun.security.x509
33 * @compile -XDignore.symbol.file PKCS8Test.java
34 * @run main PKCS8Test
35 */
36
37 import java.io.IOException;
38 import java.math.BigInteger;
39 import java.security.InvalidKeyException;
40 import java.util.Arrays;
41 import sun.security.pkcs.PKCS8Key;
42 import sun.security.provider.DSAPrivateKey;
43 import sun.security.util.DerOutputStream;
44 import sun.security.util.DerValue;
45 import sun.security.x509.AlgorithmId;
46 import jdk.test.lib.hexdump.HexPrinter;
47 import static java.lang.System.out;
48
49 public class PKCS8Test {
50
51 static final DerOutputStream derOutput = new DerOutputStream();
52
53 static final String FORMAT = "PKCS#8";
54 static final String EXPECTED_ALG_ID_CHRS = "DSA\n\tp: 02\n\tq: 03\n"
55 + "\tg: 04\n";
56 static final String ALGORITHM = "DSA";
|