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