package com.l7tech.server.util;

import com.l7tech.gateway.common.audit.AssertionMessages;
import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.gateway.common.audit.LoggingAudit;
import com.l7tech.gateway.common.audit.MessageProcessingMessages;
import com.l7tech.gateway.common.audit.Messages.M;
import com.l7tech.message.Message;
import com.l7tech.message.MessageRole;
import com.l7tech.message.SecurityKnob;
import com.l7tech.policy.assertion.IdentityTarget;
import com.l7tech.policy.assertion.credential.LoginCredentials;
import com.l7tech.security.token.EncryptedKey;
import com.l7tech.security.token.KerberosSecurityToken;
import com.l7tech.security.token.KerberosSigningSecurityToken;
import com.l7tech.security.token.ParsedElement;
import com.l7tech.security.token.SecurityContextToken;
import com.l7tech.security.token.SignedElement;
import com.l7tech.security.token.SigningSecurityToken;
import com.l7tech.security.token.XmlSecurityToken;
import com.l7tech.security.token.SignatureConfirmation.Status;
import com.l7tech.security.xml.KeyInfoDetails;
import com.l7tech.security.xml.SecurityTokenResolver;
import com.l7tech.security.xml.decorator.DecorationRequirements;
import com.l7tech.security.xml.processor.ProcessorResult;
import com.l7tech.security.xml.processor.SecurityContext;
import com.l7tech.security.xml.processor.SecurityContextFinder;
import com.l7tech.server.message.AuthenticationContext;
import com.l7tech.server.secureconversation.SecureConversationSession;
import com.l7tech.util.ArrayUtils;
import com.l7tech.util.Config;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.Functions;
import com.l7tech.util.InvalidDocumentFormatException;
import com.l7tech.util.Pair;
import com.l7tech.util.TimeUnit;
import com.l7tech.util.Functions.Unary;
import java.security.GeneralSecurityException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.w3c.dom.Element;

public class WSSecurityProcessorUtils {
   private static final Logger a;
   private static final AtomicReference<y> b;
   private static final String[] c;

   public static ProcessorResult getWssResults(Message var0, String var1, SecurityTokenResolver var2, Audit var3) {
      return getWssResults(var0, var1, var2, null, var3, null);
   }

   public static ProcessorResult getWssResults(
      Message param0, String param1, SecurityTokenResolver param2, SecurityContextFinder param3, Audit param4, Unary<Boolean, Throwable> param5
   ) {
      // $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 0
      // 001: ldc com/l7tech/message/SecurityKnob
      // 003: invokevirtual com/l7tech/message/Message.getKnob (Ljava/lang/Class;)Ljava/lang/Object;
      // 006: checkcast com/l7tech/message/SecurityKnob
      // 009: astore 6
      // 00b: aload 6
      // 00d: ifnull 025
      // 010: aconst_null
      // 011: aload 6
      // 013: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 018: dup
      // 019: astore 7
      // 01b: if_acmpeq 025
      // 01e: aload 7
      // 020: areturn
      // 021: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 024: athrow
      // 025: aload 0
      // 026: invokevirtual com/l7tech/message/Message.isSoap ()Z
      // 029: istore 8
      // 02b: iload 8
      // 02d: ifeq 04b
      // 030: aload 0
      // 031: invokevirtual com/l7tech/message/Message.getSoapKnob ()Lcom/l7tech/message/SoapKnob;
      // 034: invokeinterface com/l7tech/message/SoapKnob.isSecurityHeaderPresent ()Z 1
      // 039: ifeq 04b
      // 03c: goto 043
      // 03f: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 042: athrow
      // 043: bipush 1
      // 044: goto 04c
      // 047: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 04a: athrow
      // 04b: bipush 0
      // 04c: istore 9
      // 04e: iload 9
      // 050: ifeq 0d7
      // 053: new com/l7tech/security/xml/processor/WssProcessorImpl
      // 056: dup
      // 057: aload 0
      // 058: invokespecial com/l7tech/security/xml/processor/WssProcessorImpl.<init> (Lcom/l7tech/message/Message;)V
      // 05b: astore 10
      // 05d: aload 10
      // 05f: aload 10
      // 061: aload 2
      // 062: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.contextual (Lcom/l7tech/security/xml/SecurityTokenResolver;)Lcom/l7tech/security/xml/ContextualSecurityTokenResolver;
      // 065: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.setSecurityTokenResolver (Lcom/l7tech/security/xml/SecurityTokenResolver;)V
      // 068: aload 10
      // 06a: aload 3
      // 06b: ifnull 076
      // 06e: aload 3
      // 06f: goto 07a
      // 072: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 075: athrow
      // 076: aload 0
      // 077: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/message/Message;)Lcom/l7tech/security/xml/processor/SecurityContextFinder;
      // 07a: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.setSecurityContextFinder (Lcom/l7tech/security/xml/processor/SecurityContextFinder;)V
      // 07d: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a ()Lcom/l7tech/server/util/y;
      // 080: astore 11
      // 082: aload 10
      // 084: aload 11
      // 086: getfield com/l7tech/server/util/y.b J
      // 089: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.setSignedAttachmentSizeLimit (J)V
      // 08c: aload 10
      // 08e: aload 11
      // 090: getfield com/l7tech/server/util/y.c Z
      // 093: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.setRejectOnMustUnderstand (Z)V
      // 096: aload 10
      // 098: aload 11
      // 09a: getfield com/l7tech/server/util/y.d Z
      // 09d: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.setPermitMultipleTimestampSignatures (Z)V
      // 0a0: aload 10
      // 0a2: aload 11
      // 0a4: getfield com/l7tech/server/util/y.e Z
      // 0a7: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.setPermitUnknownBinarySecurityTokens (Z)V
      // 0aa: aload 10
      // 0ac: aload 11
      // 0ae: getfield com/l7tech/server/util/y.f Z
      // 0b1: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.setStrictSignatureConfirmationValidation (Z)V
      // 0b4: aload 10
      // 0b6: new com/l7tech/server/util/b
      // 0b9: dup
      // 0ba: aload 4
      // 0bc: invokespecial com/l7tech/server/util/b.<init> (Lcom/l7tech/gateway/common/audit/Audit;)V
      // 0bf: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.setErrorHandler (Lcom/l7tech/security/xml/processor/WssProcessorErrorHandler;)V
      // 0c2: aload 10
      // 0c4: invokevirtual com/l7tech/security/xml/processor/WssProcessorImpl.processMessage ()Lcom/l7tech/security/xml/processor/ProcessorResult;
      // 0c7: astore 12
      // 0c9: aload 0
      // 0ca: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 0cd: aload 12
      // 0cf: invokeinterface com/l7tech/message/SecurityKnob.setProcessorResult (Lcom/l7tech/security/xml/processor/ProcessorResult;)V 2
      // 0d4: aload 12
      // 0d6: areturn
      // 0d7: goto 177
      // 0da: astore 8
      // 0dc: aload 4
      // 0de: aload 5
      // 0e0: aload 1
      // 0e1: aload 8
      // 0e3: bipush 1
      // 0e4: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 0e7: goto 177
      // 0ea: astore 8
      // 0ec: aload 4
      // 0ee: aload 5
      // 0f0: aload 1
      // 0f1: aload 8
      // 0f3: bipush 1
      // 0f4: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 0f7: goto 177
      // 0fa: astore 8
      // 0fc: aload 4
      // 0fe: aload 5
      // 100: aload 1
      // 101: aload 8
      // 103: bipush 1
      // 104: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 107: goto 177
      // 10a: astore 8
      // 10c: aload 4
      // 10e: aload 5
      // 110: aload 1
      // 111: aload 8
      // 113: bipush 1
      // 114: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 117: goto 177
      // 11a: astore 8
      // 11c: aload 4
      // 11e: aload 5
      // 120: aload 1
      // 121: aload 8
      // 123: bipush 1
      // 124: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 127: goto 177
      // 12a: astore 8
      // 12c: aload 4
      // 12e: aload 5
      // 130: aload 1
      // 131: aload 8
      // 133: bipush 1
      // 134: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 137: goto 177
      // 13a: astore 8
      // 13c: aload 4
      // 13e: aload 5
      // 140: aload 1
      // 141: aload 8
      // 143: bipush 1
      // 144: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 147: goto 177
      // 14a: astore 8
      // 14c: aload 4
      // 14e: aload 5
      // 150: aload 1
      // 151: aload 8
      // 153: bipush 1
      // 154: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 157: goto 177
      // 15a: astore 8
      // 15c: aload 4
      // 15e: aload 5
      // 160: aload 1
      // 161: aload 8
      // 163: bipush 1
      // 164: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 167: goto 177
      // 16a: astore 8
      // 16c: aload 4
      // 16e: aload 5
      // 170: aload 1
      // 171: aload 8
      // 173: bipush 0
      // 174: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/gateway/common/audit/Audit;Lcom/l7tech/util/Functions$Unary;Ljava/lang/String;Ljava/lang/Throwable;Z)V
      // 177: aconst_null
      // 178: areturn
      // try (42 -> 52): 52 com/l7tech/security/xml/processor/ProcessorValidationException
      // try (22 -> 31): 31 com/l7tech/security/xml/processor/ProcessorValidationException
      // try (20 -> 26): 27 com/l7tech/security/xml/processor/ProcessorValidationException
      // try (12 -> 15): 15 com/l7tech/security/xml/processor/ProcessorValidationException
      // try (17 -> 93): 95 com/l7tech/security/xml/processor/ProcessorValidationException
      // try (17 -> 93): 103 com/l7tech/xml/InvalidDocumentSignatureException
      // try (17 -> 93): 111 com/l7tech/security/xml/processor/BadSecurityContextException
      // try (17 -> 93): 119 java/io/IOException
      // try (17 -> 93): 127 java/security/GeneralSecurityException
      // try (17 -> 93): 135 com/l7tech/util/InvalidDocumentFormatException
      // try (17 -> 93): 143 com/l7tech/security/xml/processor/ProcessorException
      // try (17 -> 93): 151 org/xml/sax/SAXException
      // try (17 -> 93): 159 com/l7tech/common/mime/NoSuchPartException
      // try (17 -> 93): 167 java/lang/Exception
   }

   private static void a(Audit param0, Unary<Boolean, Throwable> param1, String param2, Throwable param3, boolean param4) {
      // $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: bipush 0
      // 01: istore 5
      // 03: aload 1
      // 04: ifnull 16
      // 07: aload 1
      // 08: aload 3
      // 09: invokeinterface com/l7tech/util/Functions$Unary.call (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 0e: checkcast java/lang/Boolean
      // 11: invokevirtual java/lang/Boolean.booleanValue ()Z
      // 14: istore 5
      // 16: iload 5
      // 18: ifne 56
      // 1b: aload 0
      // 1c: ifnull 56
      // 1f: goto 26
      // 22: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 25: athrow
      // 26: aload 0
      // 27: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.MESSAGE_VAR_BAD_WSS Lcom/l7tech/gateway/common/audit/Messages$M;
      // 2a: bipush 2
      // 2b: anewarray 471
      // 2e: dup
      // 2f: bipush 0
      // 30: aload 2
      // 31: aastore
      // 32: dup
      // 33: bipush 1
      // 34: aload 3
      // 35: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 38: aastore
      // 39: iload 4
      // 3b: ifeq 50
      // 3e: goto 45
      // 41: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 44: athrow
      // 45: aload 3
      // 46: invokestatic com/l7tech/util/ExceptionUtils.getDebugException (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 49: goto 51
      // 4c: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 4f: athrow
      // 50: aload 3
      // 51: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V 4
      // 56: return
      // try (10 -> 14): 15 java/lang/IllegalStateException
      // try (12 -> 32): 33 java/lang/IllegalStateException
      // try (17 -> 38): 38 java/lang/IllegalStateException
   }

   public static boolean isValidSingleSigner(
      AuthenticationContext var0, ProcessorResult var1, ParsedElement[] var2, boolean var3, Message var4, AuthenticationContext var5, Audit var6
   ) {
      SignedElement[] var8 = var1.getElementsThatWereSigned();

      List var10000;
      label44: {
         try {
            if (var0 == null) {
               var10000 = null;
               break label44;
            }
         } catch (IllegalStateException var17) {
            throw a(var17);
         }

         var10000 = var0.getCredentials();
      }

      List var9 = var10000;
      XmlSecurityToken var10 = a(var0, var1, var3, new u(var4, var9, var5, var3, var6), var6);

      label36: {
         try {
            if (var10 != null) {
               var18 = true;
               break label36;
            }
         } catch (IllegalStateException var16) {
            throw a(var16);
         }

         var18 = false;
      }

      boolean var7 = var18;
      List var11 = Functions.map(Arrays.asList(var8), new v());

      for (ParsedElement var15 : var2) {
         if (!var11.contains(var15.asElement())) {
            var7 = false;
            break;
         }
      }

      return var7;
   }

   private static boolean a(SigningSecurityToken param0, Message param1, AuthenticationContext param2, boolean param3, Audit param4) {
      // $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: aconst_null
      // 001: astore 5
      // 003: aload 0
      // 004: instanceof com/l7tech/security/token/EncryptedKey
      // 007: ifeq 019
      // 00a: aload 0
      // 00b: checkcast com/l7tech/security/token/EncryptedKey
      // 00e: astore 6
      // 010: aload 6
      // 012: invokeinterface com/l7tech/security/token/EncryptedKey.getEncryptedKeySHA1 ()Ljava/lang/String; 1
      // 017: astore 5
      // 019: aconst_null
      // 01a: astore 6
      // 01c: aload 0
      // 01d: instanceof com/l7tech/security/token/SecurityContextToken
      // 020: ifeq 032
      // 023: aload 0
      // 024: checkcast com/l7tech/security/token/SecurityContextToken
      // 027: astore 7
      // 029: aload 7
      // 02b: invokeinterface com/l7tech/security/token/SecurityContextToken.getContextIdentifier ()Ljava/lang/String; 1
      // 030: astore 6
      // 032: aload 5
      // 034: ifnonnull 049
      // 037: aload 6
      // 039: ifnonnull 049
      // 03c: goto 043
      // 03f: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 042: athrow
      // 043: bipush 0
      // 044: ireturn
      // 045: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 048: athrow
      // 049: bipush 0
      // 04a: istore 7
      // 04c: aload 1
      // 04d: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 050: invokeinterface com/l7tech/message/SecurityKnob.getAllDecorationResults ()Ljava/util/List; 1
      // 055: astore 8
      // 057: aload 8
      // 059: invokeinterface java/util/List.iterator ()Ljava/util/Iterator; 1
      // 05e: astore 9
      // 060: aload 9
      // 062: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 067: ifeq 0c6
      // 06a: aload 9
      // 06c: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 071: checkcast com/l7tech/security/xml/decorator/WssDecorator$DecorationResult
      // 074: astore 10
      // 076: bipush 1
      // 077: istore 7
      // 079: aload 10
      // 07b: invokeinterface com/l7tech/security/xml/decorator/WssDecorator$DecorationResult.getEncryptedKeySha1 ()Ljava/lang/String; 1
      // 080: astore 11
      // 082: aload 11
      // 084: ifnull 09e
      // 087: aload 11
      // 089: aload 5
      // 08b: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 08e: ifeq 09e
      // 091: goto 098
      // 094: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 097: athrow
      // 098: bipush 1
      // 099: ireturn
      // 09a: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 09d: athrow
      // 09e: aload 10
      // 0a0: invokeinterface com/l7tech/security/xml/decorator/WssDecorator$DecorationResult.getWsscSecurityContextId ()Ljava/lang/String; 1
      // 0a5: astore 12
      // 0a7: aload 12
      // 0a9: ifnull 0c3
      // 0ac: aload 12
      // 0ae: aload 6
      // 0b0: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 0b3: ifeq 0c3
      // 0b6: goto 0bd
      // 0b9: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0bc: athrow
      // 0bd: bipush 1
      // 0be: ireturn
      // 0bf: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0c2: athrow
      // 0c3: goto 060
      // 0c6: iload 7
      // 0c8: ifne 159
      // 0cb: aload 2
      // 0cc: aload 1
      // 0cd: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 0d0: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 0d5: iload 3
      // 0d6: aconst_null
      // 0d7: aload 4
      // 0d9: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/server/message/AuthenticationContext;Lcom/l7tech/security/xml/processor/ProcessorResult;ZLcom/l7tech/util/Functions$Unary;Lcom/l7tech/gateway/common/audit/Audit;)Lcom/l7tech/security/token/XmlSecurityToken;
      // 0dc: astore 9
      // 0de: aload 9
      // 0e0: instanceof com/l7tech/security/token/EncryptedKey
      // 0e3: ifeq 113
      // 0e6: aload 9
      // 0e8: checkcast com/l7tech/security/token/EncryptedKey
      // 0eb: astore 10
      // 0ed: aload 10
      // 0ef: invokeinterface com/l7tech/security/token/EncryptedKey.isPossessionProved ()Z 1
      // 0f4: ifeq 113
      // 0f7: aload 10
      // 0f9: invokeinterface com/l7tech/security/token/EncryptedKey.getEncryptedKeySHA1 ()Ljava/lang/String; 1
      // 0fe: aload 5
      // 100: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 103: ifeq 113
      // 106: goto 10d
      // 109: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 10c: athrow
      // 10d: bipush 1
      // 10e: ireturn
      // 10f: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 112: athrow
      // 113: aload 9
      // 115: instanceof com/l7tech/security/token/SecurityContextToken
      // 118: ifeq 159
      // 11b: aload 9
      // 11d: checkcast com/l7tech/security/token/SecurityContextToken
      // 120: astore 10
      // 122: aload 10
      // 124: invokeinterface com/l7tech/security/token/SecurityContextToken.isPossessionProved ()Z 1
      // 129: ifeq 159
      // 12c: aload 10
      // 12e: invokeinterface com/l7tech/security/token/SecurityContextToken.getContextIdentifier ()Ljava/lang/String; 1
      // 133: ifnull 159
      // 136: goto 13d
      // 139: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 13c: athrow
      // 13d: aload 10
      // 13f: invokeinterface com/l7tech/security/token/SecurityContextToken.getContextIdentifier ()Ljava/lang/String; 1
      // 144: aload 6
      // 146: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 149: ifeq 159
      // 14c: goto 153
      // 14f: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 152: athrow
      // 153: bipush 1
      // 154: ireturn
      // 155: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 158: athrow
      // 159: bipush 0
      // 15a: ireturn
      // try (22 -> 26): 27 java/lang/IllegalStateException
      // try (24 -> 31): 31 java/lang/IllegalStateException
      // try (54 -> 60): 61 java/lang/IllegalStateException
      // try (56 -> 65): 65 java/lang/IllegalStateException
      // try (70 -> 76): 77 java/lang/IllegalStateException
      // try (72 -> 81): 81 java/lang/IllegalStateException
      // try (101 -> 109): 110 java/lang/IllegalStateException
      // try (104 -> 114): 114 java/lang/IllegalStateException
      // try (122 -> 128): 129 java/lang/IllegalStateException
      // try (125 -> 136): 137 java/lang/IllegalStateException
      // try (131 -> 141): 141 java/lang/IllegalStateException
   }

   private static XmlSecurityToken a(AuthenticationContext var0, ProcessorResult var1, boolean var2, Unary<Boolean, SigningSecurityToken> var3, Audit var4) {
      if (var4 == null) {
         var4 = new LoggingAudit(a);
      }

      XmlSecurityToken var5 = null;

      List var10000;
      label106: {
         try {
            if (var0 == null) {
               var10000 = null;
               break label106;
            }
         } catch (IllegalStateException var21) {
            throw a(var21);
         }

         var10000 = var0.getCredentials();
      }

      List var6 = var10000;

      label98: {
         try {
            if (var2) {
               var22 = getSigningSecurityTokens(var6);
               break label98;
            }
         } catch (IllegalStateException var20) {
            throw a(var20);
         }

         var22 = null;
      }

      SigningSecurityToken[] var7 = var22;
      Element var8 = null;
      if (var1 != null) {
         Set var9 = getSecurityTokenElements(var1);
         SignedElement[] var10 = var1.getElementsThatWereSigned();
         SignedElement[] var11 = var10;
         int var12 = var11.length;
         int var13 = 0;

         while (true) {
            if (var13 >= var12) {
               return var5;
            }

            SignedElement var14 = var11[var13];

            label85: {
               label114: {
                  try {
                     if (var9.contains(var14.asElement())) {
                        break label85;
                     }

                     if (var8 != null) {
                        break label114;
                     }
                  } catch (IllegalStateException var19) {
                     throw a(var19);
                  }

                  SigningSecurityToken var15 = var14.getSigningSecurityToken();

                  label115: {
                     try {
                        if (var7 == null || ArrayUtils.contains(var7, var15)) {
                           break label115;
                        }
                     } catch (IllegalStateException var18) {
                        throw a(var18);
                     }

                     try {
                        if (var3 == null || !(Boolean)var3.call(var15)) {
                           break;
                        }
                     } catch (IllegalStateException var17) {
                        throw a(var17);
                     }

                     var8 = var14.getSignatureElement();
                     var5 = var15;
                     break label85;
                  }

                  var8 = var14.getSignatureElement();
                  var5 = var15;
                  break label85;
               }

               if (var8 != var14.getSignatureElement()) {
                  var4.logAndAudit(MessageProcessingMessages.WSS_DIFFERENT_SIGNATURE);
                  var5 = null;
                  return var5;
               }
            }

            var13++;
         }

         M var10001;
         label57: {
            try {
               var23 = var4;
               if (var7.length == 0) {
                  var10001 = MessageProcessingMessages.WSS_NO_SIGNING_TOKEN;
                  break label57;
               }
            } catch (IllegalStateException var16) {
               throw a(var16);
            }

            var10001 = MessageProcessingMessages.WSS_WRONG_SIGNING_TOKEN;
         }

         var23.logAndAudit(var10001);
         var5 = null;
      }

      return var5;
   }

   public static boolean isValidSigningIdentity(AuthenticationContext var0, IdentityTarget var1, ProcessorResult var2, ParsedElement[] var3) {
      return isValidSigningIdentity(var0, var1, var2.getElementsThatWereSigned(), var3);
   }

   public static boolean isValidSigningIdentity(AuthenticationContext var0, IdentityTarget var1, SignedElement[] var2, ParsedElement[] var3) {
      boolean var10000;
      label95: {
         try {
            if (var3.length > 0) {
               var10000 = true;
               break label95;
            }
         } catch (WSSecurityProcessorUtils.MultipleTokenException var16) {
            throw a(var16);
         }

         var10000 = false;
      }

      boolean var4 = var10000;

      try {
         label107: {
            try {
               if (var0 == null || new IdentityTarget().equals(new IdentityTarget(var1))) {
                  break label107;
               }
            } catch (WSSecurityProcessorUtils.MultipleTokenException var14) {
               throw a(var14);
            }

            Element var5 = null;

            for (SignedElement var9 : var2) {
               Set var10 = a(var9.asElement(), var3);
               SigningSecurityToken var11 = a(var0, var10, var1);
               if (var11 != null) {
                  var5 = var11.getSignedElements()[0].getSignatureElement();
                  break;
               }
            }

            if (var5 == null) {
               var4 = false;
            } else {
               for (ParsedElement var23 : var3) {
                  if (var23 instanceof SignedElement var25) {
                     Set var27 = a(var25.asElement(), var3);
                     SigningSecurityToken var12 = a(var0, var27, var1);
                     if (var5 != var12.getSignedElements()[0].getSignatureElement()) {
                        var4 = false;
                        break;
                     }
                  }
               }

               if (var4) {
                  SignedElement[] var18 = var2;
                  int var20 = var18.length;
                  int var22 = 0;

                  while (true) {
                     if (var22 >= var20) {
                        return var4;
                     }

                     SignedElement var24 = var18[var22];
                     Set var26 = a(var24.asElement(), var3);
                     SigningSecurityToken var28 = a(var0, var26, var1);

                     try {
                        if (var28 != null && var28.getSignedElements()[0].getSignatureElement() != var5) {
                           break;
                        }
                     } catch (WSSecurityProcessorUtils.MultipleTokenException var13) {
                        throw a(var13);
                     }

                     var22++;
                  }

                  var4 = false;
                  return var4;
               }
            }

            return var4;
         }

         var4 = false;
      } catch (WSSecurityProcessorUtils.MultipleTokenException var15) {
         a.log(Level.WARNING, ExceptionUtils.getMessage(var15));
         var4 = false;
      }

      return var4;
   }

   public static SigningSecurityToken getSigningSecurityTokenByIdentity(AuthenticationContext var0, ProcessorResult var1, IdentityTarget var2) {
      SigningSecurityToken var3 = null;
      SignedElement[] var4 = var1.getElementsThatWereSigned();
      if (new IdentityTarget().equals(new IdentityTarget(var2))) {
         Set var5 = getSecurityTokenElements(var1);

         for (SignedElement var9 : var4) {
            if (!var5.contains(var9.asElement())) {
               var3 = var9.getSigningSecurityToken();
               break;
            }
         }
      } else {
         try {
            for (SignedElement var15 : var4) {
               Set var16 = a(var15.asElement(), var4);
               var3 = a(var0, var16, var2);

               try {
                  if (var3 != null) {
                     break;
                  }
               } catch (WSSecurityProcessorUtils.MultipleTokenException var10) {
                  throw a(var10);
               }
            }
         } catch (WSSecurityProcessorUtils.MultipleTokenException var11) {
            a.log(Level.WARNING, ExceptionUtils.getMessage(var11));
         }
      }

      return var3;
   }

   public static SignedElement[] filterSignedElementsByIdentity(
      AuthenticationContext param0, ProcessorResult param1, IdentityTarget param2, boolean param3, Message param4, AuthenticationContext param5, Audit param6
   ) {
      // $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: new java/util/ArrayList
      // 003: dup
      // 004: invokespecial java/util/ArrayList.<init> ()V
      // 007: astore 7
      // 009: aload 1
      // 00a: invokeinterface com/l7tech/security/xml/processor/ProcessorResult.getElementsThatWereSigned ()[Lcom/l7tech/security/token/SignedElement; 1
      // 00f: astore 8
      // 011: new com/l7tech/policy/assertion/IdentityTarget
      // 014: dup
      // 015: invokespecial com/l7tech/policy/assertion/IdentityTarget.<init> ()V
      // 018: new com/l7tech/policy/assertion/IdentityTarget
      // 01b: dup
      // 01c: aload 2
      // 01d: invokespecial com/l7tech/policy/assertion/IdentityTarget.<init> (Lcom/l7tech/policy/assertion/IdentityTarget;)V
      // 020: invokevirtual com/l7tech/policy/assertion/IdentityTarget.equals (Ljava/lang/Object;)Z
      // 023: ifeq 054
      // 026: aload 0
      // 027: aload 1
      // 028: bipush 0
      // 029: anewarray 59
      // 02c: iload 3
      // 02d: aload 4
      // 02f: aload 5
      // 031: aload 6
      // 033: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.isValidSingleSigner (Lcom/l7tech/server/message/AuthenticationContext;Lcom/l7tech/security/xml/processor/ProcessorResult;[Lcom/l7tech/security/token/ParsedElement;ZLcom/l7tech/message/Message;Lcom/l7tech/server/message/AuthenticationContext;Lcom/l7tech/gateway/common/audit/Audit;)Z
      // 036: ifeq 0ff
      // 039: goto 040
      // 03c: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 03f: athrow
      // 040: aload 7
      // 042: aload 8
      // 044: invokestatic java/util/Arrays.asList ([Ljava/lang/Object;)Ljava/util/List;
      // 047: invokeinterface java/util/List.addAll (Ljava/util/Collection;)Z 2
      // 04c: pop
      // 04d: goto 0ff
      // 050: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 053: athrow
      // 054: new java/util/ArrayList
      // 057: dup
      // 058: invokespecial java/util/ArrayList.<init> ()V
      // 05b: astore 9
      // 05d: aload 8
      // 05f: astore 10
      // 061: aload 10
      // 063: arraylength
      // 064: istore 11
      // 066: bipush 0
      // 067: istore 12
      // 069: iload 12
      // 06b: iload 11
      // 06d: if_icmpge 0bd
      // 070: aload 10
      // 072: iload 12
      // 074: aaload
      // 075: astore 13
      // 077: aload 13
      // 079: invokeinterface com/l7tech/security/token/SignedElement.asElement ()Lorg/w3c/dom/Element; 1
      // 07e: aload 8
      // 080: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lorg/w3c/dom/Element;[Lcom/l7tech/security/token/ParsedElement;)Ljava/util/Set;
      // 083: astore 14
      // 085: aload 0
      // 086: aload 14
      // 088: aload 2
      // 089: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Lcom/l7tech/server/message/AuthenticationContext;Ljava/util/Collection;Lcom/l7tech/policy/assertion/IdentityTarget;)Lcom/l7tech/security/token/SigningSecurityToken;
      // 08c: astore 15
      // 08e: aload 15
      // 090: ifnull 0b7
      // 093: aload 15
      // 095: aload 13
      // 097: invokeinterface com/l7tech/security/token/SignedElement.getSigningSecurityToken ()Lcom/l7tech/security/token/SigningSecurityToken; 1
      // 09c: if_acmpne 0b7
      // 09f: goto 0a6
      // 0a2: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0a5: athrow
      // 0a6: aload 9
      // 0a8: aload 13
      // 0aa: invokeinterface java/util/List.add (Ljava/lang/Object;)Z 2
      // 0af: pop
      // 0b0: goto 0b7
      // 0b3: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0b6: athrow
      // 0b7: iinc 12 1
      // 0ba: goto 069
      // 0bd: aload 0
      // 0be: aload 2
      // 0bf: aload 8
      // 0c1: aload 9
      // 0c3: aload 9
      // 0c5: invokeinterface java/util/List.size ()I 1
      // 0ca: anewarray 59
      // 0cd: invokeinterface java/util/List.toArray ([Ljava/lang/Object;)[Ljava/lang/Object; 2
      // 0d2: checkcast [Lcom/l7tech/security/token/ParsedElement;
      // 0d5: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.isValidSigningIdentity (Lcom/l7tech/server/message/AuthenticationContext;Lcom/l7tech/policy/assertion/IdentityTarget;[Lcom/l7tech/security/token/SignedElement;[Lcom/l7tech/security/token/ParsedElement;)Z
      // 0d8: ifeq 0ec
      // 0db: aload 7
      // 0dd: aload 9
      // 0df: invokeinterface java/util/List.addAll (Ljava/util/Collection;)Z 2
      // 0e4: pop
      // 0e5: goto 0ec
      // 0e8: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0eb: athrow
      // 0ec: goto 0ff
      // 0ef: astore 9
      // 0f1: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.a Ljava/util/logging/Logger;
      // 0f4: getstatic java/util/logging/Level.WARNING Ljava/util/logging/Level;
      // 0f7: aload 9
      // 0f9: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 0fc: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;)V
      // 0ff: aload 7
      // 101: aload 7
      // 103: invokeinterface java/util/List.size ()I 1
      // 108: anewarray 576
      // 10b: invokeinterface java/util/List.toArray ([Ljava/lang/Object;)[Ljava/lang/Object; 2
      // 110: checkcast [Lcom/l7tech/security/token/SignedElement;
      // 113: areturn
      // try (83 -> 98): 99 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (67 -> 78): 79 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (65 -> 71): 72 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (16 -> 35): 35 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (7 -> 26): 27 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (37 -> 101): 102 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
   }

   public static SigningSecurityToken[] getSigningSecurityTokens(Collection<LoginCredentials> 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: new java/util/ArrayList
      // 03: dup
      // 04: invokespecial java/util/ArrayList.<init> ()V
      // 07: astore 1
      // 08: aload 0
      // 09: ifnull 76
      // 0c: aload 0
      // 0d: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 12: astore 2
      // 13: aload 2
      // 14: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 19: ifeq 76
      // 1c: aload 2
      // 1d: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 22: checkcast com/l7tech/policy/assertion/credential/LoginCredentials
      // 25: astore 3
      // 26: aload 3
      // 27: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getSecurityTokens ()[Lcom/l7tech/security/token/SecurityToken;
      // 2a: astore 4
      // 2c: aload 4
      // 2e: arraylength
      // 2f: istore 5
      // 31: bipush 0
      // 32: istore 6
      // 34: iload 6
      // 36: iload 5
      // 38: if_icmpge 73
      // 3b: aload 4
      // 3d: iload 6
      // 3f: aaload
      // 40: astore 7
      // 42: aload 3
      // 43: aload 7
      // 45: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.isSecurityTokenPresent (Lcom/l7tech/security/token/SecurityToken;)Z
      // 48: ifeq 6d
      // 4b: aload 7
      // 4d: instanceof com/l7tech/security/token/SigningSecurityToken
      // 50: ifeq 6d
      // 53: goto 5a
      // 56: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 59: athrow
      // 5a: aload 1
      // 5b: aload 7
      // 5d: checkcast com/l7tech/security/token/SigningSecurityToken
      // 60: invokeinterface java/util/Collection.add (Ljava/lang/Object;)Z 2
      // 65: pop
      // 66: goto 6d
      // 69: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 6c: athrow
      // 6d: iinc 6 1
      // 70: goto 34
      // 73: goto 13
      // 76: aload 1
      // 77: aload 1
      // 78: invokeinterface java/util/Collection.size ()I 1
      // 7d: anewarray 678
      // 80: invokeinterface java/util/Collection.toArray ([Ljava/lang/Object;)[Ljava/lang/Object; 2
      // 85: checkcast [Lcom/l7tech/security/token/SigningSecurityToken;
      // 88: areturn
      // try (31 -> 38): 39 java/lang/IllegalStateException
      // try (35 -> 46): 47 java/lang/IllegalStateException
   }

   public static Set<Element> getSecurityTokenElements(ProcessorResult var0) {
      HashSet var1 = new HashSet();
      XmlSecurityToken[] var2 = var0.getXmlSecurityTokens();
      if (var2 != null) {
         for (XmlSecurityToken var6 : var2) {
            if (var6 instanceof SigningSecurityToken var7) {
               var1.add(var7.asElement());
            }
         }
      }

      return var1;
   }

   public static boolean isSameSignature(SigningSecurityToken... var0) {
      boolean var1 = true;
      Element var2 = null;

      for (SigningSecurityToken var6 : var0) {
         SignedElement[] var7 = var6.getSignedElements();
         if (var7.length == 0) {
            var1 = false;
            break;
         }

         if (var2 == null) {
            var2 = var7[0].getSignatureElement();
         }

         SignedElement[] var8 = var7;
         int var9 = var8.length;
         int var10 = 0;

         while (var10 < var9) {
            SignedElement var11 = var8[var10];
            if (var2 == var11.getSignatureElement()) {
               var10++;
            } else {
               var1 = false;
               break;
            }
         }
      }

      return var1;
   }

   private static Set<SigningSecurityToken> a(Element var0, ParsedElement[] var1) {
      HashSet var2 = new HashSet();

      for (ParsedElement var6 : var1) {
         if (var6 instanceof SignedElement var7) {
            try {
               if (var7.asElement() == var0) {
                  var2.add(var7.getSigningSecurityToken());
               }
            } catch (IllegalStateException var8) {
               throw a(var8);
            }
         }
      }

      return var2;
   }

   private static SigningSecurityToken a(AuthenticationContext param0, Collection<SigningSecurityToken> param1, IdentityTarget param2) throws WSSecurityProcessorUtils.MultipleTokenException {
      // $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: aconst_null
      // 001: astore 3
      // 002: aconst_null
      // 003: astore 4
      // 005: aload 2
      // 006: invokevirtual com/l7tech/policy/assertion/IdentityTarget.getTargetIdentityType ()Lcom/l7tech/policy/assertion/IdentityTarget$TargetIdentityType;
      // 009: getstatic com/l7tech/policy/assertion/IdentityTarget$TargetIdentityType.TAG Lcom/l7tech/policy/assertion/IdentityTarget$TargetIdentityType;
      // 00c: if_acmpne 015
      // 00f: aload 2
      // 010: invokevirtual com/l7tech/policy/assertion/IdentityTarget.getIdentityId ()Ljava/lang/String;
      // 013: astore 4
      // 015: aload 1
      // 016: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 01b: astore 5
      // 01d: aload 5
      // 01f: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 024: ifeq 1b2
      // 027: aload 5
      // 029: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 02e: checkcast com/l7tech/security/token/SigningSecurityToken
      // 031: astore 6
      // 033: aload 0
      // 034: aload 6
      // 036: aload 4
      // 038: invokevirtual com/l7tech/server/message/AuthenticationContext.getAuthenticationResultForSigningSecurityToken (Lcom/l7tech/security/token/SigningSecurityToken;Ljava/lang/String;)Lcom/l7tech/server/identity/AuthenticationResult;
      // 03b: astore 7
      // 03d: aload 7
      // 03f: ifnull 1af
      // 042: aload 7
      // 044: invokevirtual com/l7tech/server/identity/AuthenticationResult.getUser ()Lcom/l7tech/identity/User;
      // 047: astore 8
      // 049: aload 2
      // 04a: invokevirtual com/l7tech/policy/assertion/IdentityTarget.getTargetIdentityType ()Lcom/l7tech/policy/assertion/IdentityTarget$TargetIdentityType;
      // 04d: ifnull 1af
      // 050: getstatic com/l7tech/server/util/x.a [I
      // 053: aload 2
      // 054: invokevirtual com/l7tech/policy/assertion/IdentityTarget.getTargetIdentityType ()Lcom/l7tech/policy/assertion/IdentityTarget$TargetIdentityType;
      // 057: invokevirtual com/l7tech/policy/assertion/IdentityTarget$TargetIdentityType.ordinal ()I
      // 05a: iaload
      // 05b: tableswitch 340 1 4 33 130 235 301
      // 078: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 07b: athrow
      // 07c: aload 2
      // 07d: invokevirtual com/l7tech/policy/assertion/IdentityTarget.getIdentityProviderOid ()Lcom/l7tech/objectmodel/Goid;
      // 080: aload 8
      // 082: invokeinterface com/l7tech/identity/User.getProviderId ()Lcom/l7tech/objectmodel/Goid; 1
      // 087: invokevirtual com/l7tech/objectmodel/Goid.equals (Ljava/lang/Object;)Z
      // 08a: ifeq 1af
      // 08d: goto 094
      // 090: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 093: athrow
      // 094: aload 8
      // 096: invokeinterface com/l7tech/identity/User.getId ()Ljava/lang/String; 1
      // 09b: aload 2
      // 09c: invokevirtual com/l7tech/policy/assertion/IdentityTarget.getIdentityId ()Ljava/lang/String;
      // 09f: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 0a2: ifeq 1af
      // 0a5: goto 0ac
      // 0a8: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0ab: athrow
      // 0ac: aload 3
      // 0ad: ifnull 0d7
      // 0b0: goto 0b7
      // 0b3: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0b6: athrow
      // 0b7: new com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // 0ba: dup
      // 0bb: aload 2
      // 0bc: invokevirtual com/l7tech/policy/assertion/IdentityTarget.describeIdentity ()Ljava/lang/String;
      // 0bf: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.c [Ljava/lang/String;
      // 0c2: bipush 2
      // 0c3: aaload
      // 0c4: swap
      // 0c5: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.c [Ljava/lang/String;
      // 0c8: bipush 1
      // 0c9: aaload
      // 0ca: invokedynamic makeConcatWithConstants (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" ]
      // 0cf: invokespecial com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException.<init> (Ljava/lang/String;)V
      // 0d2: athrow
      // 0d3: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0d6: athrow
      // 0d7: aload 6
      // 0d9: astore 3
      // 0da: goto 1af
      // 0dd: new com/l7tech/identity/GroupBean
      // 0e0: dup
      // 0e1: invokespecial com/l7tech/identity/GroupBean.<init> ()V
      // 0e4: astore 9
      // 0e6: aload 9
      // 0e8: aload 2
      // 0e9: invokevirtual com/l7tech/policy/assertion/IdentityTarget.getIdentityProviderOid ()Lcom/l7tech/objectmodel/Goid;
      // 0ec: invokevirtual com/l7tech/identity/GroupBean.setProviderId (Lcom/l7tech/objectmodel/Goid;)V
      // 0ef: aload 9
      // 0f1: aload 2
      // 0f2: invokevirtual com/l7tech/policy/assertion/IdentityTarget.getIdentityId ()Ljava/lang/String;
      // 0f5: invokevirtual com/l7tech/identity/GroupBean.setUniqueIdentifier (Ljava/lang/String;)V
      // 0f8: aload 7
      // 0fa: aload 9
      // 0fc: invokevirtual com/l7tech/server/identity/AuthenticationResult.getCachedGroupMembership (Lcom/l7tech/identity/Group;)Ljava/lang/Boolean;
      // 0ff: astore 10
      // 101: aload 10
      // 103: ifnull 1af
      // 106: aload 10
      // 108: invokevirtual java/lang/Boolean.booleanValue ()Z
      // 10b: ifeq 1af
      // 10e: goto 115
      // 111: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 114: athrow
      // 115: aload 3
      // 116: ifnull 140
      // 119: goto 120
      // 11c: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 11f: athrow
      // 120: new com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // 123: dup
      // 124: aload 2
      // 125: invokevirtual com/l7tech/policy/assertion/IdentityTarget.describeIdentity ()Ljava/lang/String;
      // 128: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.c [Ljava/lang/String;
      // 12b: bipush 4
      // 12c: aaload
      // 12d: swap
      // 12e: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.c [Ljava/lang/String;
      // 131: bipush 3
      // 132: aaload
      // 133: invokedynamic makeConcatWithConstants (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" ]
      // 138: invokespecial com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException.<init> (Ljava/lang/String;)V
      // 13b: athrow
      // 13c: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 13f: athrow
      // 140: aload 6
      // 142: astore 3
      // 143: goto 1af
      // 146: aload 2
      // 147: invokevirtual com/l7tech/policy/assertion/IdentityTarget.getIdentityProviderOid ()Lcom/l7tech/objectmodel/Goid;
      // 14a: aload 8
      // 14c: invokeinterface com/l7tech/identity/User.getProviderId ()Lcom/l7tech/objectmodel/Goid; 1
      // 151: invokevirtual com/l7tech/objectmodel/Goid.equals (Ljava/lang/Object;)Z
      // 154: ifeq 1af
      // 157: aload 3
      // 158: ifnull 182
      // 15b: goto 162
      // 15e: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 161: athrow
      // 162: new com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // 165: dup
      // 166: aload 2
      // 167: invokevirtual com/l7tech/policy/assertion/IdentityTarget.describeIdentity ()Ljava/lang/String;
      // 16a: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.c [Ljava/lang/String;
      // 16d: bipush 4
      // 16e: aaload
      // 16f: swap
      // 170: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.c [Ljava/lang/String;
      // 173: bipush 3
      // 174: aaload
      // 175: invokedynamic makeConcatWithConstants (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" ]
      // 17a: invokespecial com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException.<init> (Ljava/lang/String;)V
      // 17d: athrow
      // 17e: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 181: athrow
      // 182: aload 6
      // 184: astore 3
      // 185: goto 1af
      // 188: aload 3
      // 189: ifnull 1ac
      // 18c: new com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // 18f: dup
      // 190: aload 2
      // 191: invokevirtual com/l7tech/policy/assertion/IdentityTarget.describeIdentity ()Ljava/lang/String;
      // 194: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.c [Ljava/lang/String;
      // 197: bipush 4
      // 198: aaload
      // 199: swap
      // 19a: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.c [Ljava/lang/String;
      // 19d: bipush 3
      // 19e: aaload
      // 19f: invokedynamic makeConcatWithConstants (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" ]
      // 1a4: invokespecial com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException.<init> (Ljava/lang/String;)V
      // 1a7: athrow
      // 1a8: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1ab: athrow
      // 1ac: aload 6
      // 1ae: astore 3
      // 1af: goto 01d
      // 1b2: aload 3
      // 1b3: areturn
      // try (31 -> 40): 40 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (34 -> 48): 49 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (42 -> 57): 58 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (51 -> 62): 63 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (60 -> 79): 79 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (100 -> 105): 106 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (102 -> 110): 111 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (108 -> 127): 127 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (132 -> 140): 141 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (138 -> 157): 157 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
      // try (162 -> 178): 178 com/l7tech/server/util/WSSecurityProcessorUtils$MultipleTokenException
   }

   public static Pair<Boolean, Collection<ParsedElement>> processSignatureConfirmations(SecurityKnob var0, ProcessorResult var1, Audit var2) {
      if (var0.isSignatureConfirmationValidated()) {
         return new Pair(true, null);
      }

      var0.setSignatureConfirmationValidated(true);
      Collection var3 = null;
      Status var4 = var1.getSignatureConfirmation().getStatus();
      if (Status.CONFIRMED == var4) {
         var3 = var1.getSignatureConfirmation().getConfirmationElements().values();
      }

      try {
         if (Status.INVALID == var4) {
            var2.logAndAudit(
               AssertionMessages.REQUIRE_WSS_SIGNATURE_CONFIRMATION_FAILED,
               new String[]{Arrays.toString(var1.getSignatureConfirmation().getErrors().toArray())}
            );
         }
      } catch (IllegalStateException var5) {
         throw a(var5);
      }

      Pair var10000;
      Pair var10001;
      boolean var10002;
      label28: {
         try {
            var10000 = new Pair;
            var10001 = var10000;
            if (Status.INVALID != var4) {
               var10002 = true;
               break label28;
            }
         } catch (IllegalStateException var6) {
            throw a(var6);
         }

         var10002 = false;
      }

      var10001./* $VF: Unable to resugar constructor */<init>(var10002, var3);
      return var10000;
   }

   public static void addSignatureConfirmations(Message param0, Audit param1) {
      // $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 0
      // 001: getstatic com/l7tech/message/MessageRole.REQUEST Lcom/l7tech/message/MessageRole;
      // 004: invokevirtual com/l7tech/message/Message.getRelated (Lcom/l7tech/message/MessageRole;)Lcom/l7tech/message/Message;
      // 007: astore 2
      // 008: aload 2
      // 009: ifnonnull 011
      // 00c: return
      // 00d: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 010: athrow
      // 011: aload 0
      // 012: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 015: astore 3
      // 016: aload 2
      // 017: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 01a: astore 4
      // 01c: aload 3
      // 01d: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 022: ifnull 042
      // 025: aload 3
      // 026: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 02b: invokeinterface com/l7tech/security/xml/processor/ProcessorResult.isWsse11Seen ()Z 1
      // 030: ifeq 042
      // 033: goto 03a
      // 036: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 039: athrow
      // 03a: bipush 1
      // 03b: goto 043
      // 03e: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 041: athrow
      // 042: bipush 0
      // 043: istore 5
      // 045: aload 4
      // 047: invokeinterface com/l7tech/message/SecurityKnob.isNeedsSignatureConfirmations ()Z 1
      // 04c: ifne 070
      // 04f: iload 5
      // 051: ifne 070
      // 054: goto 05b
      // 057: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 05a: athrow
      // 05b: aload 3
      // 05c: invokeinterface com/l7tech/message/SecurityKnob.hasWss11Decorations ()Z 1
      // 061: ifne 070
      // 064: goto 06b
      // 067: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 06a: athrow
      // 06b: return
      // 06c: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 06f: athrow
      // 070: new java/util/HashMap
      // 073: dup
      // 074: invokespecial java/util/HashMap.<init> ()V
      // 077: astore 6
      // 079: aload 3
      // 07a: invokeinterface com/l7tech/message/SecurityKnob.getDecorationRequirements ()[Lcom/l7tech/security/xml/decorator/DecorationRequirements; 1
      // 07f: astore 7
      // 081: aload 7
      // 083: arraylength
      // 084: istore 8
      // 086: bipush 0
      // 087: istore 9
      // 089: iload 9
      // 08b: iload 8
      // 08d: if_icmpge 0ac
      // 090: aload 7
      // 092: iload 9
      // 094: aaload
      // 095: astore 10
      // 097: aload 6
      // 099: aload 10
      // 09b: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.getSecurityHeaderActor ()Ljava/lang/String;
      // 09e: aload 10
      // 0a0: invokeinterface java/util/Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 3
      // 0a5: pop
      // 0a6: iinc 9 1
      // 0a9: goto 089
      // 0ac: aload 6
      // 0ae: invokeinterface java/util/Map.keySet ()Ljava/util/Set; 1
      // 0b3: astore 7
      // 0b5: aload 7
      // 0b7: getstatic com/l7tech/util/SoapConstants.L7_SOAP_ACTOR Ljava/lang/String;
      // 0ba: invokeinterface java/util/Set.contains (Ljava/lang/Object;)Z 2
      // 0bf: ifeq 0d6
      // 0c2: aload 6
      // 0c4: getstatic com/l7tech/util/SoapConstants.L7_SOAP_ACTOR Ljava/lang/String;
      // 0c7: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 0cc: checkcast com/l7tech/security/xml/decorator/DecorationRequirements
      // 0cf: goto 11b
      // 0d2: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0d5: athrow
      // 0d6: aload 7
      // 0d8: aconst_null
      // 0d9: invokeinterface java/util/Set.contains (Ljava/lang/Object;)Z 2
      // 0de: ifeq 0f3
      // 0e1: aload 6
      // 0e3: aconst_null
      // 0e4: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 0e9: checkcast com/l7tech/security/xml/decorator/DecorationRequirements
      // 0ec: goto 11b
      // 0ef: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0f2: athrow
      // 0f3: aload 7
      // 0f5: invokeinterface java/util/Set.size ()I 1
      // 0fa: bipush 1
      // 0fb: if_icmpne 11a
      // 0fe: aload 6
      // 100: invokeinterface java/util/Map.values ()Ljava/util/Collection; 1
      // 105: bipush 1
      // 106: anewarray 733
      // 109: invokeinterface java/util/Collection.toArray ([Ljava/lang/Object;)[Ljava/lang/Object; 2
      // 10e: checkcast [Lcom/l7tech/security/xml/decorator/DecorationRequirements;
      // 111: bipush 0
      // 112: aaload
      // 113: goto 11b
      // 116: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 119: athrow
      // 11a: aconst_null
      // 11b: astore 8
      // 11d: aload 4
      // 11f: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 124: astore 9
      // 126: aload 9
      // 128: ifnonnull 148
      // 12b: aload 1
      // 12c: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.MESSAGE_VAR_NO_WSS Lcom/l7tech/gateway/common/audit/Messages$M;
      // 12f: bipush 1
      // 130: anewarray 471
      // 133: dup
      // 134: bipush 0
      // 135: getstatic com/l7tech/server/util/WSSecurityProcessorUtils.c [Ljava/lang/String;
      // 138: bipush 6
      // 13a: aaload
      // 13b: aastore
      // 13c: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V 3
      // 141: goto 148
      // 144: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 147: athrow
      // 148: aload 9
      // 14a: ifnonnull 155
      // 14d: aconst_null
      // 14e: goto 15c
      // 151: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 154: athrow
      // 155: aload 9
      // 157: invokeinterface com/l7tech/security/xml/processor/ProcessorResult.getValidatedSignatureValues ()Ljava/util/List; 1
      // 15c: astore 10
      // 15e: aload 8
      // 160: ifnonnull 173
      // 163: aload 1
      // 164: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.MESSAGE_NO_SIG_CONFIRMATION Lcom/l7tech/gateway/common/audit/Messages$M;
      // 167: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V 2
      // 16c: goto 1bf
      // 16f: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 172: athrow
      // 173: aload 10
      // 175: ifnull 189
      // 178: aload 10
      // 17a: invokeinterface java/util/List.isEmpty ()Z 1
      // 17f: ifeq 196
      // 182: goto 189
      // 185: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 188: athrow
      // 189: aload 8
      // 18b: aconst_null
      // 18c: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.addSignatureConfirmation (Ljava/lang/String;)V
      // 18f: goto 1bf
      // 192: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 195: athrow
      // 196: aload 10
      // 198: invokeinterface java/util/List.iterator ()Ljava/util/Iterator; 1
      // 19d: astore 11
      // 19f: aload 11
      // 1a1: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 1a6: ifeq 1bf
      // 1a9: aload 11
      // 1ab: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 1b0: checkcast java/lang/String
      // 1b3: astore 12
      // 1b5: aload 8
      // 1b7: aload 12
      // 1b9: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.addSignatureConfirmation (Ljava/lang/String;)V
      // 1bc: goto 19f
      // 1bf: aload 4
      // 1c1: bipush 0
      // 1c2: invokeinterface com/l7tech/message/SecurityKnob.setNeedsSignatureConfirmations (Z)V 2
      // 1c7: aload 3
      // 1c8: bipush 1
      // 1c9: invokeinterface com/l7tech/message/SecurityKnob.setSignatureConfirmationValidated (Z)V 2
      // 1ce: return
      // try (4 -> 7): 7 java/lang/IllegalStateException
      // try (15 -> 22): 23 java/lang/IllegalStateException
      // try (18 -> 27): 27 java/lang/IllegalStateException
      // try (31 -> 36): 37 java/lang/IllegalStateException
      // try (34 -> 42): 43 java/lang/IllegalStateException
      // try (39 -> 46): 46 java/lang/IllegalStateException
      // try (78 -> 87): 87 java/lang/IllegalStateException
      // try (89 -> 98): 98 java/lang/IllegalStateException
      // try (100 -> 113): 113 java/lang/IllegalStateException
      // try (120 -> 133): 134 java/lang/IllegalStateException
      // try (136 -> 140): 140 java/lang/IllegalStateException
      // try (145 -> 151): 151 java/lang/IllegalStateException
      // try (153 -> 158): 159 java/lang/IllegalStateException
      // try (155 -> 165): 165 java/lang/IllegalStateException
   }

   public static boolean setToken(DecorationRequirements var0, SigningSecurityToken var1) {
      boolean var2 = false;
      if (var1 instanceof KerberosSigningSecurityToken) {
         var0.setKerberosTicket(((KerberosSecurityToken)var1).getServiceTicket());
         var2 = true;
      } else if (var1 instanceof SecurityContextToken var3) {
         SecurityContext var4 = var3.getSecurityContext();
         if (var4 instanceof SecureConversationSession) {
            var0.setSecureConversationSession((SecureConversationSession)var4);
            var2 = true;
         }
      } else if (var1 instanceof EncryptedKey var7 && var7.isUnwrapped()) {
         try {
            var0.setEncryptedKey(var7.getSecretKey());
            var0.setEncryptedKeyReferenceInfo(KeyInfoDetails.makeEncryptedKeySha1Ref(var7.getEncryptedKeySHA1()));
            var2 = true;
         } catch (InvalidDocumentFormatException var5) {
            throw new IllegalStateException();
         } catch (GeneralSecurityException var6) {
            throw new IllegalStateException();
         }
      }

      return var2;
   }

   private static SecurityContextFinder a(Message var0) {
      w var1 = null;
      Message var2 = var0.getRelated(MessageRole.REQUEST);
      if (var2 != null) {
         var1 = new w(var2);
      }

      return var1;
   }

   private static y a() {
      y var0 = b.get();

      try {
         if (var0 != null && var0.a + TimeUnit.SECONDS.toMillis(30L) >= System.currentTimeMillis()) {
            return var0;
         }
      } catch (IllegalStateException var3) {
         throw a(var3);
      }

      Config var1 = ConfigFactory.getUncachedConfig();
      String[] var2 = c;
      var0 = new y(
         var1.getLongProperty(var2[0], 0L),
         var1.getBooleanProperty(var2[8], true),
         var1.getBooleanProperty(var2[5], false),
         var1.getBooleanProperty(var2[9], false),
         var1.getBooleanProperty(var2[7], true)
      );
      b.set(var0);
      return var0;
   }

   static {
      String[] var5 = new String[10];
      int var3 = 0;
      String var2 = ")v\u0001<!\u0005j(t%&!7`'w%,\u0018\u0005q\u0002`4-&\u0002g7$\rl,<<\u0014e%94'>\u0001g39&' \nm`\u007f/:u\rm%w4!!\u001d)g\u0002g7$\rl,<<\u0014e%94'>\u0001g39&' \nm`\u007f/:u\rm%w4!!\u001d)g.7j3f%\u0016f#|3;:\u0016'!u,'\")|,m)89\u0001])t%;!\u0005d0J)/;\u0005}5k%;\u0007\u0012|1=0\u0017}37j3f%\u0016f#|3;:\u0016'3m2!6\u0010Z)~.)!\u0011{%Z/&3\r{-x4!:\n_!u),4\u0010`/w";
      int var4 = ")v\u0001<!\u0005j(t%&!7`'w%,\u0018\u0005q\u0002`4-&\u0002g7$\rl,<<\u0014e%94'>\u0001g39&' \nm`\u007f/:u\rm%w4!!\u001d)g\u0002g7$\rl,<<\u0014e%94'>\u0001g39&' \nm`\u007f/:u\rm%w4!!\u001d)g.7j3f%\u0016f#|3;:\u0016'!u,'\")|,m)89\u0001])t%;!\u0005d0J)/;\u0005}5k%;\u0007\u0012|1=0\u0017}37j3f%\u0016f#|3;:\u0016'3m2!6\u0010Z)~.)!\u0011{%Z/&3\r{-x4!:\n_!u),4\u0010`/w"
         .length();
      char var1 = 26;
      int var7 = -1;

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

         while (true) {
            String var8 = a(var10000, a(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     c = var5;
                     a = Logger.getLogger(WSSecurityProcessorUtils.class.getName());
                     b = new AtomicReference<>();
                     return;
                  }

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

                  var2 = "\u000eK\u001c\u0005:<^\u0018G\t8\u001d*@(J\u0019\u0010\u001a*@\u001cJ\u0019.\nW\u000e[\u0018+[\u001eA\u000e\u0006\u0007+\u001a\u001cH\u0011\u001a\u001f\fZ\u0016J\u0012\u0002\u0006\u001b]\u0013E\u000f\f;<W\bV\u0014\u0001\u0011\r[\u0016A\u0013\u0006";
                  var4 = "\u000eK\u001c\u0005:<^\u0018G\t8\u001d*@(J\u0019\u0010\u001a*@\u001cJ\u0019.\nW\u000e[\u0018+[\u001eA\u000e\u0006\u0007+\u001a\u001cH\u0011\u001a\u001f\fZ\u0016J\u0012\u0002\u0006\u001b]\u0013E\u000f\f;<W\bV\u0014\u0001\u0011\r[\u0016A\u0013\u0006"
                     .length();
                  var1 = 24;
                  var7 = -1;
            }

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

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

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

      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 -> 23;
            case 1 -> 78;
            case 2 -> 23;
            case 3 -> 31;
            case 4 -> 2;
            case 5 -> 51;
            default -> 94;
         });
      }

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

   private static class MultipleTokenException extends Exception {
      static final long serialVersionUID = 3447178923432468148L;

      private MultipleTokenException(String var1) {
         super(var1);
      }
   }
}
