8344992: Remove Security Manager dependencies from java.security.cert API and implementations

Reviewed-by: rriggs, hchao
This commit is contained in:
Sean Mullan 2024-11-26 18:40:52 +00:00
parent 65c98e577f
commit c5de307284
12 changed files with 73 additions and 137 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2024, 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,9 @@
package java.security.cert;
import java.security.AccessController;
import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivilegedAction;
import java.security.Provider;
import java.security.Security;
import java.util.Collection;
@ -426,11 +424,8 @@ public class CertStore {
* {@code certstore.type} security property, or the string
* {@literal "LDAP"} if no such property exists.
*/
@SuppressWarnings("removal")
public static final String getDefaultType() {
String cstype;
cstype = AccessController.doPrivileged((PrivilegedAction<String>) () ->
Security.getProperty(CERTSTORE_TYPE));
String cstype = Security.getProperty(CERTSTORE_TYPE);
if (cstype == null) {
cstype = "LDAP";
}