CertPathValidatorSpi.java revision cec4dd4b1d33f78997603d0f89c0d0e56e64dbcd
1/* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18package java.security.cert; 19 20import java.security.InvalidAlgorithmParameterException; 21 22/** 23 * The <i>Service Provider Interface</i> (<b>SPI</b>) for the {@code 24 * CertPathValidator} class to be implemented by security providers. 25 */ 26public abstract class CertPathValidatorSpi { 27 28 /** 29 * Creates a new {@code CertPathValidatorSpi} instance. 30 */ 31 public CertPathValidatorSpi() { 32 } 33 34 /** 35 * Validates the {@code CertPath} with the algorithm of this {@code 36 * CertPathValidator} using the specified algorithm parameters. 37 * 38 * @param certPath 39 * the certification path to be validated. 40 * @param params 41 * the certification path validator algorithm parameters. 42 * @return the validation result. 43 * @throws CertPathValidatorException 44 * if the validation fails, or the algorithm of the specified 45 * certification path cannot be validated using the algorithm of 46 * this instance. 47 * @throws InvalidAlgorithmParameterException 48 * if the specified algorithm parameters cannot be used with 49 * this algorithm. 50 */ 51 public abstract CertPathValidatorResult engineValidate(CertPath certPath, 52 CertPathParameters params) throws CertPathValidatorException, 53 InvalidAlgorithmParameterException; 54 55} 56