Class WSProviderConfig


  • public final class WSProviderConfig
    extends Object
    Configure Crypto providers.
    • Method Detail

      • init

        public static void init()
      • init

        public static void init​(boolean addXMLDSigRIInternalProv,
                                boolean addBCProv,
                                boolean addTLProv)
      • cleanUp

        public static void cleanUp()
      • setAddJceProviders

        public static void setAddJceProviders​(boolean value)
        Set the value of the internal addJceProviders flag. This flag turns on (or off) automatic registration of known JCE providers that provide necessary cryptographic algorithms for use with WSS4J. By default, this flag is true. You may wish (or need) to initialize the JCE manually, e.g., in some JVMs.
      • setXmlSecIgnoreLineBreak

        public static void setXmlSecIgnoreLineBreak()
      • addJceProvider

        public static String addJceProvider​(String name,
                                            String className)
        Add a new JCE security provider to use for WSS4J, of the specified name and class. Return either the name of the previously loaded provider, the name of the new loaded provider, or null if there's an exception in loading the provider. Add the provider either after the SUN provider (see WSS-99), or the IBMJCE provider. Otherwise fall back to the old behaviour of inserting the provider in position 2.
        Parameters:
        name - The name string of the provider (this may not be the real name of the provider)
        className - Name of the class the implements the provider. This class must be a subclass of java.security.Provider
        Returns:
        Returns the actual name of the provider that was loaded
      • addJceProvider

        public static String addJceProvider​(String name,
                                            Provider provider)
        Add a new JCE security provider to use for WSS4J, of the specified name and class. Return either the name of the previously loaded provider, the name of the new loaded provider, or null if there's an exception in loading the provider. Add the provider either after the SUN provider (see WSS-99), or the IBMJCE provider. Otherwise fall back to the old behaviour of inserting the provider in position 2.
        Parameters:
        name - The name string of the provider (this may not be the real name of the provider)
        provider - A subclass of java.security.Provider
        Returns:
        Returns the actual name of the provider that was loaded
      • appendJceProvider

        public static String appendJceProvider​(String name,
                                               String className)
        Add a new JCE security provider to use for WSS4J, of the specified name and class. Return either the name of the previously loaded provider, the name of the new loaded provider, or null if there's an exception in loading the provider. Append the provider to the provider list.
        Parameters:
        name - The name string of the provider (this may not be the real name of the provider)
        className - Name of the class the implements the provider. This class must be a subclass of java.security.Provider
        Returns:
        Returns the actual name of the provider that was loaded
      • appendJceProvider

        public static String appendJceProvider​(String name,
                                               Provider provider)
        Add a new JCE security provider to use for WSS4J, of the specified name and class. Return either the name of the previously loaded provider, the name of the new loaded provider, or null if there's an exception in loading the provider. Append the provider to the provider list.
        Parameters:
        name - The name string of the provider (this may not be the real name of the provider)
        provider - A subclass of java.security.Provider
        Returns:
        Returns the actual name of the provider that was loaded