46 // The provider implementation (delegate)
47 private TrustManagerFactorySpi factorySpi;
48
49 // The name of the trust management algorithm.
50 private String algorithm;
51
52 /**
53 * Obtains the default TrustManagerFactory algorithm name.
54 *
55 * <p>The default TrustManager can be changed at runtime by setting
56 * the value of the {@code ssl.TrustManagerFactory.algorithm}
57 * security property to the desired algorithm name.
58 *
59 * @see java.security.Security security properties
60 * @return the default algorithm name as specified by the
61 * {@code ssl.TrustManagerFactory.algorithm} security property, or an
62 * implementation-specific default if no such property exists.
63 */
64 public final static String getDefaultAlgorithm() {
65 String type;
66 type = AccessController.doPrivileged(new PrivilegedAction<String>() {
67 @Override
68 public String run() {
69 return Security.getProperty(
70 "ssl.TrustManagerFactory.algorithm");
71 }
72 });
73 if (type == null) {
74 type = "SunX509";
75 }
76 return type;
77 }
78
79 /**
80 * Creates a TrustManagerFactory object.
81 *
82 * @param factorySpi the delegate
83 * @param provider the provider
84 * @param algorithm the algorithm
85 */
86 protected TrustManagerFactory(TrustManagerFactorySpi factorySpi,
|
46 // The provider implementation (delegate)
47 private TrustManagerFactorySpi factorySpi;
48
49 // The name of the trust management algorithm.
50 private String algorithm;
51
52 /**
53 * Obtains the default TrustManagerFactory algorithm name.
54 *
55 * <p>The default TrustManager can be changed at runtime by setting
56 * the value of the {@code ssl.TrustManagerFactory.algorithm}
57 * security property to the desired algorithm name.
58 *
59 * @see java.security.Security security properties
60 * @return the default algorithm name as specified by the
61 * {@code ssl.TrustManagerFactory.algorithm} security property, or an
62 * implementation-specific default if no such property exists.
63 */
64 public final static String getDefaultAlgorithm() {
65 String type;
66 type = AccessController.doPrivileged(new PrivilegedAction<>() {
67 @Override
68 public String run() {
69 return Security.getProperty(
70 "ssl.TrustManagerFactory.algorithm");
71 }
72 });
73 if (type == null) {
74 type = "SunX509";
75 }
76 return type;
77 }
78
79 /**
80 * Creates a TrustManagerFactory object.
81 *
82 * @param factorySpi the delegate
83 * @param provider the provider
84 * @param algorithm the algorithm
85 */
86 protected TrustManagerFactory(TrustManagerFactorySpi factorySpi,
|