< prev index next >

src/java.base/share/classes/java/security/cert/CertStore.java

Print this page




 392      * Returns the default {@code CertStore} type as specified by the
 393      * {@code certstore.type} security property, or the string
 394      * {@literal "LDAP"} if no such property exists.
 395      *
 396      * <p>The default {@code CertStore} type can be used by applications
 397      * that do not want to use a hard-coded type when calling one of the
 398      * {@code getInstance} methods, and want to provide a default
 399      * {@code CertStore} type in case a user does not specify its own.
 400      *
 401      * <p>The default {@code CertStore} type can be changed by setting
 402      * the value of the {@code certstore.type} security property to the
 403      * desired type.
 404      *
 405      * @see java.security.Security security properties
 406      * @return the default {@code CertStore} type as specified by the
 407      * {@code certstore.type} security property, or the string
 408      * {@literal "LDAP"} if no such property exists.
 409      */
 410     public final static String getDefaultType() {
 411         String cstype;
 412         cstype = AccessController.doPrivileged(new PrivilegedAction<String>() {
 413             public String run() {
 414                 return Security.getProperty(CERTSTORE_TYPE);
 415             }
 416         });
 417         if (cstype == null) {
 418             cstype = "LDAP";
 419         }
 420         return cstype;
 421     }
 422 }


 392      * Returns the default {@code CertStore} type as specified by the
 393      * {@code certstore.type} security property, or the string
 394      * {@literal "LDAP"} if no such property exists.
 395      *
 396      * <p>The default {@code CertStore} type can be used by applications
 397      * that do not want to use a hard-coded type when calling one of the
 398      * {@code getInstance} methods, and want to provide a default
 399      * {@code CertStore} type in case a user does not specify its own.
 400      *
 401      * <p>The default {@code CertStore} type can be changed by setting
 402      * the value of the {@code certstore.type} security property to the
 403      * desired type.
 404      *
 405      * @see java.security.Security security properties
 406      * @return the default {@code CertStore} type as specified by the
 407      * {@code certstore.type} security property, or the string
 408      * {@literal "LDAP"} if no such property exists.
 409      */
 410     public final static String getDefaultType() {
 411         String cstype;
 412         cstype = AccessController.doPrivileged(new PrivilegedAction<>() {
 413             public String run() {
 414                 return Security.getProperty(CERTSTORE_TYPE);
 415             }
 416         });
 417         if (cstype == null) {
 418             cstype = "LDAP";
 419         }
 420         return cstype;
 421     }
 422 }
< prev index next >