sun.security.jca.ProviderList Java Examples

The following examples show how to use sun.security.jca.ProviderList. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JsseJce.java    From openjsse with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #2
Source File: JsseJce.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #3
Source File: JsseJce.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #4
Source File: JsseJce.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #5
Source File: JsseJce.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #6
Source File: JsseJce.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #7
Source File: JsseJce.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #8
Source File: JsseJce.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #9
Source File: JsseJce.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #10
Source File: JsseJce.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #11
Source File: JsseJce.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #12
Source File: JsseJce.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #13
Source File: JsseJce.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #14
Source File: JsseJce.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
static void endFipsProvider(Object o) {
    if (fipsProviderList != null) {
        Providers.endThreadProviderList((ProviderList)o);
    }
}
 
Example #15
Source File: Security.java    From j2objc with Apache License 2.0 4 votes vote down vote up
/**
 * Adds a new provider, at a specified position. The position is
 * the preference order in which providers are searched for
 * requested algorithms.  The position is 1-based, that is,
 * 1 is most preferred, followed by 2, and so on.
 *
 * <p>If the given provider is installed at the requested position,
 * the provider that used to be at that position, and all providers
 * with a position greater than {@code position}, are shifted up
 * one position (towards the end of the list of installed providers).
 *
 * <p>A provider cannot be added if it is already installed.
 *
 * <p>If there is a security manager, the
 * {@link java.lang.SecurityManager#checkSecurityAccess} method is called
 * with the {@code "insertProvider"} permission target name to see if
 * it's ok to add a new provider. If this permission check is denied,
 * {@code checkSecurityAccess} is called again with the
 * {@code "insertProvider."+provider.getName()} permission target name. If
 * both checks are denied, a {@code SecurityException} is thrown.
 *
 * @param provider the provider to be added.
 *
 * @param position the preference position that the caller would
 * like for this provider.
 *
 * @return the actual preference position in which the provider was
 * added, or -1 if the provider was not added because it is
 * already installed.
 *
 * @throws  NullPointerException if provider is null
 * @throws  SecurityException
 *          if a security manager exists and its {@link
 *          java.lang.SecurityManager#checkSecurityAccess} method
 *          denies access to add a new provider
 *
 * @see #getProvider
 * @see #removeProvider
 * @see java.security.SecurityPermission
 */
public static synchronized int insertProviderAt(Provider provider,
        int position) {
    String providerName = provider.getName();
    // Android-removed: Checks using SecurityManager, which is not functional in Android.
    // checkInsertProvider(providerName);
    ProviderList list = Providers.getFullProviderList();
    ProviderList newList = ProviderList.insertAt(list, provider, position - 1);
    if (list == newList) {
        return -1;
    }
    // Android-added: Version tracking call.
    increaseVersion();
    Providers.setProviderList(newList);
    return newList.getIndex(providerName) + 1;
}
 
Example #16
Source File: Security.java    From j2objc with Apache License 2.0 3 votes vote down vote up
/**
 * Removes the provider with the specified name.
 *
 * <p>When the specified provider is removed, all providers located
 * at a position greater than where the specified provider was are shifted
 * down one position (towards the head of the list of installed
 * providers).
 *
 * <p>This method returns silently if the provider is not installed or
 * if name is null.
 *
 * <p>First, if there is a security manager, its
 * {@code checkSecurityAccess}
 * method is called with the string {@code "removeProvider."+name}
 * to see if it's ok to remove the provider.
 * If the default implementation of {@code checkSecurityAccess}
 * is used (i.e., that method is not overriden), then this will result in
 * a call to the security manager's {@code checkPermission} method
 * with a {@code SecurityPermission("removeProvider."+name)}
 * permission.
 *
 * @param name the name of the provider to remove.
 *
 * @throws  SecurityException
 *          if a security manager exists and its {@link
 *          java.lang.SecurityManager#checkSecurityAccess} method
 *          denies
 *          access to remove the provider
 *
 * @see #getProvider
 * @see #addProvider
 */
public static synchronized void removeProvider(String name) {
    // Android-removed: Checks using SecurityManager, which is not functional in Android.
    // check("removeProvider." + name);
    ProviderList list = Providers.getFullProviderList();
    ProviderList newList = ProviderList.remove(list, name);
    Providers.setProviderList(newList);
    // Android-added: Version tracking call.
    increaseVersion();
}