提交 c20d6d29 编写于 作者: M mullan

8016848: javax_security/auth/login tests fail in compact 1 and 2 profiles

Summary: Change the default value of the "login.configuration.provider" security property to sun.security.provider.ConfigFile
Reviewed-by: xuelei
上级 36aa0306
/* /*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,9 +30,9 @@ import javax.security.auth.login.Configuration; ...@@ -30,9 +30,9 @@ import javax.security.auth.login.Configuration;
import java.net.URI; import java.net.URI;
// NOTE: As of JDK 8, this class instantiates // NOTE: As of JDK 8, this class instantiates
// sun.security.provider.ConfigSpiFile and forwards all methods to that // sun.security.provider.ConfigFile.Spi and forwards all methods to that
// implementation. All implementation fixes and enhancements should be made to // implementation. All implementation fixes and enhancements should be made to
// sun.security.provider.ConfigSpiFile and not this class. // sun.security.provider.ConfigFile.Spi and not this class.
// See JDK-8005117 for more information. // See JDK-8005117 for more information.
/** /**
...@@ -85,7 +85,7 @@ import java.net.URI; ...@@ -85,7 +85,7 @@ import java.net.URI;
*/ */
public class ConfigFile extends Configuration { public class ConfigFile extends Configuration {
private sun.security.provider.ConfigSpiFile configFile; private final sun.security.provider.ConfigFile.Spi spi;
/** /**
* Create a new {@code Configuration} object. * Create a new {@code Configuration} object.
...@@ -94,7 +94,7 @@ public class ConfigFile extends Configuration { ...@@ -94,7 +94,7 @@ public class ConfigFile extends Configuration {
* initialized * initialized
*/ */
public ConfigFile() { public ConfigFile() {
configFile = new sun.security.provider.ConfigSpiFile(); spi = new sun.security.provider.ConfigFile.Spi();
} }
/** /**
...@@ -106,7 +106,7 @@ public class ConfigFile extends Configuration { ...@@ -106,7 +106,7 @@ public class ConfigFile extends Configuration {
* @throws NullPointerException if {@code uri} is null * @throws NullPointerException if {@code uri} is null
*/ */
public ConfigFile(URI uri) { public ConfigFile(URI uri) {
configFile = new sun.security.provider.ConfigSpiFile(uri); spi = new sun.security.provider.ConfigFile.Spi(uri);
} }
/** /**
...@@ -123,7 +123,7 @@ public class ConfigFile extends Configuration { ...@@ -123,7 +123,7 @@ public class ConfigFile extends Configuration {
public AppConfigurationEntry[] getAppConfigurationEntry public AppConfigurationEntry[] getAppConfigurationEntry
(String applicationName) { (String applicationName) {
return configFile.engineGetAppConfigurationEntry(applicationName); return spi.engineGetAppConfigurationEntry(applicationName);
} }
/** /**
...@@ -134,7 +134,7 @@ public class ConfigFile extends Configuration { ...@@ -134,7 +134,7 @@ public class ConfigFile extends Configuration {
* to refresh the {@code Configuration} * to refresh the {@code Configuration}
*/ */
@Override @Override
public synchronized void refresh() { public void refresh() {
configFile.engineRefresh(); spi.engineRefresh();
} }
} }
...@@ -75,7 +75,7 @@ import sun.security.jca.GetInstance; ...@@ -75,7 +75,7 @@ import sun.security.jca.GetInstance;
* LoginModules configured for that application. Each {@code LoginModule} * LoginModules configured for that application. Each {@code LoginModule}
* is specified via its fully qualified class name. * is specified via its fully qualified class name.
* Authentication proceeds down the module list in the exact order specified. * Authentication proceeds down the module list in the exact order specified.
* If an application does not have specific entry, * If an application does not have a specific entry,
* it defaults to the specific entry for "<i>other</i>". * it defaults to the specific entry for "<i>other</i>".
* *
* <p> The <i>Flag</i> value controls the overall behavior as authentication * <p> The <i>Flag</i> value controls the overall behavior as authentication
...@@ -248,7 +248,7 @@ public abstract class Configuration { ...@@ -248,7 +248,7 @@ public abstract class Configuration {
} }
}); });
if (config_class == null) { if (config_class == null) {
config_class = "com.sun.security.auth.login.ConfigFile"; config_class = "sun.security.provider.ConfigFile";
} }
try { try {
......
此差异已折叠。
...@@ -242,7 +242,7 @@ final class SunEntries { ...@@ -242,7 +242,7 @@ final class SunEntries {
* Configuration * Configuration
*/ */
map.put("Configuration.JavaLoginConfig", map.put("Configuration.JavaLoginConfig",
"sun.security.provider.ConfigSpiFile"); "sun.security.provider.ConfigFile$Spi");
/* /*
* CertPathBuilder * CertPathBuilder
......
...@@ -132,7 +132,7 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN ...@@ -132,7 +132,7 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN
# Class to instantiate as the javax.security.auth.login.Configuration # Class to instantiate as the javax.security.auth.login.Configuration
# provider. # provider.
# #
login.configuration.provider=com.sun.security.auth.login.ConfigFile login.configuration.provider=sun.security.provider.ConfigFile
# #
# Default login configuration file # Default login configuration file
......
...@@ -133,7 +133,7 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN ...@@ -133,7 +133,7 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN
# Class to instantiate as the javax.security.auth.login.Configuration # Class to instantiate as the javax.security.auth.login.Configuration
# provider. # provider.
# #
login.configuration.provider=com.sun.security.auth.login.ConfigFile login.configuration.provider=sun.security.provider.ConfigFile
# #
# Default login configuration file # Default login configuration file
......
...@@ -134,7 +134,7 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN ...@@ -134,7 +134,7 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN
# Class to instantiate as the javax.security.auth.login.Configuration # Class to instantiate as the javax.security.auth.login.Configuration
# provider. # provider.
# #
login.configuration.provider=com.sun.security.auth.login.ConfigFile login.configuration.provider=sun.security.provider.ConfigFile
# #
# Default login configuration file # Default login configuration file
......
...@@ -133,7 +133,7 @@ securerandom.strongAlgorithms=Windows-PRNG:SunMSCAPI ...@@ -133,7 +133,7 @@ securerandom.strongAlgorithms=Windows-PRNG:SunMSCAPI
# Class to instantiate as the javax.security.auth.login.Configuration # Class to instantiate as the javax.security.auth.login.Configuration
# provider. # provider.
# #
login.configuration.provider=com.sun.security.auth.login.ConfigFile login.configuration.provider=sun.security.provider.ConfigFile
# #
# Default login configuration file # Default login configuration file
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册