mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8344397: Remove Security Manager dependencies from java.security and sun.security packages
Reviewed-by: rriggs, hchao, weijun, alanb
This commit is contained in:
parent
3d0d0e6290
commit
940aa7c4cf
45 changed files with 406 additions and 1436 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -43,26 +43,11 @@ public final class SunRsaSign extends Provider {
|
|||
@java.io.Serial
|
||||
private static final long serialVersionUID = 866040293550393045L;
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
public SunRsaSign() {
|
||||
super("SunRsaSign", PROVIDER_VER, "Sun RSA signature provider");
|
||||
|
||||
Provider p = this;
|
||||
Iterator<Provider.Service> serviceIter = new SunRsaSignEntries(p).iterator();
|
||||
|
||||
if (System.getSecurityManager() == null) {
|
||||
putEntries(serviceIter);
|
||||
} else {
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
@Override
|
||||
public Void run() {
|
||||
putEntries(serviceIter);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
void putEntries(Iterator<Provider.Service> i) {
|
||||
Iterator<Provider.Service> i = new SunRsaSignEntries(p).iterator();
|
||||
while (i.hasNext()) {
|
||||
putService(i.next());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue