Blame SOURCES/rh2052070-enable_algorithmparameters_in_fips_mode.patch

840a84
commit 6e74f283739af0d867df01d20f82865f559a45ea
840a84
Author: Martin Balao <mbalao@redhat.com>
840a84
Date:   Mon Feb 28 04:58:05 2022 +0000
840a84
840a84
    RH2052070: Enable AlgorithmParameters and AlgorithmParameterGenerator services in FIPS mode
840a84
840a84
diff --git openjdk.orig/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java openjdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java
840a84
index a020e1c15d8..6d459fdec01 100644
840a84
--- openjdk.orig/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java
840a84
+++ openjdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java
840a84
@@ -31,6 +31,7 @@ import java.security.SecureRandom;
840a84
 import java.security.PrivilegedAction;
840a84
 import java.util.HashMap;
840a84
 import java.util.List;
840a84
+import jdk.internal.access.SharedSecrets;
840a84
 import static sun.security.util.SecurityConstants.PROVIDER_VER;
840a84
 import static sun.security.util.SecurityProviderConstants.*;
840a84
 
840a84
@@ -78,6 +79,10 @@ import static sun.security.util.SecurityProviderConstants.*;
840a84
 
840a84
 public final class SunJCE extends Provider {
840a84
 
840a84
+    private static final boolean systemFipsEnabled =
840a84
+            SharedSecrets.getJavaSecuritySystemConfiguratorAccess()
840a84
+            .isSystemFipsEnabled();
840a84
+
840a84
     @java.io.Serial
840a84
     private static final long serialVersionUID = 6812507587804302833L;
840a84
 
840a84
@@ -143,285 +148,287 @@ public final class SunJCE extends Provider {
840a84
     void putEntries() {
840a84
         // reuse attribute map and reset before each reuse
840a84
         HashMap<String, String> attrs = new HashMap<>(3);
840a84
-        attrs.put("SupportedModes", "ECB");
840a84
-        attrs.put("SupportedPaddings", "NOPADDING|PKCS1PADDING|OAEPPADDING"
840a84
-                + "|OAEPWITHMD5ANDMGF1PADDING"
840a84
-                + "|OAEPWITHSHA1ANDMGF1PADDING"
840a84
-                + "|OAEPWITHSHA-1ANDMGF1PADDING"
840a84
-                + "|OAEPWITHSHA-224ANDMGF1PADDING"
840a84
-                + "|OAEPWITHSHA-256ANDMGF1PADDING"
840a84
-                + "|OAEPWITHSHA-384ANDMGF1PADDING"
840a84
-                + "|OAEPWITHSHA-512ANDMGF1PADDING"
840a84
-                + "|OAEPWITHSHA-512/224ANDMGF1PADDING"
840a84
-                + "|OAEPWITHSHA-512/256ANDMGF1PADDING");
840a84
-        attrs.put("SupportedKeyClasses",
840a84
-                "java.security.interfaces.RSAPublicKey" +
840a84
-                "|java.security.interfaces.RSAPrivateKey");
840a84
-        ps("Cipher", "RSA",
840a84
-                "com.sun.crypto.provider.RSACipher", null, attrs);
840a84
-
840a84
-        // common block cipher modes, pads
840a84
-        final String BLOCK_MODES = "ECB|CBC|PCBC|CTR|CTS|CFB|OFB" +
840a84
-            "|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64" +
840a84
-            "|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64";
840a84
-        final String BLOCK_MODES128 = BLOCK_MODES +
840a84
-            "|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128" +
840a84
-            "|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128";
840a84
-        final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING";
840a84
-
840a84
-        attrs.clear();
840a84
-        attrs.put("SupportedModes", BLOCK_MODES);
840a84
-        attrs.put("SupportedPaddings", BLOCK_PADS);
840a84
-        attrs.put("SupportedKeyFormats", "RAW");
840a84
-        ps("Cipher", "DES",
840a84
-                "com.sun.crypto.provider.DESCipher", null, attrs);
840a84
-        psA("Cipher", "DESede", "com.sun.crypto.provider.DESedeCipher",
840a84
-                attrs);
840a84
-        ps("Cipher", "Blowfish",
840a84
-                "com.sun.crypto.provider.BlowfishCipher", null, attrs);
840a84
-
840a84
-        ps("Cipher", "RC2",
840a84
-                "com.sun.crypto.provider.RC2Cipher", null, attrs);
840a84
-
840a84
-        attrs.clear();
840a84
-        attrs.put("SupportedModes", BLOCK_MODES128);
840a84
-        attrs.put("SupportedPaddings", BLOCK_PADS);
840a84
-        attrs.put("SupportedKeyFormats", "RAW");
840a84
-        psA("Cipher", "AES",
840a84
-                "com.sun.crypto.provider.AESCipher$General", attrs);
840a84
-
840a84
-        attrs.clear();
840a84
-        attrs.put("SupportedKeyFormats", "RAW");
840a84
-        psA("Cipher", "AES/KW/NoPadding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES_KW_NoPadding",
840a84
-                attrs);
840a84
-        ps("Cipher", "AES/KW/PKCS5Padding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES_KW_PKCS5Padding",
840a84
-                null, attrs);
840a84
-        psA("Cipher", "AES/KWP/NoPadding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES_KWP_NoPadding",
840a84
-                attrs);
840a84
-
840a84
-        psA("Cipher", "AES_128/ECB/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES128_ECB_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_128/CBC/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES128_CBC_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_128/OFB/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES128_OFB_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_128/CFB/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES128_CFB_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_128/KW/NoPadding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES128_KW_NoPadding",
840a84
-                attrs);
840a84
-        ps("Cipher", "AES_128/KW/PKCS5Padding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES128_KW_PKCS5Padding",
840a84
-                null, attrs);
840a84
-        psA("Cipher", "AES_128/KWP/NoPadding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES128_KWP_NoPadding",
840a84
-                attrs);
840a84
-
840a84
-        psA("Cipher", "AES_192/ECB/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES192_ECB_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_192/CBC/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES192_CBC_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_192/OFB/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES192_OFB_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_192/CFB/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES192_CFB_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_192/KW/NoPadding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES192_KW_NoPadding",
840a84
-                attrs);
840a84
-        ps("Cipher", "AES_192/KW/PKCS5Padding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES192_KW_PKCS5Padding",
840a84
-                null, attrs);
840a84
-        psA("Cipher", "AES_192/KWP/NoPadding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES192_KWP_NoPadding",
840a84
-                attrs);
840a84
-
840a84
-        psA("Cipher", "AES_256/ECB/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES256_ECB_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_256/CBC/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES256_CBC_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_256/OFB/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES256_OFB_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_256/CFB/NoPadding",
840a84
-                "com.sun.crypto.provider.AESCipher$AES256_CFB_NoPadding",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_256/KW/NoPadding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES256_KW_NoPadding",
840a84
-                attrs);
840a84
-        ps("Cipher", "AES_256/KW/PKCS5Padding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES256_KW_PKCS5Padding",
840a84
-                null, attrs);
840a84
-        psA("Cipher", "AES_256/KWP/NoPadding",
840a84
-                "com.sun.crypto.provider.KeyWrapCipher$AES256_KWP_NoPadding",
840a84
-                attrs);
840a84
-
840a84
-        attrs.clear();
840a84
-        attrs.put("SupportedModes", "GCM");
840a84
-        attrs.put("SupportedKeyFormats", "RAW");
840a84
-
840a84
-        ps("Cipher", "AES/GCM/NoPadding",
840a84
-                "com.sun.crypto.provider.GaloisCounterMode$AESGCM", null,
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_128/GCM/NoPadding",
840a84
-                "com.sun.crypto.provider.GaloisCounterMode$AES128",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_192/GCM/NoPadding",
840a84
-                "com.sun.crypto.provider.GaloisCounterMode$AES192",
840a84
-                attrs);
840a84
-        psA("Cipher", "AES_256/GCM/NoPadding",
840a84
-                "com.sun.crypto.provider.GaloisCounterMode$AES256",
840a84
-                attrs);
840a84
-
840a84
-        attrs.clear();
840a84
-        attrs.put("SupportedModes", "CBC");
840a84
-        attrs.put("SupportedPaddings", "NOPADDING");
840a84
-        attrs.put("SupportedKeyFormats", "RAW");
840a84
-        ps("Cipher", "DESedeWrap",
840a84
-                "com.sun.crypto.provider.DESedeWrapCipher", null, attrs);
840a84
-
840a84
-        attrs.clear();
840a84
-        attrs.put("SupportedModes", "ECB");
840a84
-        attrs.put("SupportedPaddings", "NOPADDING");
840a84
-        attrs.put("SupportedKeyFormats", "RAW");
840a84
-        psA("Cipher", "ARCFOUR",
840a84
-                "com.sun.crypto.provider.ARCFOURCipher", attrs);
840a84
-
840a84
-        attrs.clear();
840a84
-        attrs.put("SupportedKeyFormats", "RAW");
840a84
-        ps("Cipher",  "ChaCha20",
840a84
-                "com.sun.crypto.provider.ChaCha20Cipher$ChaCha20Only",
840a84
-                null, attrs);
840a84
-        psA("Cipher",  "ChaCha20-Poly1305",
840a84
-                "com.sun.crypto.provider.ChaCha20Cipher$ChaCha20Poly1305",
840a84
-                attrs);
840a84
-
840a84
-        // PBES1
840a84
-        psA("Cipher", "PBEWithMD5AndDES",
840a84
-                "com.sun.crypto.provider.PBEWithMD5AndDESCipher",
840a84
-                null);
840a84
-        ps("Cipher", "PBEWithMD5AndTripleDES",
840a84
-                "com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher");
840a84
-        psA("Cipher", "PBEWithSHA1AndDESede",
840a84
-                "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede",
840a84
-                null);
840a84
-        psA("Cipher", "PBEWithSHA1AndRC2_40",
840a84
-                "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndRC2_40",
840a84
-                null);
840a84
-        psA("Cipher", "PBEWithSHA1AndRC2_128",
840a84
-                "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndRC2_128",
840a84
-                null);
840a84
-        psA("Cipher", "PBEWithSHA1AndRC4_40",
840a84
-                "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndRC4_40",
840a84
-                null);
840a84
-
840a84
-        psA("Cipher", "PBEWithSHA1AndRC4_128",
840a84
-                "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndRC4_128",
840a84
-                null);
840a84
-
840a84
-        // PBES2
840a84
-        ps("Cipher", "PBEWithHmacSHA1AndAES_128",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA1AndAES_128");
840a84
-
840a84
-        ps("Cipher", "PBEWithHmacSHA224AndAES_128",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA224AndAES_128");
840a84
-
840a84
-        ps("Cipher", "PBEWithHmacSHA256AndAES_128",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA256AndAES_128");
840a84
-
840a84
-        ps("Cipher", "PBEWithHmacSHA384AndAES_128",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA384AndAES_128");
840a84
-
840a84
-        ps("Cipher", "PBEWithHmacSHA512AndAES_128",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA512AndAES_128");
840a84
-
840a84
-        ps("Cipher", "PBEWithHmacSHA1AndAES_256",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA1AndAES_256");
840a84
-
840a84
-        ps("Cipher", "PBEWithHmacSHA224AndAES_256",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA224AndAES_256");
840a84
-
840a84
-        ps("Cipher", "PBEWithHmacSHA256AndAES_256",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA256AndAES_256");
840a84
-
840a84
-        ps("Cipher", "PBEWithHmacSHA384AndAES_256",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA384AndAES_256");
840a84
-
840a84
-        ps("Cipher", "PBEWithHmacSHA512AndAES_256",
840a84
-                "com.sun.crypto.provider.PBES2Core$HmacSHA512AndAES_256");
840a84
-
840a84
-        /*
840a84
-         * Key(pair) Generator engines
840a84
-         */
840a84
-        ps("KeyGenerator", "DES",
840a84
-                "com.sun.crypto.provider.DESKeyGenerator");
840a84
-        psA("KeyGenerator", "DESede",
840a84
-                "com.sun.crypto.provider.DESedeKeyGenerator",
840a84
-                null);
840a84
-        ps("KeyGenerator", "Blowfish",
840a84
-                "com.sun.crypto.provider.BlowfishKeyGenerator");
840a84
-        psA("KeyGenerator", "AES",
840a84
-                "com.sun.crypto.provider.AESKeyGenerator",
840a84
-                null);
840a84
-        ps("KeyGenerator", "RC2",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$RC2KeyGenerator");
840a84
-        psA("KeyGenerator", "ARCFOUR",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$ARCFOURKeyGenerator",
840a84
-                null);
840a84
-        ps("KeyGenerator", "ChaCha20",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$ChaCha20KeyGenerator");
840a84
-        ps("KeyGenerator", "HmacMD5",
840a84
-                "com.sun.crypto.provider.HmacMD5KeyGenerator");
840a84
-
840a84
-        psA("KeyGenerator", "HmacSHA1",
840a84
-                "com.sun.crypto.provider.HmacSHA1KeyGenerator", null);
840a84
-        psA("KeyGenerator", "HmacSHA224",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA224",
840a84
-                null);
840a84
-        psA("KeyGenerator", "HmacSHA256",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA256",
840a84
-                null);
840a84
-        psA("KeyGenerator", "HmacSHA384",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA384",
840a84
-                null);
840a84
-        psA("KeyGenerator", "HmacSHA512",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA512",
840a84
-                null);
840a84
-        psA("KeyGenerator", "HmacSHA512/224",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA512_224",
840a84
-                null);
840a84
-        psA("KeyGenerator", "HmacSHA512/256",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA512_256",
840a84
-                null);
840a84
-
840a84
-        psA("KeyGenerator", "HmacSHA3-224",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA3_224",
840a84
-                null);
840a84
-        psA("KeyGenerator", "HmacSHA3-256",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA3_256",
840a84
-                null);
840a84
-        psA("KeyGenerator", "HmacSHA3-384",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA3_384",
840a84
-                null);
840a84
-        psA("KeyGenerator", "HmacSHA3-512",
840a84
-                "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA3_512",
840a84
-                null);
840a84
-
840a84
-        psA("KeyPairGenerator", "DiffieHellman",
840a84
-                "com.sun.crypto.provider.DHKeyPairGenerator",
840a84
-                null);
840a84
+        if (!systemFipsEnabled) {
840a84
+            attrs.put("SupportedModes", "ECB");
840a84
+            attrs.put("SupportedPaddings", "NOPADDING|PKCS1PADDING|OAEPPADDING"
840a84
+                    + "|OAEPWITHMD5ANDMGF1PADDING"
840a84
+                    + "|OAEPWITHSHA1ANDMGF1PADDING"
840a84
+                    + "|OAEPWITHSHA-1ANDMGF1PADDING"
840a84
+                    + "|OAEPWITHSHA-224ANDMGF1PADDING"
840a84
+                    + "|OAEPWITHSHA-256ANDMGF1PADDING"
840a84
+                    + "|OAEPWITHSHA-384ANDMGF1PADDING"
840a84
+                    + "|OAEPWITHSHA-512ANDMGF1PADDING"
840a84
+                    + "|OAEPWITHSHA-512/224ANDMGF1PADDING"
840a84
+                    + "|OAEPWITHSHA-512/256ANDMGF1PADDING");
840a84
+            attrs.put("SupportedKeyClasses",
840a84
+                    "java.security.interfaces.RSAPublicKey" +
840a84
+                    "|java.security.interfaces.RSAPrivateKey");
840a84
+            ps("Cipher", "RSA",
840a84
+                    "com.sun.crypto.provider.RSACipher", null, attrs);
840a84
+
840a84
+            // common block cipher modes, pads
840a84
+            final String BLOCK_MODES = "ECB|CBC|PCBC|CTR|CTS|CFB|OFB" +
840a84
+                "|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64" +
840a84
+                "|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64";
840a84
+            final String BLOCK_MODES128 = BLOCK_MODES +
840a84
+                "|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128" +
840a84
+                "|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128";
840a84
+            final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING";
840a84
+
840a84
+            attrs.clear();
840a84
+            attrs.put("SupportedModes", BLOCK_MODES);
840a84
+            attrs.put("SupportedPaddings", BLOCK_PADS);
840a84
+            attrs.put("SupportedKeyFormats", "RAW");
840a84
+            ps("Cipher", "DES",
840a84
+                    "com.sun.crypto.provider.DESCipher", null, attrs);
840a84
+            psA("Cipher", "DESede", "com.sun.crypto.provider.DESedeCipher",
840a84
+                    attrs);
840a84
+            ps("Cipher", "Blowfish",
840a84
+                    "com.sun.crypto.provider.BlowfishCipher", null, attrs);
840a84
+
840a84
+            ps("Cipher", "RC2",
840a84
+                    "com.sun.crypto.provider.RC2Cipher", null, attrs);
840a84
+
840a84
+            attrs.clear();
840a84
+            attrs.put("SupportedModes", BLOCK_MODES128);
840a84
+            attrs.put("SupportedPaddings", BLOCK_PADS);
840a84
+            attrs.put("SupportedKeyFormats", "RAW");
840a84
+            psA("Cipher", "AES",
840a84
+                    "com.sun.crypto.provider.AESCipher$General", attrs);
840a84
+
840a84
+            attrs.clear();
840a84
+            attrs.put("SupportedKeyFormats", "RAW");
840a84
+            psA("Cipher", "AES/KW/NoPadding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES_KW_NoPadding",
840a84
+                    attrs);
840a84
+            ps("Cipher", "AES/KW/PKCS5Padding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES_KW_PKCS5Padding",
840a84
+                    null, attrs);
840a84
+            psA("Cipher", "AES/KWP/NoPadding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES_KWP_NoPadding",
840a84
+                    attrs);
840a84
+
840a84
+            psA("Cipher", "AES_128/ECB/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES128_ECB_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_128/CBC/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES128_CBC_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_128/OFB/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES128_OFB_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_128/CFB/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES128_CFB_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_128/KW/NoPadding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES128_KW_NoPadding",
840a84
+                    attrs);
840a84
+            ps("Cipher", "AES_128/KW/PKCS5Padding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES128_KW_PKCS5Padding",
840a84
+                    null, attrs);
840a84
+            psA("Cipher", "AES_128/KWP/NoPadding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES128_KWP_NoPadding",
840a84
+                    attrs);
840a84
+
840a84
+            psA("Cipher", "AES_192/ECB/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES192_ECB_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_192/CBC/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES192_CBC_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_192/OFB/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES192_OFB_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_192/CFB/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES192_CFB_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_192/KW/NoPadding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES192_KW_NoPadding",
840a84
+                    attrs);
840a84
+            ps("Cipher", "AES_192/KW/PKCS5Padding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES192_KW_PKCS5Padding",
840a84
+                    null, attrs);
840a84
+            psA("Cipher", "AES_192/KWP/NoPadding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES192_KWP_NoPadding",
840a84
+                    attrs);
840a84
+
840a84
+            psA("Cipher", "AES_256/ECB/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES256_ECB_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_256/CBC/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES256_CBC_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_256/OFB/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES256_OFB_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_256/CFB/NoPadding",
840a84
+                    "com.sun.crypto.provider.AESCipher$AES256_CFB_NoPadding",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_256/KW/NoPadding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES256_KW_NoPadding",
840a84
+                    attrs);
840a84
+            ps("Cipher", "AES_256/KW/PKCS5Padding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES256_KW_PKCS5Padding",
840a84
+                    null, attrs);
840a84
+            psA("Cipher", "AES_256/KWP/NoPadding",
840a84
+                    "com.sun.crypto.provider.KeyWrapCipher$AES256_KWP_NoPadding",
840a84
+                    attrs);
840a84
+
840a84
+            attrs.clear();
840a84
+            attrs.put("SupportedModes", "GCM");
840a84
+            attrs.put("SupportedKeyFormats", "RAW");
840a84
+
840a84
+            ps("Cipher", "AES/GCM/NoPadding",
840a84
+                    "com.sun.crypto.provider.GaloisCounterMode$AESGCM", null,
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_128/GCM/NoPadding",
840a84
+                    "com.sun.crypto.provider.GaloisCounterMode$AES128",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_192/GCM/NoPadding",
840a84
+                    "com.sun.crypto.provider.GaloisCounterMode$AES192",
840a84
+                    attrs);
840a84
+            psA("Cipher", "AES_256/GCM/NoPadding",
840a84
+                    "com.sun.crypto.provider.GaloisCounterMode$AES256",
840a84
+                    attrs);
840a84
+
840a84
+            attrs.clear();
840a84
+            attrs.put("SupportedModes", "CBC");
840a84
+            attrs.put("SupportedPaddings", "NOPADDING");
840a84
+            attrs.put("SupportedKeyFormats", "RAW");
840a84
+            ps("Cipher", "DESedeWrap",
840a84
+                    "com.sun.crypto.provider.DESedeWrapCipher", null, attrs);
840a84
+
840a84
+            attrs.clear();
840a84
+            attrs.put("SupportedModes", "ECB");
840a84
+            attrs.put("SupportedPaddings", "NOPADDING");
840a84
+            attrs.put("SupportedKeyFormats", "RAW");
840a84
+            psA("Cipher", "ARCFOUR",
840a84
+                    "com.sun.crypto.provider.ARCFOURCipher", attrs);
840a84
+
840a84
+            attrs.clear();
840a84
+            attrs.put("SupportedKeyFormats", "RAW");
840a84
+            ps("Cipher",  "ChaCha20",
840a84
+                    "com.sun.crypto.provider.ChaCha20Cipher$ChaCha20Only",
840a84
+                    null, attrs);
840a84
+            psA("Cipher",  "ChaCha20-Poly1305",
840a84
+                    "com.sun.crypto.provider.ChaCha20Cipher$ChaCha20Poly1305",
840a84
+                    attrs);
840a84
+
840a84
+            // PBES1
840a84
+            psA("Cipher", "PBEWithMD5AndDES",
840a84
+                    "com.sun.crypto.provider.PBEWithMD5AndDESCipher",
840a84
+                    null);
840a84
+            ps("Cipher", "PBEWithMD5AndTripleDES",
840a84
+                    "com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher");
840a84
+            psA("Cipher", "PBEWithSHA1AndDESede",
840a84
+                    "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede",
840a84
+                    null);
840a84
+            psA("Cipher", "PBEWithSHA1AndRC2_40",
840a84
+                    "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndRC2_40",
840a84
+                    null);
840a84
+            psA("Cipher", "PBEWithSHA1AndRC2_128",
840a84
+                    "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndRC2_128",
840a84
+                    null);
840a84
+            psA("Cipher", "PBEWithSHA1AndRC4_40",
840a84
+                    "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndRC4_40",
840a84
+                    null);
840a84
+
840a84
+            psA("Cipher", "PBEWithSHA1AndRC4_128",
840a84
+                    "com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndRC4_128",
840a84
+                    null);
840a84
+
840a84
+            // PBES2
840a84
+            ps("Cipher", "PBEWithHmacSHA1AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA1AndAES_128");
840a84
+
840a84
+            ps("Cipher", "PBEWithHmacSHA224AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA224AndAES_128");
840a84
+
840a84
+            ps("Cipher", "PBEWithHmacSHA256AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA256AndAES_128");
840a84
+
840a84
+            ps("Cipher", "PBEWithHmacSHA384AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA384AndAES_128");
840a84
+
840a84
+            ps("Cipher", "PBEWithHmacSHA512AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA512AndAES_128");
840a84
+
840a84
+            ps("Cipher", "PBEWithHmacSHA1AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA1AndAES_256");
840a84
+
840a84
+            ps("Cipher", "PBEWithHmacSHA224AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA224AndAES_256");
840a84
+
840a84
+            ps("Cipher", "PBEWithHmacSHA256AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA256AndAES_256");
840a84
+
840a84
+            ps("Cipher", "PBEWithHmacSHA384AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA384AndAES_256");
840a84
+
840a84
+            ps("Cipher", "PBEWithHmacSHA512AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBES2Core$HmacSHA512AndAES_256");
840a84
+
840a84
+            /*
840a84
+             * Key(pair) Generator engines
840a84
+             */
840a84
+            ps("KeyGenerator", "DES",
840a84
+                    "com.sun.crypto.provider.DESKeyGenerator");
840a84
+            psA("KeyGenerator", "DESede",
840a84
+                    "com.sun.crypto.provider.DESedeKeyGenerator",
840a84
+                    null);
840a84
+            ps("KeyGenerator", "Blowfish",
840a84
+                    "com.sun.crypto.provider.BlowfishKeyGenerator");
840a84
+            psA("KeyGenerator", "AES",
840a84
+                    "com.sun.crypto.provider.AESKeyGenerator",
840a84
+                    null);
840a84
+            ps("KeyGenerator", "RC2",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$RC2KeyGenerator");
840a84
+            psA("KeyGenerator", "ARCFOUR",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$ARCFOURKeyGenerator",
840a84
+                    null);
840a84
+            ps("KeyGenerator", "ChaCha20",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$ChaCha20KeyGenerator");
840a84
+            ps("KeyGenerator", "HmacMD5",
840a84
+                    "com.sun.crypto.provider.HmacMD5KeyGenerator");
840a84
+
840a84
+            psA("KeyGenerator", "HmacSHA1",
840a84
+                    "com.sun.crypto.provider.HmacSHA1KeyGenerator", null);
840a84
+            psA("KeyGenerator", "HmacSHA224",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA224",
840a84
+                    null);
840a84
+            psA("KeyGenerator", "HmacSHA256",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA256",
840a84
+                    null);
840a84
+            psA("KeyGenerator", "HmacSHA384",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA384",
840a84
+                    null);
840a84
+            psA("KeyGenerator", "HmacSHA512",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA512",
840a84
+                    null);
840a84
+            psA("KeyGenerator", "HmacSHA512/224",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA512_224",
840a84
+                    null);
840a84
+            psA("KeyGenerator", "HmacSHA512/256",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA512_256",
840a84
+                    null);
840a84
+
840a84
+            psA("KeyGenerator", "HmacSHA3-224",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA3_224",
840a84
+                    null);
840a84
+            psA("KeyGenerator", "HmacSHA3-256",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA3_256",
840a84
+                    null);
840a84
+            psA("KeyGenerator", "HmacSHA3-384",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA3_384",
840a84
+                    null);
840a84
+            psA("KeyGenerator", "HmacSHA3-512",
840a84
+                    "com.sun.crypto.provider.KeyGeneratorCore$HmacKG$SHA3_512",
840a84
+                    null);
840a84
+
840a84
+            psA("KeyPairGenerator", "DiffieHellman",
840a84
+                    "com.sun.crypto.provider.DHKeyPairGenerator",
840a84
+                    null);
840a84
+        }
840a84
 
840a84
         /*
840a84
          * Algorithm parameter generation engines
840a84
@@ -430,15 +437,17 @@ public final class SunJCE extends Provider {
840a84
                 "DiffieHellman", "com.sun.crypto.provider.DHParameterGenerator",
840a84
                 null);
840a84
 
840a84
-        /*
840a84
-         * Key Agreement engines
840a84
-         */
840a84
-        attrs.clear();
840a84
-        attrs.put("SupportedKeyClasses", "javax.crypto.interfaces.DHPublicKey" +
840a84
-                        "|javax.crypto.interfaces.DHPrivateKey");
840a84
-        psA("KeyAgreement", "DiffieHellman",
840a84
-                "com.sun.crypto.provider.DHKeyAgreement",
840a84
-                attrs);
840a84
+        if (!systemFipsEnabled) {
840a84
+            /*
840a84
+             * Key Agreement engines
840a84
+             */
840a84
+            attrs.clear();
840a84
+            attrs.put("SupportedKeyClasses", "javax.crypto.interfaces.DHPublicKey" +
840a84
+                            "|javax.crypto.interfaces.DHPrivateKey");
840a84
+            psA("KeyAgreement", "DiffieHellman",
840a84
+                    "com.sun.crypto.provider.DHKeyAgreement",
840a84
+                    attrs);
840a84
+        }
840a84
 
840a84
         /*
840a84
          * Algorithm Parameter engines
840a84
@@ -531,197 +540,199 @@ public final class SunJCE extends Provider {
840a84
         psA("AlgorithmParameters", "ChaCha20-Poly1305",
840a84
                 "com.sun.crypto.provider.ChaCha20Poly1305Parameters", null);
840a84
 
840a84
-        /*
840a84
-         * Key factories
840a84
-         */
840a84
-        psA("KeyFactory", "DiffieHellman",
840a84
-                "com.sun.crypto.provider.DHKeyFactory",
840a84
-                null);
840a84
-
840a84
-        /*
840a84
-         * Secret-key factories
840a84
-         */
840a84
-        ps("SecretKeyFactory", "DES",
840a84
-                "com.sun.crypto.provider.DESKeyFactory");
840a84
-
840a84
-        psA("SecretKeyFactory", "DESede",
840a84
-                "com.sun.crypto.provider.DESedeKeyFactory", null);
840a84
-
840a84
-        psA("SecretKeyFactory", "PBEWithMD5AndDES",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithMD5AndDES",
840a84
-                null);
840a84
-
840a84
-        /*
840a84
-         * Internal in-house crypto algorithm used for
840a84
-         * the JCEKS keystore type.  Since this was developed
840a84
-         * internally, there isn't an OID corresponding to this
840a84
-         * algorithm.
840a84
-         */
840a84
-        ps("SecretKeyFactory", "PBEWithMD5AndTripleDES",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithMD5AndTripleDES");
840a84
-
840a84
-        psA("SecretKeyFactory", "PBEWithSHA1AndDESede",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndDESede",
840a84
-                null);
840a84
-
840a84
-        psA("SecretKeyFactory", "PBEWithSHA1AndRC2_40",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndRC2_40",
840a84
-                null);
840a84
-
840a84
-        psA("SecretKeyFactory", "PBEWithSHA1AndRC2_128",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndRC2_128",
840a84
-                null);
840a84
-
840a84
-        psA("SecretKeyFactory", "PBEWithSHA1AndRC4_40",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndRC4_40",
840a84
-                null);
840a84
-
840a84
-        psA("SecretKeyFactory", "PBEWithSHA1AndRC4_128",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndRC4_128",
840a84
-                null);
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA1AndAES_128",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA1AndAES_128");
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA224AndAES_128",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA224AndAES_128");
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA256AndAES_128",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA256AndAES_128");
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA384AndAES_128",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA384AndAES_128");
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA512AndAES_128",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA512AndAES_128");
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA1AndAES_256",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA1AndAES_256");
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA224AndAES_256",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA224AndAES_256");
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA256AndAES_256",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA256AndAES_256");
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA384AndAES_256",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA384AndAES_256");
840a84
-
840a84
-        ps("SecretKeyFactory", "PBEWithHmacSHA512AndAES_256",
840a84
-                "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA512AndAES_256");
840a84
-
840a84
-        // PBKDF2
840a84
-        psA("SecretKeyFactory", "PBKDF2WithHmacSHA1",
840a84
-                "com.sun.crypto.provider.PBKDF2Core$HmacSHA1",
840a84
-                null);
840a84
-        ps("SecretKeyFactory", "PBKDF2WithHmacSHA224",
840a84
-                "com.sun.crypto.provider.PBKDF2Core$HmacSHA224");
840a84
-        ps("SecretKeyFactory", "PBKDF2WithHmacSHA256",
840a84
-                "com.sun.crypto.provider.PBKDF2Core$HmacSHA256");
840a84
-        ps("SecretKeyFactory", "PBKDF2WithHmacSHA384",
840a84
-                "com.sun.crypto.provider.PBKDF2Core$HmacSHA384");
840a84
-        ps("SecretKeyFactory", "PBKDF2WithHmacSHA512",
840a84
-                "com.sun.crypto.provider.PBKDF2Core$HmacSHA512");
840a84
-
840a84
-        /*
840a84
-         * MAC
840a84
-         */
840a84
-        attrs.clear();
840a84
-        attrs.put("SupportedKeyFormats", "RAW");
840a84
-        ps("Mac", "HmacMD5", "com.sun.crypto.provider.HmacMD5", null, attrs);
840a84
-        psA("Mac", "HmacSHA1", "com.sun.crypto.provider.HmacSHA1",
840a84
-                attrs);
840a84
-        psA("Mac", "HmacSHA224",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA224", attrs);
840a84
-        psA("Mac", "HmacSHA256",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA256", attrs);
840a84
-        psA("Mac", "HmacSHA384",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA384", attrs);
840a84
-        psA("Mac", "HmacSHA512",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA512", attrs);
840a84
-        psA("Mac", "HmacSHA512/224",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA512_224", attrs);
840a84
-        psA("Mac", "HmacSHA512/256",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA512_256", attrs);
840a84
-        psA("Mac", "HmacSHA3-224",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA3_224", attrs);
840a84
-        psA("Mac", "HmacSHA3-256",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA3_256", attrs);
840a84
-        psA("Mac", "HmacSHA3-384",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA3_384", attrs);
840a84
-        psA("Mac", "HmacSHA3-512",
840a84
-                "com.sun.crypto.provider.HmacCore$HmacSHA3_512", attrs);
840a84
-
840a84
-        ps("Mac", "HmacPBESHA1",
840a84
-                "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA1",
840a84
-                null, attrs);
840a84
-        ps("Mac", "HmacPBESHA224",
840a84
-                "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA224",
840a84
-                null, attrs);
840a84
-        ps("Mac", "HmacPBESHA256",
840a84
-                "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA256",
840a84
-                null, attrs);
840a84
-        ps("Mac", "HmacPBESHA384",
840a84
-                "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA384",
840a84
-                null, attrs);
840a84
-        ps("Mac", "HmacPBESHA512",
840a84
-                "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA512",
840a84
-                null, attrs);
840a84
-        ps("Mac", "HmacPBESHA512/224",
840a84
-                "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA512_224",
840a84
-                null, attrs);
840a84
-        ps("Mac", "HmacPBESHA512/256",
840a84
-                "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA512_256",
840a84
-                null, attrs);
840a84
-
840a84
-
840a84
-        // PBMAC1
840a84
-        ps("Mac", "PBEWithHmacSHA1",
840a84
-                "com.sun.crypto.provider.PBMAC1Core$HmacSHA1", null, attrs);
840a84
-        ps("Mac", "PBEWithHmacSHA224",
840a84
-                "com.sun.crypto.provider.PBMAC1Core$HmacSHA224", null, attrs);
840a84
-        ps("Mac", "PBEWithHmacSHA256",
840a84
-                "com.sun.crypto.provider.PBMAC1Core$HmacSHA256", null, attrs);
840a84
-        ps("Mac", "PBEWithHmacSHA384",
840a84
-                "com.sun.crypto.provider.PBMAC1Core$HmacSHA384", null, attrs);
840a84
-        ps("Mac", "PBEWithHmacSHA512",
840a84
-                "com.sun.crypto.provider.PBMAC1Core$HmacSHA512", null, attrs);
840a84
-        ps("Mac", "SslMacMD5",
840a84
-                "com.sun.crypto.provider.SslMacCore$SslMacMD5", null, attrs);
840a84
-        ps("Mac", "SslMacSHA1",
840a84
-                "com.sun.crypto.provider.SslMacCore$SslMacSHA1", null, attrs);
840a84
-
840a84
-        /*
840a84
-         * KeyStore
840a84
-         */
840a84
-        ps("KeyStore", "JCEKS",
840a84
-                "com.sun.crypto.provider.JceKeyStore");
840a84
-
840a84
-        /*
840a84
-         * SSL/TLS mechanisms
840a84
-         *
840a84
-         * These are strictly internal implementations and may
840a84
-         * be changed at any time.  These names were chosen
840a84
-         * because PKCS11/SunPKCS11 does not yet have TLS1.2
840a84
-         * mechanisms, and it will cause calls to come here.
840a84
-         */
840a84
-        ps("KeyGenerator", "SunTlsPrf",
840a84
-                "com.sun.crypto.provider.TlsPrfGenerator$V10");
840a84
-        ps("KeyGenerator", "SunTls12Prf",
840a84
-                "com.sun.crypto.provider.TlsPrfGenerator$V12");
840a84
-
840a84
-        ps("KeyGenerator", "SunTlsMasterSecret",
840a84
-                "com.sun.crypto.provider.TlsMasterSecretGenerator",
840a84
-                List.of("SunTls12MasterSecret", "SunTlsExtendedMasterSecret"),
840a84
-                null);
840a84
-
840a84
-        ps("KeyGenerator", "SunTlsKeyMaterial",
840a84
-                "com.sun.crypto.provider.TlsKeyMaterialGenerator",
840a84
-                List.of("SunTls12KeyMaterial"), null);
840a84
-
840a84
-        ps("KeyGenerator", "SunTlsRsaPremasterSecret",
840a84
-                "com.sun.crypto.provider.TlsRsaPremasterSecretGenerator",
840a84
-                List.of("SunTls12RsaPremasterSecret"), null);
840a84
+        if (!systemFipsEnabled) {
840a84
+            /*
840a84
+             * Key factories
840a84
+             */
840a84
+            psA("KeyFactory", "DiffieHellman",
840a84
+                    "com.sun.crypto.provider.DHKeyFactory",
840a84
+                    null);
840a84
+
840a84
+            /*
840a84
+             * Secret-key factories
840a84
+             */
840a84
+            ps("SecretKeyFactory", "DES",
840a84
+                    "com.sun.crypto.provider.DESKeyFactory");
840a84
+
840a84
+            psA("SecretKeyFactory", "DESede",
840a84
+                    "com.sun.crypto.provider.DESedeKeyFactory", null);
840a84
+
840a84
+            psA("SecretKeyFactory", "PBEWithMD5AndDES",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithMD5AndDES",
840a84
+                    null);
840a84
+
840a84
+            /*
840a84
+             * Internal in-house crypto algorithm used for
840a84
+             * the JCEKS keystore type.  Since this was developed
840a84
+             * internally, there isn't an OID corresponding to this
840a84
+             * algorithm.
840a84
+             */
840a84
+            ps("SecretKeyFactory", "PBEWithMD5AndTripleDES",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithMD5AndTripleDES");
840a84
+
840a84
+            psA("SecretKeyFactory", "PBEWithSHA1AndDESede",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndDESede",
840a84
+                    null);
840a84
+
840a84
+            psA("SecretKeyFactory", "PBEWithSHA1AndRC2_40",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndRC2_40",
840a84
+                    null);
840a84
+
840a84
+            psA("SecretKeyFactory", "PBEWithSHA1AndRC2_128",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndRC2_128",
840a84
+                    null);
840a84
+
840a84
+            psA("SecretKeyFactory", "PBEWithSHA1AndRC4_40",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndRC4_40",
840a84
+                    null);
840a84
+
840a84
+            psA("SecretKeyFactory", "PBEWithSHA1AndRC4_128",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndRC4_128",
840a84
+                    null);
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA1AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA1AndAES_128");
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA224AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA224AndAES_128");
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA256AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA256AndAES_128");
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA384AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA384AndAES_128");
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA512AndAES_128",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA512AndAES_128");
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA1AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA1AndAES_256");
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA224AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA224AndAES_256");
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA256AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA256AndAES_256");
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA384AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA384AndAES_256");
840a84
+
840a84
+            ps("SecretKeyFactory", "PBEWithHmacSHA512AndAES_256",
840a84
+                    "com.sun.crypto.provider.PBEKeyFactory$PBEWithHmacSHA512AndAES_256");
840a84
+
840a84
+            // PBKDF2
840a84
+            psA("SecretKeyFactory", "PBKDF2WithHmacSHA1",
840a84
+                    "com.sun.crypto.provider.PBKDF2Core$HmacSHA1",
840a84
+                    null);
840a84
+            ps("SecretKeyFactory", "PBKDF2WithHmacSHA224",
840a84
+                    "com.sun.crypto.provider.PBKDF2Core$HmacSHA224");
840a84
+            ps("SecretKeyFactory", "PBKDF2WithHmacSHA256",
840a84
+                    "com.sun.crypto.provider.PBKDF2Core$HmacSHA256");
840a84
+            ps("SecretKeyFactory", "PBKDF2WithHmacSHA384",
840a84
+                    "com.sun.crypto.provider.PBKDF2Core$HmacSHA384");
840a84
+            ps("SecretKeyFactory", "PBKDF2WithHmacSHA512",
840a84
+                    "com.sun.crypto.provider.PBKDF2Core$HmacSHA512");
840a84
+
840a84
+            /*
840a84
+             * MAC
840a84
+             */
840a84
+            attrs.clear();
840a84
+            attrs.put("SupportedKeyFormats", "RAW");
840a84
+            ps("Mac", "HmacMD5", "com.sun.crypto.provider.HmacMD5", null, attrs);
840a84
+            psA("Mac", "HmacSHA1", "com.sun.crypto.provider.HmacSHA1",
840a84
+                    attrs);
840a84
+            psA("Mac", "HmacSHA224",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA224", attrs);
840a84
+            psA("Mac", "HmacSHA256",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA256", attrs);
840a84
+            psA("Mac", "HmacSHA384",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA384", attrs);
840a84
+            psA("Mac", "HmacSHA512",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA512", attrs);
840a84
+            psA("Mac", "HmacSHA512/224",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA512_224", attrs);
840a84
+            psA("Mac", "HmacSHA512/256",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA512_256", attrs);
840a84
+            psA("Mac", "HmacSHA3-224",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA3_224", attrs);
840a84
+            psA("Mac", "HmacSHA3-256",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA3_256", attrs);
840a84
+            psA("Mac", "HmacSHA3-384",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA3_384", attrs);
840a84
+            psA("Mac", "HmacSHA3-512",
840a84
+                    "com.sun.crypto.provider.HmacCore$HmacSHA3_512", attrs);
840a84
+
840a84
+            ps("Mac", "HmacPBESHA1",
840a84
+                    "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA1",
840a84
+                    null, attrs);
840a84
+            ps("Mac", "HmacPBESHA224",
840a84
+                    "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA224",
840a84
+                    null, attrs);
840a84
+            ps("Mac", "HmacPBESHA256",
840a84
+                    "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA256",
840a84
+                    null, attrs);
840a84
+            ps("Mac", "HmacPBESHA384",
840a84
+                    "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA384",
840a84
+                    null, attrs);
840a84
+            ps("Mac", "HmacPBESHA512",
840a84
+                    "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA512",
840a84
+                    null, attrs);
840a84
+            ps("Mac", "HmacPBESHA512/224",
840a84
+                    "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA512_224",
840a84
+                    null, attrs);
840a84
+            ps("Mac", "HmacPBESHA512/256",
840a84
+                    "com.sun.crypto.provider.HmacPKCS12PBECore$HmacPKCS12PBE_SHA512_256",
840a84
+                    null, attrs);
840a84
+
840a84
+
840a84
+            // PBMAC1
840a84
+            ps("Mac", "PBEWithHmacSHA1",
840a84
+                    "com.sun.crypto.provider.PBMAC1Core$HmacSHA1", null, attrs);
840a84
+            ps("Mac", "PBEWithHmacSHA224",
840a84
+                    "com.sun.crypto.provider.PBMAC1Core$HmacSHA224", null, attrs);
840a84
+            ps("Mac", "PBEWithHmacSHA256",
840a84
+                    "com.sun.crypto.provider.PBMAC1Core$HmacSHA256", null, attrs);
840a84
+            ps("Mac", "PBEWithHmacSHA384",
840a84
+                    "com.sun.crypto.provider.PBMAC1Core$HmacSHA384", null, attrs);
840a84
+            ps("Mac", "PBEWithHmacSHA512",
840a84
+                    "com.sun.crypto.provider.PBMAC1Core$HmacSHA512", null, attrs);
840a84
+            ps("Mac", "SslMacMD5",
840a84
+                    "com.sun.crypto.provider.SslMacCore$SslMacMD5", null, attrs);
840a84
+            ps("Mac", "SslMacSHA1",
840a84
+                    "com.sun.crypto.provider.SslMacCore$SslMacSHA1", null, attrs);
840a84
+
840a84
+            /*
840a84
+             * KeyStore
840a84
+             */
840a84
+            ps("KeyStore", "JCEKS",
840a84
+                    "com.sun.crypto.provider.JceKeyStore");
840a84
+
840a84
+            /*
840a84
+             * SSL/TLS mechanisms
840a84
+             *
840a84
+             * These are strictly internal implementations and may
840a84
+             * be changed at any time.  These names were chosen
840a84
+             * because PKCS11/SunPKCS11 does not yet have TLS1.2
840a84
+             * mechanisms, and it will cause calls to come here.
840a84
+             */
840a84
+            ps("KeyGenerator", "SunTlsPrf",
840a84
+                    "com.sun.crypto.provider.TlsPrfGenerator$V10");
840a84
+            ps("KeyGenerator", "SunTls12Prf",
840a84
+                    "com.sun.crypto.provider.TlsPrfGenerator$V12");
840a84
+
840a84
+            ps("KeyGenerator", "SunTlsMasterSecret",
840a84
+                    "com.sun.crypto.provider.TlsMasterSecretGenerator",
840a84
+                    List.of("SunTls12MasterSecret", "SunTlsExtendedMasterSecret"),
840a84
+                    null);
840a84
+
840a84
+            ps("KeyGenerator", "SunTlsKeyMaterial",
840a84
+                    "com.sun.crypto.provider.TlsKeyMaterialGenerator",
840a84
+                    List.of("SunTls12KeyMaterial"), null);
840a84
+
840a84
+            ps("KeyGenerator", "SunTlsRsaPremasterSecret",
840a84
+                    "com.sun.crypto.provider.TlsRsaPremasterSecretGenerator",
840a84
+                    List.of("SunTls12RsaPremasterSecret"), null);
840a84
+        }
840a84
     }
840a84
 
840a84
     // Return the instance of this class or create one if needed.
840a84
diff --git openjdk.orig/src/java.base/share/classes/sun/security/provider/SunEntries.java openjdk/src/java.base/share/classes/sun/security/provider/SunEntries.java
840a84
index 7cb5ebcde51..709d32912ca 100644
840a84
--- openjdk.orig/src/java.base/share/classes/sun/security/provider/SunEntries.java
840a84
+++ openjdk/src/java.base/share/classes/sun/security/provider/SunEntries.java
840a84
@@ -193,20 +193,22 @@ public final class SunEntries {
840a84
             String dsaKPGImplClass = "sun.security.provider.DSAKeyPairGenerator$";
840a84
             dsaKPGImplClass += (useLegacyDSA? "Legacy" : "Current");
840a84
             addWithAlias(p, "KeyPairGenerator", "DSA", dsaKPGImplClass, attrs);
840a84
+        }
840a84
 
840a84
-            /*
840a84
-             * Algorithm Parameter Generator engines
840a84
-             */
840a84
-            addWithAlias(p, "AlgorithmParameterGenerator", "DSA",
840a84
-                    "sun.security.provider.DSAParameterGenerator", attrs);
840a84
-            attrs.remove("KeySize");
840a84
+        /*
840a84
+         * Algorithm Parameter Generator engines
840a84
+         */
840a84
+        addWithAlias(p, "AlgorithmParameterGenerator", "DSA",
840a84
+                "sun.security.provider.DSAParameterGenerator", attrs);
840a84
+        attrs.remove("KeySize");
840a84
 
840a84
-            /*
840a84
-             * Algorithm Parameter engines
840a84
-             */
840a84
-            addWithAlias(p, "AlgorithmParameters", "DSA",
840a84
-                    "sun.security.provider.DSAParameters", attrs);
840a84
+        /*
840a84
+         * Algorithm Parameter engines
840a84
+         */
840a84
+        addWithAlias(p, "AlgorithmParameters", "DSA",
840a84
+                "sun.security.provider.DSAParameters", attrs);
840a84
 
840a84
+        if (!systemFipsEnabled) {
840a84
             /*
840a84
              * Key factories
840a84
              */
840a84
diff --git openjdk.orig/src/java.base/share/classes/sun/security/rsa/SunRsaSignEntries.java openjdk/src/java.base/share/classes/sun/security/rsa/SunRsaSignEntries.java
840a84
index ca79f25cc44..16c5ad2e227 100644
840a84
--- openjdk.orig/src/java.base/share/classes/sun/security/rsa/SunRsaSignEntries.java
840a84
+++ openjdk/src/java.base/share/classes/sun/security/rsa/SunRsaSignEntries.java
840a84
@@ -27,6 +27,7 @@ package sun.security.rsa;
840a84
 
840a84
 import java.util.*;
840a84
 import java.security.Provider;
840a84
+import jdk.internal.access.SharedSecrets;
840a84
 import static sun.security.util.SecurityProviderConstants.getAliases;
840a84
 
840a84
 /**
840a84
@@ -36,6 +37,10 @@ import static sun.security.util.SecurityProviderConstants.getAliases;
840a84
  */
840a84
 public final class SunRsaSignEntries {
840a84
 
840a84
+    private static final boolean systemFipsEnabled =
840a84
+            SharedSecrets.getJavaSecuritySystemConfiguratorAccess()
840a84
+            .isSystemFipsEnabled();
840a84
+
840a84
     private void add(Provider p, String type, String algo, String cn,
840a84
              List<String> aliases, HashMap<String, String> attrs) {
840a84
          services.add(new Provider.Service(p, type, algo, cn,
840a84
@@ -56,49 +61,52 @@ public final class SunRsaSignEntries {
840a84
         // start populating content using the specified provider
840a84
         // common attribute map
840a84
         HashMap<String, String> attrs = new HashMap<>(3);
840a84
-        attrs.put("SupportedKeyClasses",
840a84
-                "java.security.interfaces.RSAPublicKey" +
840a84
-                "|java.security.interfaces.RSAPrivateKey");
840a84
+        if (!systemFipsEnabled) {
840a84
+            attrs.put("SupportedKeyClasses",
840a84
+                    "java.security.interfaces.RSAPublicKey" +
840a84
+                    "|java.security.interfaces.RSAPrivateKey");
840a84
+
840a84
+            add(p, "KeyFactory", "RSA",
840a84
+                    "sun.security.rsa.RSAKeyFactory$Legacy",
840a84
+                    getAliases("PKCS1"), null);
840a84
+            add(p, "KeyPairGenerator", "RSA",
840a84
+                    "sun.security.rsa.RSAKeyPairGenerator$Legacy",
840a84
+                    getAliases("PKCS1"), null);
840a84
+            addA(p, "Signature", "MD2withRSA",
840a84
+                    "sun.security.rsa.RSASignature$MD2withRSA", attrs);
840a84
+            addA(p, "Signature", "MD5withRSA",
840a84
+                    "sun.security.rsa.RSASignature$MD5withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA1withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA1withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA224withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA224withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA256withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA256withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA384withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA384withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA512withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA512withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA512/224withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA512_224withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA512/256withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA512_256withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA3-224withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA3_224withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA3-256withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA3_256withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA3-384withRSA",
840a84
+                   "sun.security.rsa.RSASignature$SHA3_384withRSA", attrs);
840a84
+            addA(p, "Signature", "SHA3-512withRSA",
840a84
+                    "sun.security.rsa.RSASignature$SHA3_512withRSA", attrs);
840a84
 
840a84
-        add(p, "KeyFactory", "RSA",
840a84
-                "sun.security.rsa.RSAKeyFactory$Legacy",
840a84
-                getAliases("PKCS1"), null);
840a84
-        add(p, "KeyPairGenerator", "RSA",
840a84
-                "sun.security.rsa.RSAKeyPairGenerator$Legacy",
840a84
-                getAliases("PKCS1"), null);
840a84
-        addA(p, "Signature", "MD2withRSA",
840a84
-                "sun.security.rsa.RSASignature$MD2withRSA", attrs);
840a84
-        addA(p, "Signature", "MD5withRSA",
840a84
-                "sun.security.rsa.RSASignature$MD5withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA1withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA1withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA224withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA224withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA256withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA256withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA384withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA384withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA512withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA512withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA512/224withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA512_224withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA512/256withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA512_256withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA3-224withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA3_224withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA3-256withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA3_256withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA3-384withRSA",
840a84
-               "sun.security.rsa.RSASignature$SHA3_384withRSA", attrs);
840a84
-        addA(p, "Signature", "SHA3-512withRSA",
840a84
-                "sun.security.rsa.RSASignature$SHA3_512withRSA", attrs);
840a84
+            addA(p, "KeyFactory", "RSASSA-PSS",
840a84
+                    "sun.security.rsa.RSAKeyFactory$PSS", attrs);
840a84
+            addA(p, "KeyPairGenerator", "RSASSA-PSS",
840a84
+                    "sun.security.rsa.RSAKeyPairGenerator$PSS", attrs);
840a84
+            addA(p, "Signature", "RSASSA-PSS",
840a84
+                    "sun.security.rsa.RSAPSSSignature", attrs);
840a84
+        }
840a84
 
840a84
-        addA(p, "KeyFactory", "RSASSA-PSS",
840a84
-                "sun.security.rsa.RSAKeyFactory$PSS", attrs);
840a84
-        addA(p, "KeyPairGenerator", "RSASSA-PSS",
840a84
-                "sun.security.rsa.RSAKeyPairGenerator$PSS", attrs);
840a84
-        addA(p, "Signature", "RSASSA-PSS",
840a84
-                "sun.security.rsa.RSAPSSSignature", attrs);
840a84
         addA(p, "AlgorithmParameters", "RSASSA-PSS",
840a84
                 "sun.security.rsa.PSSParameters", null);
840a84
     }
840a84
diff --git openjdk.orig/src/java.base/share/conf/security/java.security openjdk/src/java.base/share/conf/security/java.security
840a84
index 3a322854204..5a355e70cae 100644
840a84
--- openjdk.orig/src/java.base/share/conf/security/java.security
840a84
+++ openjdk/src/java.base/share/conf/security/java.security
840a84
@@ -86,6 +86,8 @@ fips.provider.1=SunPKCS11 ${java.home}/conf/security/nss.fips.cfg
840a84
 fips.provider.2=SUN
840a84
 fips.provider.3=SunEC
840a84
 fips.provider.4=SunJSSE
840a84
+fips.provider.5=SunJCE
840a84
+fips.provider.6=SunRsaSign
840a84
 
840a84
 #
840a84
 # A list of preferred providers for specific algorithms. These providers will