1. /*
  2. * @(#)CertPathValidatorSpi.java 1.5 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.security.cert;
  8. import java.security.InvalidAlgorithmParameterException;
  9. /**
  10. *
  11. * The <i>Service Provider Interface</i> (<b>SPI</b>)
  12. * for the {@link CertPathValidator CertPathValidator} class. All
  13. * <code>CertPathValidator</code> implementations must include a class (the
  14. * SPI class) that extends this class (<code>CertPathValidatorSpi</code>)
  15. * and implements all of its methods. In general, instances of this class
  16. * should only be accessed through the <code>CertPathValidator</code> class.
  17. * For details, see the Java Cryptography Architecture.
  18. * <p>
  19. * <b>Concurrent Access</b>
  20. * <p>
  21. * Instances of this class need not be protected against concurrent
  22. * access from multiple threads. Threads that need to access a single
  23. * <code>CertPathValidatorSpi</code> instance concurrently should synchronize
  24. * amongst themselves and provide the necessary locking before calling the
  25. * wrapping <code>CertPathValidator</code> object.
  26. * <p>
  27. * However, implementations of <code>CertPathValidatorSpi</code> may still
  28. * encounter concurrency issues, since multiple threads each
  29. * manipulating a different <code>CertPathValidatorSpi</code> instance need not
  30. * synchronize.
  31. *
  32. * @version 1.5 12/19/03
  33. * @since 1.4
  34. * @author Yassir Elley
  35. */
  36. public abstract class CertPathValidatorSpi {
  37. /**
  38. * The default constructor.
  39. */
  40. public CertPathValidatorSpi() {}
  41. /**
  42. * Validates the specified certification path using the specified
  43. * algorithm parameter set.
  44. * <p>
  45. * The <code>CertPath</code> specified must be of a type that is
  46. * supported by the validation algorithm, otherwise an
  47. * <code>InvalidAlgorithmParameterException</code> will be thrown. For
  48. * example, a <code>CertPathValidator</code> that implements the PKIX
  49. * algorithm validates <code>CertPath</code> objects of type X.509.
  50. *
  51. * @param certPath the <code>CertPath</code> to be validated
  52. * @param params the algorithm parameters
  53. * @return the result of the validation algorithm
  54. * @exception CertPathValidatorException if the <code>CertPath</code>
  55. * does not validate
  56. * @exception InvalidAlgorithmParameterException if the specified
  57. * parameters or the type of the specified <code>CertPath</code> are
  58. * inappropriate for this <code>CertPathValidator</code>
  59. */
  60. public abstract CertPathValidatorResult
  61. engineValidate(CertPath certPath, CertPathParameters params)
  62. throws CertPathValidatorException, InvalidAlgorithmParameterException;
  63. }