284 * Returns the default {@code CertPathBuilder} type as specified by
285 * the {@code certpathbuilder.type} security property, or the string
286 * {@literal "PKIX"} if no such property exists.
287 *
288 * <p>The default {@code CertPathBuilder} type can be used by
289 * applications that do not want to use a hard-coded type when calling one
290 * of the {@code getInstance} methods, and want to provide a default
291 * type in case a user does not specify its own.
292 *
293 * <p>The default {@code CertPathBuilder} type can be changed by
294 * setting the value of the {@code certpathbuilder.type} security property
295 * to the desired type.
296 *
297 * @see java.security.Security security properties
298 * @return the default {@code CertPathBuilder} type as specified
299 * by the {@code certpathbuilder.type} security property, or the string
300 * {@literal "PKIX"} if no such property exists.
301 */
302 public final static String getDefaultType() {
303 String cpbtype =
304 AccessController.doPrivileged(new PrivilegedAction<String>() {
305 public String run() {
306 return Security.getProperty(CPB_TYPE);
307 }
308 });
309 return (cpbtype == null) ? "PKIX" : cpbtype;
310 }
311
312 /**
313 * Returns a {@code CertPathChecker} that the encapsulated
314 * {@code CertPathBuilderSpi} implementation uses to check the revocation
315 * status of certificates. A PKIX implementation returns objects of
316 * type {@code PKIXRevocationChecker}. Each invocation of this method
317 * returns a new instance of {@code CertPathChecker}.
318 *
319 * <p>The primary purpose of this method is to allow callers to specify
320 * additional input parameters and options specific to revocation checking.
321 * See the class description for an example.
322 *
323 * @return a {@code CertPathChecker}
324 * @throws UnsupportedOperationException if the service provider does not
|
284 * Returns the default {@code CertPathBuilder} type as specified by
285 * the {@code certpathbuilder.type} security property, or the string
286 * {@literal "PKIX"} if no such property exists.
287 *
288 * <p>The default {@code CertPathBuilder} type can be used by
289 * applications that do not want to use a hard-coded type when calling one
290 * of the {@code getInstance} methods, and want to provide a default
291 * type in case a user does not specify its own.
292 *
293 * <p>The default {@code CertPathBuilder} type can be changed by
294 * setting the value of the {@code certpathbuilder.type} security property
295 * to the desired type.
296 *
297 * @see java.security.Security security properties
298 * @return the default {@code CertPathBuilder} type as specified
299 * by the {@code certpathbuilder.type} security property, or the string
300 * {@literal "PKIX"} if no such property exists.
301 */
302 public final static String getDefaultType() {
303 String cpbtype =
304 AccessController.doPrivileged(new PrivilegedAction<>() {
305 public String run() {
306 return Security.getProperty(CPB_TYPE);
307 }
308 });
309 return (cpbtype == null) ? "PKIX" : cpbtype;
310 }
311
312 /**
313 * Returns a {@code CertPathChecker} that the encapsulated
314 * {@code CertPathBuilderSpi} implementation uses to check the revocation
315 * status of certificates. A PKIX implementation returns objects of
316 * type {@code PKIXRevocationChecker}. Each invocation of this method
317 * returns a new instance of {@code CertPathChecker}.
318 *
319 * <p>The primary purpose of this method is to allow callers to specify
320 * additional input parameters and options specific to revocation checking.
321 * See the class description for an example.
322 *
323 * @return a {@code CertPathChecker}
324 * @throws UnsupportedOperationException if the service provider does not
|