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 8138766 8227059 8227595
27 * @summary New default -sigalg for keytool
28 * @library /test/lib
29 * @build java.base/sun.security.rsa.RSAKeyPairGenerator
30 * java.base/sun.security.provider.DSAKeyPairGenerator
31 * jdk.crypto.ec/sun.security.ec.ECKeyPairGenerator
32 * @requires os.family != "solaris"
33 * @run main DefaultSignatureAlgorithm
34 * @modules jdk.crypto.ec
35 */
36
37 // This test is excluded from Solaris because the RSA key pair generator
38 // is extremely slow there with a big keysize. Please note the fake
39 // KeyPairGenerator will not be used because of provider preferences.
40
41 import jdk.test.lib.Asserts;
42 import jdk.test.lib.SecurityTools;
43 import jdk.test.lib.process.OutputAnalyzer;
44
45 import java.io.File;
46 import java.security.KeyStore;
47 import java.security.cert.X509Certificate;
48
49 public class DefaultSignatureAlgorithm {
50
51 static int pos = 0;
52
53 public static void main(String[] args) throws Exception {
54 check("RSA", 1024, null, "SHA256withRSA");
55 check("RSA", 3072, null, "SHA256withRSA");
56 check("RSA", 3073, null, "SHA384withRSA");
57 check("RSA", 7680, null, "SHA384withRSA");
58 check("RSA", 7681, null, "SHA512withRSA");
59
|
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 8138766 8227059 8227595
27 * @summary New default -sigalg for keytool
28 * @library /test/lib
29 * @build java.base/sun.security.rsa.RSAKeyPairGenerator
30 * java.base/sun.security.provider.DSAKeyPairGenerator
31 * jdk.crypto.ec/sun.security.ec.ECKeyPairGenerator
32 * @run main DefaultSignatureAlgorithm
33 * @modules jdk.crypto.ec
34 */
35
36 import jdk.test.lib.Asserts;
37 import jdk.test.lib.SecurityTools;
38 import jdk.test.lib.process.OutputAnalyzer;
39
40 import java.io.File;
41 import java.security.KeyStore;
42 import java.security.cert.X509Certificate;
43
44 public class DefaultSignatureAlgorithm {
45
46 static int pos = 0;
47
48 public static void main(String[] args) throws Exception {
49 check("RSA", 1024, null, "SHA256withRSA");
50 check("RSA", 3072, null, "SHA256withRSA");
51 check("RSA", 3073, null, "SHA384withRSA");
52 check("RSA", 7680, null, "SHA384withRSA");
53 check("RSA", 7681, null, "SHA512withRSA");
54
|