OpenJDK / loom / loom
changeset 40975:680639c9b307
8165689: Fix module dependencies for sun/security/pkcs11/* tests
Reviewed-by: mullan
line wrap: on
line diff
--- a/jdk/test/sun/security/ec/NSASuiteB/TestSHAwithECDSASignatureOids.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/ec/NSASuiteB/TestSHAwithECDSASignatureOids.java Thu Sep 15 13:03:03 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ * OID and algorithm transformation string should match. * Both could be able to be used to generate the algorithm instance. * @compile ../../TestSignatureOidHelper.java + * @modules jdk.crypto.ec * @run main TestSHAwithECDSASignatureOids */ public class TestSHAwithECDSASignatureOids {
--- a/jdk/test/sun/security/krb5/IPv6.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/krb5/IPv6.java Thu Sep 15 13:03:03 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,11 +25,16 @@ * @test * @bug 6877357 6885166 * @run main/othervm IPv6 + * @modules jdk.security.auth * @summary IPv6 address does not work */ import com.sun.security.auth.module.Krb5LoginModule; -import java.io.*; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.FileOutputStream; +import java.io.PrintStream; +import java.io.StringReader; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher;
--- a/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ReinitCipher * @run main/othervm ReinitCipher sm */
--- a/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6687725 * @summary Test internal PKCS5Padding impl with various error conditions. * @author Valerie Peng * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestPKCS5PaddingError * @run main/othervm TestPKCS5PaddingError sm */
--- a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4898468 6994008 * @summary basic test for RSA cipher * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestRSACipher * @run main/othervm TestRSACipher sm */
--- a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6572331 6994008 * @summary basic test for RSA cipher key wrapping functionality * @author Valerie Peng * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestRSACipherWrap * @run main/othervm TestRSACipherWrap sm */
--- a/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6994008 * @summary basic test for RSA/ECB/NoPadding cipher * @author Valerie Peng * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestRawRSACipher * @run main/othervm TestRawRSACipher sm */
--- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4898461 6604496 * @summary basic test for symmetric ciphers with padding * @author Valerie Peng * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestSymmCiphers * @run main/othervm TestSymmCiphers sm */
--- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4898484 6604496 8001284 * @summary basic test for symmetric ciphers with no padding * @author Valerie Peng * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestSymmCiphersNoPad * @run main/othervm TestSymmCiphersNoPad sm */
--- a/jdk/test/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,21 +21,23 @@ * questions. */ -/** +/* * @test * @bug 8072452 * @summary Support DHE sizes up to 8192-bits and DSA sizes up to 3072-bits * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm SupportedDHKeys * @run main/othervm SupportedDHKeys sm */ import java.math.BigInteger; - -import java.security.*; -import javax.crypto.*; -import javax.crypto.interfaces.*; -import javax.crypto.spec.*; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Provider; +import javax.crypto.interfaces.DHPrivateKey; +import javax.crypto.interfaces.DHPublicKey; +import javax.crypto.spec.DHParameterSpec; public class SupportedDHKeys extends PKCS11Test {
--- a/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/TestDH.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4921804 6324825 * @summary Verify that DH works properly * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestDH * @run main/othervm TestDH sm */
--- a/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/TestInterop.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,11 +21,12 @@ * questions. */ -/** +/* * @test * @bug 7146728 * @summary Interop test for DH with secret that has a leading 0x00 byte * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestInterop * @run main/othervm TestInterop sm */
--- a/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/TestShort.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4942494 7146728 * @summary KAT test for DH (normal and with secret that has leading a 0x00 byte) * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestShort * @run main/othervm TestShort sm */
--- a/jdk/test/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,21 +21,19 @@ * questions. */ -/** +/* * @test * @bug 8072452 * @summary Support DHE sizes up to 8192-bits and DSA sizes up to 3072-bits * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm UnsupportedDHKeys * @run main/othervm UnsupportedDHKeys sm */ -import java.math.BigInteger; - -import java.security.*; -import javax.crypto.*; -import javax.crypto.interfaces.*; -import javax.crypto.spec.*; +import java.security.InvalidParameterException; +import java.security.KeyPairGenerator; +import java.security.Provider; public class UnsupportedDHKeys extends PKCS11Test {
--- a/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4898479 * @summary Verify that the parity bits are set correctly * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm DESParity * @run main/othervm DESParity sm */
--- a/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4917233 6461727 6490213 6720456 * @summary test the KeyGenerator * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestKeyGenerator * @run main/othervm TestKeyGenerator sm */
--- a/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 7196382 8072452 * @summary Ensure that DH key pairs can be generated for 512 - 8192 bits * @author Valerie Peng * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestDH2048 * @run main/othervm TestDH2048 sm */
--- a/jdk/test/sun/security/pkcs11/Mac/MacKAT.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Mac/MacKAT.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,6 +21,17 @@ * questions. */ +/* + * @test + * @bug 4846410 6313661 4963723 + * @summary Basic known-answer-test for Hmac algorithms + * @author Andreas Sterbenz + * @library .. + * @modules jdk.crypto.pkcs11 + * @run main/othervm MacKAT + * @run main/othervm MacKAT sm + */ + import java.io.UnsupportedEncodingException; import java.security.Provider; import java.util.Arrays; @@ -30,15 +41,6 @@ import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; -/** - * @test - * @bug 4846410 6313661 4963723 - * @summary Basic known-answer-test for Hmac algorithms - * @author Andreas Sterbenz - * @library .. - * @run main/othervm MacKAT - * @run main/othervm MacKAT sm - */ public class MacKAT extends PKCS11Test { private final static byte[] ALONG, BLONG, BKEY, BKEY_20, DDDATA_50,
--- a/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,6 +21,18 @@ * questions. */ +/* + * @test + * @bug 8048603 + * @summary Check if doFinal and update operation result in same Mac + * @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin + * @library .. + * @modules jdk.crypto.pkcs11 + * @run main/othervm MacSameTest + * @run main/othervm MacSameTest sm + * @key randomness + */ + import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; @@ -30,16 +42,6 @@ import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; -/** - * @test - * @bug 8048603 - * @summary Check if doFinal and update operation result in same Mac - * @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin - * @library .. - * @run main/othervm MacSameTest - * @run main/othervm MacSameTest sm - * @key randomness - */ public class MacSameTest extends PKCS11Test { private static final int MESSAGE_SIZE = 25;
--- a/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ReinitMac * @run main/othervm ReinitMac sm */
--- a/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test the MessageDigest.update(ByteBuffer) method * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ByteBuffers * @run main/othervm ByteBuffers sm */
--- a/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/MessageDigest/DigestKAT.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Basic known-answer-test for all our MessageDigest algorithms * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm DigestKAT * @run main/othervm DigestKAT sm */
--- a/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ReinitDigest * @run main/othervm ReinitDigest sm */
--- a/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6414899 * @summary Ensure the cloning functionality works. * @author Valerie Peng * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestCloning * @run main/othervm TestCloning sm */
--- a/jdk/test/sun/security/pkcs11/Provider/Absolute.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Provider/Absolute.java Thu Sep 15 13:03:03 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,13 +20,16 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -/** +/* * @test * @bug 7003952 7191662 * @library .. + * @modules jdk.crypto.pkcs11 * @summary load DLLs and launch executables using fully qualified path */ -import java.security.*; + +import java.security.InvalidParameterException; +import java.security.Provider; public class Absolute {
--- a/jdk/test/sun/security/pkcs11/SampleTest.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/SampleTest.java Thu Sep 15 13:03:03 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,20 +21,16 @@ * questions. */ -/** +/* * @test * @bug 4000000 * @summary XXX todo * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 */ -import java.io.*; -import java.util.*; - -import java.security.*; - -import javax.crypto.*; +import java.security.Provider; public class SampleTest extends PKCS11Test {
--- a/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6414980 * @summary Test that the PKCS#11 KeyStore handles RSA, DSA, and EC keys * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm AddPrivateKey * @run main/othervm AddPrivateKey sm policy */
--- a/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Secmod/AddTrustedCert.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6298106 * @summary make sure we can add a trusted cert to the NSS KeyStore module * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm AddTrustedCert * @run main/othervm AddTrustedCert sm policy */
--- a/jdk/test/sun/security/pkcs11/Secmod/Crypto.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Secmod/Crypto.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6329006 * @summary verify that NSS no-db mode works correctly * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm Crypto * @run main/othervm Crypto sm policy */
--- a/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6273877 6322208 6275523 * @summary make sure we can access the NSS softtoken KeyStore * and use a private key * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm GetPrivateKey * @run main/othervm GetPrivateKey sm policy */
--- a/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Secmod/JksSetPrivateKey.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6269847 * @summary store a NSS PKCS11 PrivateKeyEntry to JKS KeyStore throws confusing NPE * @author Wang Weijun * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm JksSetPrivateKey * @run main/othervm JksSetPrivateKey sm policy */
--- a/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Secmod/LoadKeystore.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,6 +21,16 @@ * questions. */ +/* + * @test + * @bug 8048622 8134232 + * @summary Checks that PKCS#11 keystore can't be loaded with wrong password + * @library ../ + * @modules jdk.crypto.pkcs11 + * @run main/othervm LoadKeystore + * @run main/othervm LoadKeystore sm policy + */ + import java.io.File; import java.io.IOException; import java.security.KeyStore; @@ -30,14 +40,6 @@ import java.security.UnrecoverableKeyException; import java.util.Collections; -/* - * @test - * @bug 8048622 8134232 - * @summary Checks that PKCS#11 keystore can't be loaded with wrong password - * @library ../ - * @run main/othervm LoadKeystore - * @run main/othervm LoadKeystore sm policy - */ public class LoadKeystore extends SecmodTest { public static void main(String[] args) throws Exception {
--- a/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Secmod/TrustAnchors.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6298106 6275523 6420252 8059627 * @summary make sure we can access the NSS trust anchor module * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TrustAnchors * @run main/othervm TrustAnchors sm policy */
--- a/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6246411 * @summary basic test for PKCS#11 SecureRandom * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm Basic * @run main/othervm Basic sm */
--- a/jdk/test/sun/security/pkcs11/SecureRandom/TestDeserialization.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/SecureRandom/TestDeserialization.java Thu Sep 15 13:03:03 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,15 +21,22 @@ * questions. */ -/** +/* * @test * @bug 6837847 * @summary Ensure a deserialized PKCS#11 SecureRandom is functional. * @library .. + * @modules jdk.crypto.pkcs11 */ -import java.security.*; -import java.io.*; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.security.NoSuchAlgorithmException; +import java.security.Provider; +import java.security.SecureRandom; +import java.security.Security; public class TestDeserialization extends PKCS11Test {
--- a/jdk/test/sun/security/pkcs11/Serialize/SerializeProvider.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Serialize/SerializeProvider.java Thu Sep 15 13:03:03 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,18 +21,22 @@ * questions. */ -/** +/* * @test * @bug 4921802 * @summary Test that the SunPKCS11 provider can be serialized * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 */ -import java.io.*; -import java.util.*; - -import java.security.*; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.security.Provider; +import java.security.Security; public class SerializeProvider extends PKCS11Test {
--- a/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test the Signature.update(ByteBuffer) method * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ByteBuffers * @run main/othervm ByteBuffers sm */
--- a/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java Thu Sep 15 13:03:03 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary test that reinitializing Signatures works correctly * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main ReinitSignature * @run main ReinitSignature * @run main ReinitSignature @@ -330,9 +331,13 @@ * @run main ReinitSignature */ -import java.util.*; - -import java.security.*; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PrivateKey; +import java.security.Provider; +import java.security.PublicKey; +import java.security.Signature; +import java.util.Random; public class ReinitSignature extends PKCS11Test {
--- a/jdk/test/sun/security/pkcs11/Signature/TestDSA.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Signature/TestDSA.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary basic test of SHA1withDSA and RawDSA signing/verifying * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestDSA * @run main/othervm TestDSA sm */
--- a/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java Thu Sep 15 13:03:03 2016 +0300 @@ -28,6 +28,7 @@ * with unsupported key sizes * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestDSAKeyLength * @run main/othervm TestDSAKeyLength sm */
--- a/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test %W% %E% * @bug 6695485 * @summary Make sure initSign/initVerify() check RSA key lengths * @author Yu-Ching Valerie Peng * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestRSAKeyLength * @run main/othervm TestRSAKeyLength sm */
--- a/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 6414980 8051972 * @summary Make sure that we can parse certificates using various named curves @@ -29,6 +29,7 @@ * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @modules jdk.crypto.pkcs11 * @run main/othervm ReadCertificates * @run main/othervm ReadCertificates sm policy */
--- a/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary Verify that we can parse ECPrivateKeys from PKCS#12 and use them @@ -29,6 +29,7 @@ * @library .. * @library ../../../../java/security/testlibrary * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm ReadPKCS12 * @run main/othervm ReadPKCS12 sm policy */
--- a/jdk/test/sun/security/pkcs11/ec/TestECDH.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/ec/TestECDH.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary Basic known answer test for ECDH * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @modules jdk.crypto.pkcs11 * @run main/othervm TestECDH * @run main/othervm TestECDH sm policy */
--- a/jdk/test/sun/security/pkcs11/ec/TestECDH2.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/ec/TestECDH2.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary basic test of ECDSA signatures for P-256 and P-384 from the @@ -29,6 +29,7 @@ * @library .. * @library ../../../../java/security/testlibrary * @modules java.base/sun.security.util + * jdk.crypto.pkcs11 * @compile -XDignore.symbol.file TestECDH2.java * @run main/othervm TestECDH2 * @run main/othervm TestECDH2 sm
--- a/jdk/test/sun/security/pkcs11/ec/TestECDSA.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/ec/TestECDSA.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 8042967 * @summary basic test of SHA1withECDSA and NONEwithECDSA signing/verifying @@ -29,6 +29,7 @@ * @library .. * @library ../../../../java/security/testlibrary * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestECDSA * @run main/othervm TestECDSA sm policy */
--- a/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/ec/TestECDSA2.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary basic test of ECDSA signatures for P-256 and P-384 from the @@ -29,6 +29,7 @@ * @library .. * @library ../../../../java/security/testlibrary * @modules java.base/sun.security.util + * jdk.crypto.pkcs11 * @compile -XDignore.symbol.file TestECDSA2.java * @run main/othervm TestECDSA2 * @run main/othervm TestECDSA2 sm
--- a/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/ec/TestECGenSpec.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary Verify that we can use ECGenParameterSpec * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestECGenSpec * @run main/othervm TestECGenSpec sm */
--- a/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/ec/TestKeyFactory.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 6405536 * @summary Test the P11ECKeyFactory * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestKeyFactory * @run main/othervm TestKeyFactory sm */
--- a/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6231216 * @summary Verify key wrapping (of extractable keys) works for RSA/PKCS1 * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm KeyWrap * @run main/othervm KeyWrap sm */
--- a/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test the new RSA provider can verify all the RSA certs in the cacerts file * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @modules jdk.crypto.pkcs11 * @run main/othervm TestCACerts * @run main/othervm TestCACerts sm TestCACerts.policy */
--- a/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyFactory.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,12 +21,13 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test KeyFactory of the new RSA provider * @author Andreas Sterbenz * @library .. + * @modules jdk.crypto.pkcs11 * @run main/othervm TestKeyFactory * @run main/othervm TestKeyFactory sm rsakeys.ks.policy */
--- a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Verify that the RSA KeyPairGenerator works (use -Dseed=X to set PRNG seed) @@ -29,6 +29,7 @@ * @library .. * @library /lib/testlibrary * @build jdk.testlibrary.* + * @modules jdk.crypto.pkcs11 * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator * sm TestKeyPairGenerator.policy
--- a/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 4856966 * @summary Test signing/verifying using all the signature algorithms * @author Andreas Sterbenz * @library .. * @key randomness + * @modules jdk.crypto.pkcs11 * @run main/othervm TestSignatures * @run main/othervm TestSignatures sm rsakeys.ks.policy */
--- a/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java Thu Sep 15 13:03:03 2016 +0300 @@ -33,6 +33,7 @@ * @author Andreas Sterbenz * @library .. * @library ../../../../java/security/testlibrary + * @modules jdk.crypto.pkcs11 * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" * ClientJSSEServerJSSE * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1"
--- a/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/tls/TestKeyMaterial.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6316539 * @summary Known-answer-test for TlsKeyMaterial generator * @author Andreas Sterbenz * @library .. * @modules java.base/sun.security.internal.spec + * jdk.crypto.pkcs11 * @run main/othervm TestKeyMaterial * @run main/othervm TestKeyMaterial sm policy */
--- a/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java Thu Sep 15 13:03:03 2016 +0300 @@ -27,6 +27,7 @@ * @summary Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement * @library .. * @author Pasi Eronen + * @modules jdk.crypto.pkcs11 * @run main/othervm TestLeadingZeroesP11 * @run main/othervm TestLeadingZeroesP11 sm */
--- a/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/tls/TestMasterSecret.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 6316539 * @summary Known-answer-test for TlsMasterSecret generator @@ -29,6 +29,7 @@ * @library .. * @modules java.base/sun.security.internal.interfaces * java.base/sun.security.internal.spec + * jdk.crypto.pkcs11 * @run main/othervm TestMasterSecret * @run main/othervm TestMasterSecret sm TestMasterSecret.policy */
--- a/jdk/test/sun/security/pkcs11/tls/TestPRF.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/tls/TestPRF.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6316539 6345251 * @summary Basic known-answer-test for TlsPrf * @author Andreas Sterbenz * @library .. * @modules java.base/sun.security.internal.spec + * jdk.crypto.pkcs11 * @run main/othervm TestPRF * @run main/othervm TestPRF sm policy */
--- a/jdk/test/sun/security/pkcs11/tls/TestPremaster.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/pkcs11/tls/TestPremaster.java Thu Sep 15 13:03:03 2016 +0300 @@ -21,13 +21,14 @@ * questions. */ -/** +/* * @test * @bug 6316539 * @summary Basic tests for TlsRsaPremasterSecret generator * @author Andreas Sterbenz * @library .. * @modules java.base/sun.security.internal.spec + * jdk.crypto.pkcs11 * @run main/othervm TestPremaster * @run main/othervm TestPremaster sm policy */
--- a/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java Thu Sep 15 13:03:03 2016 +0300 @@ -26,6 +26,7 @@ * @bug 8138766 * @summary New default -sigalg for keytool * @modules java.base/sun.security.tools.keytool + * @modules jdk.crypto.ec * @run main/othervm DefaultSignatureAlgorithm RSA 1024 SHA256withRSA * @run main/othervm DefaultSignatureAlgorithm RSA 3072 SHA256withRSA * @run main/othervm DefaultSignatureAlgorithm RSA 3073 SHA384withRSA
--- a/jdk/test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java Thu Sep 15 13:03:03 2016 +0300 @@ -23,6 +23,15 @@ * questions. */ +/* + * @test + * @bug 8134708 + * @summary Check if LDAP resources from CRLDP and AIA extensions can be loaded + * @run main/othervm ExtensionsWithLDAP CRLDP ldap.host.for.crldp + * @modules jdk.security.auth + * @run main/othervm ExtensionsWithLDAP AIA ldap.host.for.aia + */ + import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; @@ -45,13 +54,6 @@ import java.util.Set; import java.util.function.Consumer; -/* - * @test - * @bug 8134708 - * @summary Check if LDAP resources from CRLDP and AIA extensions can be loaded - * @run main/othervm ExtensionsWithLDAP CRLDP ldap.host.for.crldp - * @run main/othervm ExtensionsWithLDAP AIA ldap.host.for.aia - */ public class ExtensionsWithLDAP { /*
--- a/jdk/test/sun/security/x509/X509CertImpl/V3Certificate.java Tue Sep 13 11:38:31 2016 +0200 +++ b/jdk/test/sun/security/x509/X509CertImpl/V3Certificate.java Thu Sep 15 13:03:03 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,6 +21,17 @@ * questions. */ +/* + * @test + * @bug 8049237 + * @modules java.base/sun.security.x509 + * java.base/sun.security.util + * jdk.crypto.ec + * @summary This test generates V3 certificate with all the supported + * extensions. Writes back the generated certificate in to a file and checks for + * equality with the original certificate. + */ + import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -28,7 +39,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; -import static java.lang.System.out; import java.security.InvalidKeyException; import java.security.KeyPair; import java.security.KeyPairGenerator; @@ -50,15 +60,8 @@ import sun.security.util.ObjectIdentifier; import sun.security.x509.*; -/** - * @test - * @bug 8049237 - * @modules java.base/sun.security.x509 - * java.base/sun.security.util - * @summary This test generates V3 certificate with all the supported - * extensions. Writes back the generated certificate in to a file and checks for - * equality with the original certificate. - */ +import static java.lang.System.out; + public class V3Certificate { public static final String V3_FILE = "certV3";