1 /*
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
141 * All X.509 certificate extensions that a {@code PKIXCertPathChecker}
142 * might possibly be able to process should be included in the set.
143 *
144 * @return an immutable {@code Set} of X.509 extension OIDs (in
145 * {@code String} format) supported by this
146 * {@code PKIXCertPathChecker}, or {@code null} if no
147 * extensions are supported
148 */
149 public abstract Set<String> getSupportedExtensions();
150
151 /**
152 * Performs the check(s) on the specified certificate using its internal
153 * state and removes any critical extensions that it processes from the
154 * specified collection of OID strings that represent the unresolved
155 * critical extensions. The certificates are presented in the order
156 * specified by the {@code init} method.
157 *
158 * @param cert the {@code Certificate} to be checked
159 * @param unresolvedCritExts a {@code Collection} of OID strings
160 * representing the current set of unresolved critical extensions
161 * @exception CertPathValidatorException if the specified certificate does
162 * not pass the check
163 */
164 public abstract void check(Certificate cert,
165 Collection<String> unresolvedCritExts)
166 throws CertPathValidatorException;
167
168 /**
169 * {@inheritDoc}
170 *
171 * <p>This implementation calls
172 * {@code check(cert, java.util.Collections.<String>emptySet())}.
173 */
174 @Override
175 public void check(Certificate cert) throws CertPathValidatorException {
176 check(cert, java.util.Collections.<String>emptySet());
177 }
178
179 /**
180 * Returns a clone of this object. Calls the {@code Object.clone()}
181 * method.
|
1 /*
2 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
141 * All X.509 certificate extensions that a {@code PKIXCertPathChecker}
142 * might possibly be able to process should be included in the set.
143 *
144 * @return an immutable {@code Set} of X.509 extension OIDs (in
145 * {@code String} format) supported by this
146 * {@code PKIXCertPathChecker}, or {@code null} if no
147 * extensions are supported
148 */
149 public abstract Set<String> getSupportedExtensions();
150
151 /**
152 * Performs the check(s) on the specified certificate using its internal
153 * state and removes any critical extensions that it processes from the
154 * specified collection of OID strings that represent the unresolved
155 * critical extensions. The certificates are presented in the order
156 * specified by the {@code init} method.
157 *
158 * @param cert the {@code Certificate} to be checked
159 * @param unresolvedCritExts a {@code Collection} of OID strings
160 * representing the current set of unresolved critical extensions
161 * @throws CertPathValidatorException if the specified certificate does
162 * not pass the check
163 */
164 public abstract void check(Certificate cert,
165 Collection<String> unresolvedCritExts)
166 throws CertPathValidatorException;
167
168 /**
169 * {@inheritDoc}
170 *
171 * <p>This implementation calls
172 * {@code check(cert, java.util.Collections.<String>emptySet())}.
173 */
174 @Override
175 public void check(Certificate cert) throws CertPathValidatorException {
176 check(cert, java.util.Collections.<String>emptySet());
177 }
178
179 /**
180 * Returns a clone of this object. Calls the {@code Object.clone()}
181 * method.
|