< prev index next >
src/java.base/share/classes/java/security/Security.java
Print this page
@@ -28,10 +28,12 @@
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.io.*;
import java.net.URL;
+import jdk.internal.event.EventHelper;
+import jdk.internal.event.SecurityPropertyModificationEvent;
import jdk.internal.misc.SharedSecrets;
import jdk.internal.util.StaticProperty;
import sun.security.util.Debug;
import sun.security.util.PropertyExpander;
@@ -793,10 +795,20 @@
*/
public static void setProperty(String key, String datum) {
check("setProperty."+key);
props.put(key, datum);
invalidateSMCache(key); /* See below. */
+
+ SecurityPropertyModificationEvent spe = new SecurityPropertyModificationEvent();
+ // following is a no-op if event is disabled
+ spe.key = key;
+ spe.value = datum;
+ spe.commit();
+
+ if (EventHelper.isLoggingSecurity()) {
+ EventHelper.logSecurityPropertyEvent(key, datum);
+ }
}
/*
* Implementation detail: If the property we just set in
* setProperty() was either "package.access" or
< prev index next >