Java Code Examples for java.security.Provider#keys()

The following examples show how to use java.security.Provider#keys() . 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: ProviderList.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 2
Source File: ProviderList.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 3
Source File: ProviderList.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 4
Source File: ProviderList.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 5
Source File: ProviderList.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 6
Source File: ProviderList.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 7
Source File: ProviderList.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 8
Source File: ProviderList.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 9
Source File: ProviderList.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 10
Source File: ProviderList.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 11
Source File: ProviderList.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 12
Source File: ProviderList.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}
 
Example 13
Source File: ProviderList.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Helper routine to go through all properties contined in a
 * provider and add its mechanisms to the list of supported
 * mechanisms. If no default mechanism has been assinged so far,
 * it sets the default MechanismFactory and Oid as well.
 * @param p the provider to query
 * @return true if there is at least one mechanism that this
 * provider contributed, false otherwise
 */
private boolean addAllMechsFromProvider(Provider p) {

    String prop;
    boolean retVal = false;

    // Get all props for this provider
    Enumeration<Object> props = p.keys();

    // See if there are any GSS prop's
    while (props.hasMoreElements()) {
        prop = (String) props.nextElement();
        if (isMechFactoryProperty(prop)) {
            // Ok! This is a GSS provider!
            try {
                Oid mechOid = getOidFromMechFactoryProperty(prop);
                mechs.add(mechOid);
                retVal = true;
            } catch (GSSException e) {
                // Skip to next property
                GSSUtil.debug("Ignore the invalid property " +
                              prop + " from provider " + p.getName());
            }
        } // Processed GSS property
    } // while loop

    return retVal;

}