package com.l7tech.security.cert;

import com.l7tech.util.ConfigFactory;
import com.l7tech.util.ExceptionUtils;
import java.io.FileInputStream;
import java.security.Key;
import java.security.cert.CertificateException;
import java.security.cert.CertificateParsingException;
import java.security.cert.X509Certificate;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.xml.sax.SAXException;

public class KeyUsageChecker {
   private static final Logger a;
   public static final String ENFORCEMENT_MODE_IGNORE;
   public static final String ENFORCEMENT_MODE_ALWAYS;
   static final String b;
   protected static final String PROPERTY_ENFORCEMENT_MODE;
   protected static final String PROPERTY_POLICY_FILE;
   protected static final String PROPERTY_POLICY_XML;
   private static final String c;
   private static final String d;
   private static AtomicReference<KeyUsageChecker> e;
   private final KeyUsagePolicy f;
   private final boolean g;
   static final int[] h;
   private static final String[] i;

   // $VF: Handled exception range with multiple entry points by splitting it
   // $VF: Duplicated exception handlers to handle obfuscated exceptions
   public KeyUsageChecker(KeyUsagePolicy var1, String var2) {
      boolean var10001;
      label20: {
         label19: {
            this.f = var1;
            if (var2 != null) {
               try {
                  if (i[13].equalsIgnoreCase(var2.trim())) {
                     break label19;
                  }
               } catch (NullPointerException var4) {
                  throw a(var4);
               }
            }

            try {
               var10001 = true;
               break label20;
            } catch (NullPointerException var3) {
               throw a(var3);
            }
         }

         var10001 = false;
      }

      this.g = var10001;
   }

   public static KeyUsageChecker getDefault() {
      return e.get();
   }

   public static void setDefault(KeyUsageChecker var0) {
      try {
         if (var0 == null) {
            throw new NullPointerException();
         }
      } catch (NullPointerException var1) {
         throw a(var1);
      }

      e.set(var0);
   }

   public static void requireActivityForKey(KeyUsageActivity param0, X509Certificate param1, Key param2) throws CertificateException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 000: aload 2
      // 001: invokeinterface java/security/Key.getAlgorithm ()Ljava/lang/String; 1
      // 006: astore 3
      // 007: aload 2
      // 008: instanceof java/security/interfaces/RSAKey
      // 00b: ifne 022
      // 00e: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 011: bipush 19
      // 013: aaload
      // 014: aload 3
      // 015: invokevirtual java/lang/String.equalsIgnoreCase (Ljava/lang/String;)Z
      // 018: ifeq 04c
      // 01b: goto 022
      // 01e: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 021: athrow
      // 022: aload 1
      // 023: ifnull 039
      // 026: goto 02d
      // 029: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 02c: athrow
      // 02d: aload 1
      // 02e: aload 2
      // 02f: invokestatic com/l7tech/common/io/CertUtils.checkForMismatchingKey (Ljava/security/cert/X509Certificate;Ljava/security/Key;)V
      // 032: goto 039
      // 035: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 038: athrow
      // 039: aload 2
      // 03a: instanceof java/security/PublicKey
      // 03d: ifeq 100
      // 040: aload 0
      // 041: aload 1
      // 042: invokestatic com/l7tech/security/cert/KeyUsageChecker.requireActivity (Lcom/l7tech/security/cert/KeyUsageActivity;Ljava/security/cert/X509Certificate;)V
      // 045: goto 100
      // 048: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 04b: athrow
      // 04c: aload 2
      // 04d: instanceof java/security/interfaces/ECKey
      // 050: ifne 07a
      // 053: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 056: bipush 20
      // 058: aaload
      // 059: aload 3
      // 05a: invokevirtual java/lang/String.equalsIgnoreCase (Ljava/lang/String;)Z
      // 05d: ifne 07a
      // 060: goto 067
      // 063: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 066: athrow
      // 067: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 06a: bipush 2
      // 06b: aaload
      // 06c: aload 3
      // 06d: invokevirtual java/lang/String.equalsIgnoreCase (Ljava/lang/String;)Z
      // 070: ifeq 0a4
      // 073: goto 07a
      // 076: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 079: athrow
      // 07a: aload 1
      // 07b: ifnull 091
      // 07e: goto 085
      // 081: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 084: athrow
      // 085: aload 1
      // 086: aload 2
      // 087: invokestatic com/l7tech/common/io/CertUtils.checkForMismatchingKey (Ljava/security/cert/X509Certificate;Ljava/security/Key;)V
      // 08a: goto 091
      // 08d: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 090: athrow
      // 091: aload 2
      // 092: instanceof java/security/PublicKey
      // 095: ifeq 100
      // 098: aload 0
      // 099: aload 1
      // 09a: invokestatic com/l7tech/security/cert/KeyUsageChecker.requireActivity (Lcom/l7tech/security/cert/KeyUsageActivity;Ljava/security/cert/X509Certificate;)V
      // 09d: goto 100
      // 0a0: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0a3: athrow
      // 0a4: aload 2
      // 0a5: instanceof java/security/interfaces/DSAKey
      // 0a8: ifeq 0d5
      // 0ab: aload 1
      // 0ac: ifnull 0c2
      // 0af: goto 0b6
      // 0b2: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0b5: athrow
      // 0b6: aload 1
      // 0b7: aload 2
      // 0b8: invokestatic com/l7tech/common/io/CertUtils.checkForMismatchingKey (Ljava/security/cert/X509Certificate;Ljava/security/Key;)V
      // 0bb: goto 0c2
      // 0be: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0c1: athrow
      // 0c2: aload 2
      // 0c3: instanceof java/security/PublicKey
      // 0c6: ifeq 100
      // 0c9: aload 0
      // 0ca: aload 1
      // 0cb: invokestatic com/l7tech/security/cert/KeyUsageChecker.requireActivity (Lcom/l7tech/security/cert/KeyUsageActivity;Ljava/security/cert/X509Certificate;)V
      // 0ce: goto 100
      // 0d1: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0d4: athrow
      // 0d5: aload 2
      // 0d6: instanceof javax/crypto/SecretKey
      // 0d9: ifeq 0e3
      // 0dc: goto 100
      // 0df: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0e2: athrow
      // 0e3: new java/security/cert/CertificateException
      // 0e6: dup
      // 0e7: aload 2
      // 0e8: invokeinterface java/security/Key.getClass ()Ljava/lang/Class; 1
      // 0ed: invokevirtual java/lang/Class.getName ()Ljava/lang/String;
      // 0f0: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 0f3: bipush 9
      // 0f5: aaload
      // 0f6: swap
      // 0f7: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001" ]
      // 0fc: invokespecial java/security/cert/CertificateException.<init> (Ljava/lang/String;)V
      // 0ff: athrow
      // 100: return
      // try (3 -> 12): 13 java/security/cert/CertificateException
      // try (6 -> 17): 18 java/security/cert/CertificateException
      // try (15 -> 23): 24 java/security/cert/CertificateException
      // try (26 -> 33): 33 java/security/cert/CertificateException
      // try (35 -> 44): 45 java/security/cert/CertificateException
      // try (38 -> 53): 54 java/security/cert/CertificateException
      // try (47 -> 58): 59 java/security/cert/CertificateException
      // try (56 -> 64): 65 java/security/cert/CertificateException
      // try (67 -> 74): 74 java/security/cert/CertificateException
      // try (76 -> 81): 82 java/security/cert/CertificateException
      // try (79 -> 87): 88 java/security/cert/CertificateException
      // try (90 -> 97): 97 java/security/cert/CertificateException
      // try (99 -> 103): 103 java/security/cert/CertificateException
   }

   public static void requireActivity(KeyUsageActivity var0, X509Certificate var1) throws KeyUsageException, CertificateParsingException {
      try {
         if (!getDefault().permitsActivity(var0, var1)) {
            throw new KeyUsageException(var0, var1);
         }
      } catch (KeyUsageException var2) {
         throw a(var2);
      }
   }

   public boolean permitsActivity(KeyUsageActivity param1, X509Certificate param2) throws CertificateParsingException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: getfield com/l7tech/security/cert/KeyUsageChecker.g Z
      // 04: ifne 0d
      // 07: bipush 1
      // 08: ireturn
      // 09: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0c: athrow
      // 0d: aload 2
      // 0e: ifnonnull 17
      // 11: bipush 0
      // 12: ireturn
      // 13: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 16: athrow
      // 17: aload 2
      // 18: invokevirtual java/security/cert/X509Certificate.getCriticalExtensionOIDs ()Ljava/util/Set;
      // 1b: astore 3
      // 1c: aload 3
      // 1d: ifnull 30
      // 20: aload 3
      // 21: invokeinterface java/util/Set.isEmpty ()Z 1
      // 26: ifeq 36
      // 29: goto 30
      // 2c: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 2f: athrow
      // 30: bipush 1
      // 31: ireturn
      // 32: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 35: athrow
      // 36: aload 3
      // 37: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 3a: astore 5
      // 3c: aload 5
      // 3e: bipush 12
      // 40: aaload
      // 41: invokeinterface java/util/Set.contains (Ljava/lang/Object;)Z 2
      // 46: ifeq 6b
      // 49: aload 2
      // 4a: invokevirtual java/security/cert/X509Certificate.getKeyUsage ()[Z
      // 4d: astore 4
      // 4f: aload 4
      // 51: ifnull 6b
      // 54: aload 0
      // 55: aload 1
      // 56: aload 4
      // 58: invokevirtual com/l7tech/security/cert/KeyUsageChecker.a (Lcom/l7tech/security/cert/KeyUsageActivity;[Z)Z
      // 5b: ifne 6b
      // 5e: goto 65
      // 61: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 64: athrow
      // 65: bipush 0
      // 66: ireturn
      // 67: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 6a: athrow
      // 6b: aload 3
      // 6c: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 6f: bipush 21
      // 71: aaload
      // 72: invokeinterface java/util/Set.contains (Ljava/lang/Object;)Z 2
      // 77: ifeq 9c
      // 7a: aload 2
      // 7b: invokevirtual java/security/cert/X509Certificate.getExtendedKeyUsage ()Ljava/util/List;
      // 7e: astore 4
      // 80: aload 4
      // 82: ifnull 9c
      // 85: aload 0
      // 86: aload 1
      // 87: aload 4
      // 89: invokevirtual com/l7tech/security/cert/KeyUsageChecker.a (Lcom/l7tech/security/cert/KeyUsageActivity;Ljava/util/List;)Z
      // 8c: ifne 9c
      // 8f: goto 96
      // 92: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 95: athrow
      // 96: bipush 0
      // 97: ireturn
      // 98: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 9b: athrow
      // 9c: bipush 1
      // 9d: ireturn
      // try (0 -> 5): 5 java/security/cert/CertificateParsingException
      // try (7 -> 11): 11 java/security/cert/CertificateParsingException
      // try (16 -> 21): 22 java/security/cert/CertificateParsingException
      // try (18 -> 26): 26 java/security/cert/CertificateParsingException
      // try (39 -> 46): 47 java/security/cert/CertificateParsingException
      // try (41 -> 51): 51 java/security/cert/CertificateParsingException
      // try (62 -> 69): 70 java/security/cert/CertificateParsingException
      // try (64 -> 74): 74 java/security/cert/CertificateParsingException
   }

   private boolean a(KeyUsageActivity param1, boolean[] param2) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: getfield com/l7tech/security/cert/KeyUsageChecker.g Z
      // 04: ifeq 2c
      // 07: aload 0
      // 08: invokevirtual com/l7tech/security/cert/KeyUsageChecker.a ()Z
      // 0b: ifeq 34
      // 0e: goto 15
      // 11: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 14: athrow
      // 15: aload 0
      // 16: getfield com/l7tech/security/cert/KeyUsageChecker.f Lcom/l7tech/security/cert/KeyUsagePolicy;
      // 19: aload 1
      // 1a: aload 0
      // 1b: aload 2
      // 1c: invokevirtual com/l7tech/security/cert/KeyUsageChecker.a ([Z)I
      // 1f: invokevirtual com/l7tech/security/cert/KeyUsagePolicy.isKeyUsagePermittedForActivity (Lcom/l7tech/security/cert/KeyUsageActivity;I)Z
      // 22: ifeq 34
      // 25: goto 2c
      // 28: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 2b: athrow
      // 2c: bipush 1
      // 2d: goto 35
      // 30: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 33: athrow
      // 34: bipush 0
      // 35: ireturn
      // try (0 -> 6): 7 java/lang/NullPointerException
      // try (3 -> 17): 18 java/lang/NullPointerException
      // try (9 -> 22): 22 java/lang/NullPointerException
   }

   private boolean a(KeyUsageActivity param1, List<String> param2) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: getfield com/l7tech/security/cert/KeyUsageChecker.g Z
      // 04: ifeq 28
      // 07: aload 0
      // 08: invokevirtual com/l7tech/security/cert/KeyUsageChecker.a ()Z
      // 0b: ifeq 30
      // 0e: goto 15
      // 11: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 14: athrow
      // 15: aload 0
      // 16: getfield com/l7tech/security/cert/KeyUsageChecker.f Lcom/l7tech/security/cert/KeyUsagePolicy;
      // 19: aload 1
      // 1a: aload 2
      // 1b: invokevirtual com/l7tech/security/cert/KeyUsagePolicy.isExtendedKeyUsagePermittedForActivity (Lcom/l7tech/security/cert/KeyUsageActivity;Ljava/util/List;)Z
      // 1e: ifeq 30
      // 21: goto 28
      // 24: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 27: athrow
      // 28: bipush 1
      // 29: goto 31
      // 2c: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 2f: athrow
      // 30: bipush 0
      // 31: ireturn
      // try (0 -> 6): 7 java/lang/NullPointerException
      // try (3 -> 15): 16 java/lang/NullPointerException
      // try (9 -> 20): 20 java/lang/NullPointerException
   }

   private boolean a() {
      try {
         if (this.f == null) {
            a.log(Level.WARNING, i[24]);
            return false;
         } else {
            return true;
         }
      } catch (NullPointerException var1) {
         throw a(var1);
      }
   }

   private int a(boolean[] var1) {
      int var2 = 0;
      int var3 = 0;

      while (true) {
         label19: {
            try {
               if (var3 >= var1.length) {
                  return var2;
               }

               if (!var1[var3]) {
                  break label19;
               }
            } catch (NullPointerException var4) {
               throw a(var4);
            }

            var2 |= h[var3];
         }

         var3++;
      }
   }

   static FileInputStream a(String param0) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: ifnull 13
      // 04: aload 0
      // 05: invokevirtual java/lang/String.length ()I
      // 08: bipush 1
      // 09: if_icmpge 19
      // 0c: goto 13
      // 0f: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 12: athrow
      // 13: aconst_null
      // 14: areturn
      // 15: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 18: athrow
      // 19: new java/io/FileInputStream
      // 1c: dup
      // 1d: aload 0
      // 1e: invokespecial java/io/FileInputStream.<init> (Ljava/lang/String;)V
      // 21: areturn
      // 22: astore 1
      // 23: getstatic com/l7tech/security/cert/KeyUsageChecker.a Ljava/util/logging/Logger;
      // 26: getstatic java/util/logging/Level.WARNING Ljava/util/logging/Level;
      // 29: aload 0
      // 2a: aload 1
      // 2b: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 2e: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 31: astore 2
      // 32: aload 2
      // 33: bipush 16
      // 35: aaload
      // 36: dup_x2
      // 37: pop
      // 38: aload 2
      // 39: bipush 11
      // 3b: aaload
      // 3c: swap
      // 3d: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001\u0001\u0001" ]
      // 42: aload 1
      // 43: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
      // 46: aconst_null
      // 47: areturn
      // try (2 -> 11): 11 java/io/FileNotFoundException
      // try (0 -> 6): 7 java/io/FileNotFoundException
      // try (13 -> 17): 18 java/io/FileNotFoundException
   }

   protected static KeyUsagePolicy makeDefaultPolicy() {
      try {
         return KeyUsagePolicy.fromXml(b());
      } catch (SAXException var1) {
         throw new RuntimeException(i[8] + ExceptionUtils.getMessage(var1), var1);
      }
   }

   static String b() {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 03: astore 4
      // 05: aload 4
      // 07: bipush 22
      // 09: aaload
      // 0a: aconst_null
      // 0b: invokestatic com/l7tech/util/ConfigFactory.getProperty (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
      // 0e: astore 0
      // 0f: aload 0
      // 10: ifnull 2a
      // 13: aload 0
      // 14: invokevirtual java/lang/String.trim ()Ljava/lang/String;
      // 17: invokevirtual java/lang/String.length ()I
      // 1a: ifle 2a
      // 1d: goto 24
      // 20: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 23: athrow
      // 24: aload 0
      // 25: areturn
      // 26: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 29: athrow
      // 2a: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 2d: astore 4
      // 2f: aload 4
      // 31: bipush 10
      // 33: aaload
      // 34: aconst_null
      // 35: invokestatic com/l7tech/util/ConfigFactory.getProperty (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
      // 38: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/String;)Ljava/io/FileInputStream;
      // 3b: astore 1
      // 3c: aload 1
      // 3d: ifnonnull 4e
      // 40: ldc com/l7tech/security/cert/KeyUsageChecker
      // 42: invokevirtual java/lang/Class.getClassLoader ()Ljava/lang/ClassLoader;
      // 45: aload 4
      // 47: bipush 23
      // 49: aaload
      // 4a: invokevirtual java/lang/ClassLoader.getResourceAsStream (Ljava/lang/String;)Ljava/io/InputStream;
      // 4d: astore 1
      // 4e: aload 1
      // 4f: ifnonnull 63
      // 52: new java/lang/RuntimeException
      // 55: dup
      // 56: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 59: bipush 1
      // 5a: aaload
      // 5b: invokespecial java/lang/RuntimeException.<init> (Ljava/lang/String;)V
      // 5e: athrow
      // 5f: invokestatic com/l7tech/security/cert/KeyUsageChecker.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 62: athrow
      // 63: new java/lang/String
      // 66: dup
      // 67: aload 1
      // 68: invokestatic com/l7tech/util/IOUtils.slurpStream (Ljava/io/InputStream;)[B
      // 6b: invokespecial java/lang/String.<init> ([B)V
      // 6e: astore 2
      // 6f: aload 1
      // 70: invokestatic com/l7tech/util/ResourceUtils.closeQuietly (Ljava/io/Closeable;)V
      // 73: aload 2
      // 74: areturn
      // 75: astore 2
      // 76: new java/lang/RuntimeException
      // 79: dup
      // 7a: aload 2
      // 7b: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 7e: getstatic com/l7tech/security/cert/KeyUsageChecker.i [Ljava/lang/String;
      // 81: bipush 3
      // 82: aaload
      // 83: swap
      // 84: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001" ]
      // 89: aload 2
      // 8a: invokespecial java/lang/RuntimeException.<init> (Ljava/lang/String;Ljava/lang/Throwable;)V
      // 8d: athrow
      // 8e: astore 3
      // 8f: aload 1
      // 90: invokestatic com/l7tech/util/ResourceUtils.closeQuietly (Ljava/io/Closeable;)V
      // 93: aload 3
      // 94: athrow
      // try (39 -> 48): 48 java/io/IOException
      // try (10 -> 19): 19 java/io/IOException
      // try (8 -> 14): 15 java/io/IOException
      // try (50 -> 56): 60 java/io/IOException
      // try (50 -> 56): 73 null
      // try (60 -> 74): 73 null
   }

   static KeyUsageChecker c() {
      return new KeyUsageChecker(makeDefaultPolicy(), ConfigFactory.getProperty(i[0], null));
   }

   static {
      String[] var5 = new String[25];
      int var3 = 0;
      String var2 = "\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{[I[\u007f2\u00033phZ>6\u000684<Q{6\u000e#<h\u0015u5\u0016v%oTy5O&?p\\})Uv3sX1<X\"5\u007f]1#\n5%n\\j)@55nA1\u0014\n01iYj\u001b\n/\u0005oTy5?9<uVg~\u0017;<\u0005YvZ\u0003..I[\u007f2\u00033phZ>\"\n74<Q{6\u000e#<h\u0015u5\u0016v%oTy5O&?p\\})O09pP$p\u001e\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0000\u0000:9\u007fL\t.\u001b+~]o~/\u0002\u0006UrP\u001f=\u00132\u007fZs\u007f\u0003a$yVv\u007f\u001c33iGw$\u0016y3yGj\u007f+36}@r$$3)IF\u007f7\n\u0006?p\\})A.=p'U[h1\u0003?4<Q{6\u000e#<h\u0015u5\u0016v%oTy5O&?p\\})O09pP$p/WPgp\u001b/ y\u0015p?\u001bv#iEn?\u001d\"5x\u0015x?\u001dv;yL>%\u001c77y\u0015}8\n5;u[yjO\"\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0000\u0000:9\u007fLX9\u00033\u0002&\u0015\t.\u001b+~]o~-\u0000\u0006UrP\u001f=\u0013\"\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0000\u0000:9\u007fLX9\u00033\t.\u001b+~]o~-\u0000\u0015I[\u007f2\u00033phZ>?\u001f3><Sw<\nlp\u0018\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0006]yI\u00116\u0005\u0003Nf_\u0002Yv\t.\u001b+~]o~/\u0002\u001e\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0000\u0000:9\u007fL";
      int var4 = "\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{[I[\u007f2\u00033phZ>6\u000684<Q{6\u000e#<h\u0015u5\u0016v%oTy5O&?p\\})Uv3sX1<X\"5\u007f]1#\n5%n\\j)@55nA1\u0014\n01iYj\u001b\n/\u0005oTy5?9<uVg~\u0017;<\u0005YvZ\u0003..I[\u007f2\u00033phZ>\"\n74<Q{6\u000e#<h\u0015u5\u0016v%oTy5O&?p\\})O09pP$p\u001e\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0000\u0000:9\u007fL\t.\u001b+~]o~/\u0002\u0006UrP\u001f=\u00132\u007fZs\u007f\u0003a$yVv\u007f\u001c33iGw$\u0016y3yGj\u007f+36}@r$$3)IF\u007f7\n\u0006?p\\})A.=p'U[h1\u0003?4<Q{6\u000e#<h\u0015u5\u0016v%oTy5O&?p\\})O09pP$p/WPgp\u001b/ y\u0015p?\u001bv#iEn?\u001d\"5x\u0015x?\u001dv;yL>%\u001c77y\u0015}8\n5;u[yjO\"\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0000\u0000:9\u007fLX9\u00033\u0002&\u0015\t.\u001b+~]o~-\u0000\u0006UrP\u001f=\u0013\"\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0000\u0000:9\u007fLX9\u00033\t.\u001b+~]o~-\u0000\u0015I[\u007f2\u00033phZ>?\u001f3><Sw<\nlp\u0018\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0006]yI\u00116\u0005\u0003Nf_\u0002Yv\t.\u001b+~]o~/\u0002\u001e\u007fZs~\u0003a$yVv~\u001f=9d\u001bu5\u0016\u0003#}R{\u0000\u0000:9\u007fL"
         .length();
      char var1 = 24;
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 22;
         String var10001 = var2.substring(++var7, var7 + var1);
         byte var10002 = -1;

         while (true) {
            String var8 = a(var10000, b(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     i = var5;
                     String[] var9 = i;
                     ENFORCEMENT_MODE_ALWAYS = i[18];
                     c = var9[15];
                     PROPERTY_POLICY_FILE = var9[14];
                     ENFORCEMENT_MODE_IGNORE = var9[6];
                     d = var9[5];
                     PROPERTY_ENFORCEMENT_MODE = var9[17];
                     b = var9[7];
                     PROPERTY_POLICY_XML = var9[4];
                     a = Logger.getLogger(KeyUsageChecker.class.getName());
                     e = new AtomicReference<>(c());
                     h = new int[]{128, 64, 32, 16, 8, 4, 2, 1, 32768};
                     return;
                  }

                  var1 = var2.charAt(var7);
                  break;
               default:
                  var5[var3++] = var8;
                  if ((var7 += var1) < var4) {
                     var1 = var2.charAt(var7);
                     continue label24;
                  }

                  var2 = "VsZV*H\rP\u007f_V5\u001a\u001a@n^\r?P\u001aPnCV\u0002\u001a\u001fTi[\r\r\u001a\u0000`oV\u001e#/\u0016YuT\u0000h\u0007\u0014Y>{s\u00172#\u0006,F}P\u001c\u0016\u0010\u0015\\\u007fNY/\fYFyCYkRYBu[\u0015f\u001b\u001cVp^\u0017#_\u0018Yp\u0017\u0012#\u0006Y@oV\u001e#_\b@yE\u0010#\f";
                  var4 = "VsZV*H\rP\u007f_V5\u001a\u001a@n^\r?P\u001aPnCV\u0002\u001a\u001fTi[\r\r\u001a\u0000`oV\u001e#/\u0016YuT\u0000h\u0007\u0014Y>{s\u00172#\u0006,F}P\u001c\u0016\u0010\u0015\\\u007fNY/\fYFyCYkRYBu[\u0015f\u001b\u001cVp^\u0017#_\u0018Yp\u0017\u0012#\u0006Y@oV\u001e#_\b@yE\u0010#\f"
                     .length();
                  var1 = '2';
                  var7 = -1;
            }

            var10000 = 63;
            var10001 = var2.substring(++var7, var7 + var1);
            var10002 = 0;
         }
      }
   }

   private static Exception a(Exception var0) {
      return var0;
   }

   private static char[] b(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 70);
      }

      return var10000;
   }

   private static String a(int var0, char[] var1) {
      int var10003 = var1.length;
      int var10002 = var0;
      char[] var10001 = var1;
      int var10000 = var10003;

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 10;
            case 1 -> 35;
            case 2 -> 8;
            case 3 -> 70;
            case 4 -> 121;
            case 5 -> 64;
            default -> 70;
         });
      }

      return new String(var10001).intern();
   }
}
