< prev index next >

test/jdk/java/security/KeyStore/TestKeyStoreBasic.java

Print this page
rev 59383 : [mq]: final

*** 1,7 **** /* ! * Copyright (c) 2001, 2015, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2001, 2020, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 110,120 **** .toCharArray(); private static final String[] KS_Type = { "jks", "jceks", "pkcs12", "PKCS11KeyStore" }; private static final String[] PROVIDERS = { ! "SUN", "SunJCE", "SunJSSE", "SunPKCS11-Solaris" }; private static final String ALIAS_HEAD = "test"; private static final String CRYPTO_ALG = "PBEWithHmacSHA256AndAES_128"; --- 110,120 ---- .toCharArray(); private static final String[] KS_Type = { "jks", "jceks", "pkcs12", "PKCS11KeyStore" }; private static final String[] PROVIDERS = { ! "SUN", "SunJCE", "SunJSSE" }; private static final String ALIAS_HEAD = "test"; private static final String CRYPTO_ALG = "PBEWithHmacSHA256AndAES_128";
*** 123,152 **** jstest.run(); } public void run() throws Exception { for (String provider : PROVIDERS) { - try { runTest(provider); System.out.println("Test with provider " + provider + " passed"); - } catch (java.security.KeyStoreException e) { - if (provider.equals("SunPKCS11-Solaris")) { - System.out.println("KeyStoreException is expected: " - + "PKCS11KeyStore is invalid keystore type: " + e); - } else { - throw e; - } - } catch (NoSuchProviderException e) { - String osName = System.getProperty("os.name"); - if (provider.equals("SunPKCS11-Solaris") - && !osName.equals("SunOS")) { - System.out.println("Skip SunPKCS11-Solaris provider on " - + osName); - } else { - throw e; - } - } } } public void runTest(String provider) throws Exception { --- 123,134 ----
< prev index next >