< prev index next >

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

Print this page


   1 /*
   2  * Copyright (c) 2000, 2015, 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


 186      * {@code CertStore} type and is initialized with the specified
 187      * parameters.
 188      *
 189      * <p> This method traverses the list of registered security Providers,
 190      * starting with the most preferred Provider.
 191      * A new CertStore object encapsulating the
 192      * CertStoreSpi implementation from the first
 193      * Provider that supports the specified type is returned.
 194      *
 195      * <p> Note that the list of registered providers may be retrieved via
 196      * the {@link Security#getProviders() Security.getProviders()} method.
 197      *
 198      * <p>The {@code CertStore} that is returned is initialized with the
 199      * specified {@code CertStoreParameters}. The type of parameters
 200      * needed may vary between different types of {@code CertStore}s.
 201      * Note that the specified {@code CertStoreParameters} object is
 202      * cloned.
 203      *
 204      * @implNote
 205      * The JDK Reference Implementation additionally uses the
 206      * {@code jdk.security.provider.preferred} property to determine

 207      * the preferred provider order for the specified algorithm. This
 208      * may be different than the order of providers returned by
 209      * {@link Security#getProviders() Security.getProviders()}.
 210      *
 211      * @param type the name of the requested {@code CertStore} type.
 212      * See the CertStore section in the <a href=
 213      * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertStore">
 214      * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
 215      * for information about standard types.
 216      *
 217      * @param params the initialization parameters (may be {@code null}).
 218      *
 219      * @return a {@code CertStore} object that implements the specified
 220      *          {@code CertStore} type.
 221      *
 222      * @throws NoSuchAlgorithmException if no Provider supports a
 223      *          CertStoreSpi implementation for the specified type.
 224      *
 225      * @throws InvalidAlgorithmParameterException if the specified
 226      *          initialization parameters are inappropriate for this


   1 /*
   2  * Copyright (c) 2000, 2016, 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


 186      * {@code CertStore} type and is initialized with the specified
 187      * parameters.
 188      *
 189      * <p> This method traverses the list of registered security Providers,
 190      * starting with the most preferred Provider.
 191      * A new CertStore object encapsulating the
 192      * CertStoreSpi implementation from the first
 193      * Provider that supports the specified type is returned.
 194      *
 195      * <p> Note that the list of registered providers may be retrieved via
 196      * the {@link Security#getProviders() Security.getProviders()} method.
 197      *
 198      * <p>The {@code CertStore} that is returned is initialized with the
 199      * specified {@code CertStoreParameters}. The type of parameters
 200      * needed may vary between different types of {@code CertStore}s.
 201      * Note that the specified {@code CertStoreParameters} object is
 202      * cloned.
 203      *
 204      * @implNote
 205      * The JDK Reference Implementation additionally uses the
 206      * {@code jdk.security.provider.preferred}
 207      * {@link Security#getProperty(String) Security} property to determine
 208      * the preferred provider order for the specified algorithm. This
 209      * may be different than the order of providers returned by
 210      * {@link Security#getProviders() Security.getProviders()}.
 211      *
 212      * @param type the name of the requested {@code CertStore} type.
 213      * See the CertStore section in the <a href=
 214      * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertStore">
 215      * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
 216      * for information about standard types.
 217      *
 218      * @param params the initialization parameters (may be {@code null}).
 219      *
 220      * @return a {@code CertStore} object that implements the specified
 221      *          {@code CertStore} type.
 222      *
 223      * @throws NoSuchAlgorithmException if no Provider supports a
 224      *          CertStoreSpi implementation for the specified type.
 225      *
 226      * @throws InvalidAlgorithmParameterException if the specified
 227      *          initialization parameters are inappropriate for this


< prev index next >