< prev index next >
test/jdk/java/lang/SecurityManager/CheckSecurityProvider.java
Print this page
rev 59383 : [mq]: final
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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.
@@ -56,16 +56,10 @@
*/
List<String> expected = new ArrayList<>();
// NOTE: the ordering must match what's defined inside java.security
- if (os.equals("SunOS")) {
- layer.findModule("jdk.crypto.ucrypto")
- .ifPresent(m -> expected.add("com.oracle.security.ucrypto.UcryptoProvider"));
- layer.findModule("jdk.crypto.cryptoki")
- .ifPresent(m -> expected.add("sun.security.pkcs11.SunPKCS11"));
- }
expected.add("sun.security.provider.Sun");
expected.add("sun.security.rsa.SunRsaSign");
layer.findModule("jdk.crypto.ec")
.ifPresent(m -> expected.add("sun.security.ec.SunEC"));
expected.add("sun.security.ssl.SunJSSE");
@@ -87,14 +81,12 @@
.ifPresent(m -> expected.add("sun.security.mscapi.SunMSCAPI"));
}
if (os.contains("OS X")) {
expected.add("apple.security.AppleProvider");
}
- if (!os.equals("SunOS")) {
layer.findModule("jdk.crypto.cryptoki")
.ifPresent(m -> expected.add("sun.security.pkcs11.SunPKCS11"));
- }
List<String> actual = Stream.of(Security.getProviders())
.map(p -> p.getClass().getName())
.collect(Collectors.toList());
< prev index next >