package com.l7tech.server.policy.assertion.xmlsec;

import com.l7tech.gateway.common.audit.AssertionMessages;
import com.l7tech.message.Message;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.policy.assertion.xmlsec.RequireWssX509Cert;
import com.l7tech.security.token.SignedElement;
import com.l7tech.security.token.X509SigningSecurityToken;
import com.l7tech.security.token.XmlSecurityToken;
import com.l7tech.security.xml.SecurityTokenResolver;
import com.l7tech.security.xml.processor.X509BinarySecurityTokenImpl;
import com.l7tech.server.message.AuthenticationContext;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.assertion.AbstractMessageTargetableServerAssertion;
import com.l7tech.util.Config;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.InvalidDocumentFormatException;
import com.l7tech.xml.soap.SoapUtil;
import java.io.IOException;
import org.springframework.beans.factory.BeanFactory;
import org.w3c.dom.Element;

public class ServerRequireWssX509Cert extends AbstractMessageTargetableServerAssertion<RequireWssX509Cert> {
   private static final boolean d;
   private final Config e;
   private final SecurityTokenResolver f;
   private static final String[] g;

   public ServerRequireWssX509Cert(RequireWssX509Cert var1, BeanFactory var2) {
      super(var1);
      String[] var3 = g;
      this.e = (Config)var2.getBean(var3[4], Config.class);
      this.f = (SecurityTokenResolver)var2.getBean(var3[2], SecurityTokenResolver.class);
   }

   @Override
   public AssertionStatus checkRequest(PolicyEnforcementContext var1) throws IOException, PolicyAssertionException {
      try {
         if (!this.assertion.getRecipientContext().localRecipient()) {
            this.logAndAudit(AssertionMessages.WSS_X509_FOR_ANOTHER_USER);
            return AssertionStatus.NONE;
         }
      } catch (IOException var2) {
         throw a(var2);
      }

      return super.checkRequest(var1);
   }

   @Override
   protected AssertionStatus doCheckRequest(PolicyEnforcementContext param1, Message param2, String param3, AuthenticationContext param4) throws IOException, PolicyAssertionException {
      // $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: invokevirtual com/l7tech/message/Message.isSoap ()Z
      // 004: ifne 01f
      // 007: aload 0
      // 008: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSS_X509_NON_SOAP Lcom/l7tech/gateway/common/audit/Messages$M;
      // 00b: bipush 1
      // 00c: anewarray 131
      // 00f: dup
      // 010: bipush 0
      // 011: aload 3
      // 012: aastore
      // 013: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 016: aload 0
      // 017: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.getBadMessageStatus ()Lcom/l7tech/policy/assertion/AssertionStatus;
      // 01a: areturn
      // 01b: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 01e: athrow
      // 01f: aload 0
      // 020: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.isRequest ()Z
      // 023: ifeq 04d
      // 026: aload 0
      // 027: getfield com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.e Lcom/l7tech/util/Config;
      // 02a: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.g [Ljava/lang/String;
      // 02d: bipush 3
      // 02e: aaload
      // 02f: bipush 1
      // 030: invokeinterface com/l7tech/util/Config.getBooleanProperty (Ljava/lang/String;Z)Z 3
      // 035: ifne 04d
      // 038: goto 03f
      // 03b: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 03e: athrow
      // 03f: aload 2
      // 040: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 043: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 048: astore 5
      // 04a: goto 05c
      // 04d: aload 2
      // 04e: aload 3
      // 04f: aload 0
      // 050: getfield com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.f Lcom/l7tech/security/xml/SecurityTokenResolver;
      // 053: aload 0
      // 054: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 057: invokestatic com/l7tech/server/util/WSSecurityProcessorUtils.getWssResults (Lcom/l7tech/message/Message;Ljava/lang/String;Lcom/l7tech/security/xml/SecurityTokenResolver;Lcom/l7tech/gateway/common/audit/Audit;)Lcom/l7tech/security/xml/processor/ProcessorResult;
      // 05a: astore 5
      // 05c: goto 06b
      // 05f: astore 6
      // 061: new com/l7tech/util/CausedIOException
      // 064: dup
      // 065: aload 6
      // 067: invokespecial com/l7tech/util/CausedIOException.<init> (Ljava/lang/Throwable;)V
      // 06a: athrow
      // 06b: aload 5
      // 06d: ifnonnull 0a4
      // 070: aload 0
      // 071: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSS_X509_NO_WSS_LEVEL_SECURITY Lcom/l7tech/gateway/common/audit/Messages$M;
      // 074: bipush 1
      // 075: anewarray 131
      // 078: dup
      // 079: bipush 0
      // 07a: aload 3
      // 07b: aastore
      // 07c: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 07f: aload 0
      // 080: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.isRequest ()Z
      // 083: ifeq 0a0
      // 086: goto 08d
      // 089: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 08c: athrow
      // 08d: aload 1
      // 08e: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setRequestPolicyViolated ()V 1
      // 093: aload 1
      // 094: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setAuthenticationMissing ()V 1
      // 099: goto 0a0
      // 09c: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 09f: athrow
      // 0a0: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0a3: areturn
      // 0a4: aload 5
      // 0a6: invokeinterface com/l7tech/security/xml/processor/ProcessorResult.getXmlSecurityTokens ()[Lcom/l7tech/security/token/XmlSecurityToken; 1
      // 0ab: astore 6
      // 0ad: aload 6
      // 0af: ifnonnull 0d3
      // 0b2: aload 0
      // 0b3: aload 1
      // 0b4: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Lcom/l7tech/server/message/PolicyEnforcementContext;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0b7: astore 7
      // 0b9: aload 0
      // 0ba: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSS_X509_NO_TOKEN Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0bd: bipush 2
      // 0be: anewarray 131
      // 0c1: dup
      // 0c2: bipush 0
      // 0c3: aload 3
      // 0c4: aastore
      // 0c5: dup
      // 0c6: bipush 1
      // 0c7: aload 7
      // 0c9: invokevirtual com/l7tech/policy/assertion/AssertionStatus.getMessage ()Ljava/lang/String;
      // 0cc: aastore
      // 0cd: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 0d0: aload 7
      // 0d2: areturn
      // 0d3: aconst_null
      // 0d4: astore 7
      // 0d6: aload 0
      // 0d7: getfield com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 0da: checkcast com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert
      // 0dd: invokevirtual com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert.getSignatureElementVariable ()Ljava/lang/String;
      // 0e0: ifnull 128
      // 0e3: bipush 0
      // 0e4: anewarray 76
      // 0e7: astore 7
      // 0e9: aload 1
      // 0ea: aload 0
      // 0eb: getfield com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 0ee: checkcast com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert
      // 0f1: invokevirtual com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert.getSignatureElementVariable ()Ljava/lang/String;
      // 0f4: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getVariable (Ljava/lang/String;)Ljava/lang/Object; 2
      // 0f9: astore 8
      // 0fb: aload 8
      // 0fd: instanceof org/w3c/dom/Element
      // 100: ifeq 114
      // 103: bipush 1
      // 104: anewarray 76
      // 107: dup
      // 108: bipush 0
      // 109: aload 8
      // 10b: checkcast org/w3c/dom/Element
      // 10e: aastore
      // 10f: astore 7
      // 111: goto 123
      // 114: aload 8
      // 116: instanceof [Lorg/w3c/dom/Element;
      // 119: ifeq 123
      // 11c: aload 8
      // 11e: checkcast [Lorg/w3c/dom/Element;
      // 121: astore 7
      // 123: goto 128
      // 126: astore 8
      // 128: aconst_null
      // 129: astore 8
      // 12b: aload 0
      // 12c: getfield com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 12f: checkcast com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert
      // 132: invokevirtual com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert.getSignatureReferenceElementVariable ()Ljava/lang/String;
      // 135: ifnull 17d
      // 138: bipush 0
      // 139: anewarray 76
      // 13c: astore 8
      // 13e: aload 1
      // 13f: aload 0
      // 140: getfield com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 143: checkcast com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert
      // 146: invokevirtual com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert.getSignatureReferenceElementVariable ()Ljava/lang/String;
      // 149: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getVariable (Ljava/lang/String;)Ljava/lang/Object; 2
      // 14e: astore 9
      // 150: aload 9
      // 152: instanceof org/w3c/dom/Element
      // 155: ifeq 169
      // 158: bipush 1
      // 159: anewarray 76
      // 15c: dup
      // 15d: bipush 0
      // 15e: aload 9
      // 160: checkcast org/w3c/dom/Element
      // 163: aastore
      // 164: astore 8
      // 166: goto 178
      // 169: aload 9
      // 16b: instanceof [Lorg/w3c/dom/Element;
      // 16e: ifeq 178
      // 171: aload 9
      // 173: checkcast [Lorg/w3c/dom/Element;
      // 176: astore 8
      // 178: goto 17d
      // 17b: astore 9
      // 17d: aconst_null
      // 17e: astore 9
      // 180: aload 6
      // 182: astore 10
      // 184: aload 10
      // 186: arraylength
      // 187: istore 11
      // 189: bipush 0
      // 18a: istore 12
      // 18c: iload 12
      // 18e: iload 11
      // 190: if_icmpge 286
      // 193: aload 10
      // 195: iload 12
      // 197: aaload
      // 198: astore 13
      // 19a: aload 0
      // 19b: aload 13
      // 19d: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Lcom/l7tech/security/token/XmlSecurityToken;)Z
      // 1a0: ifeq 280
      // 1a3: aload 13
      // 1a5: checkcast com/l7tech/security/token/X509SigningSecurityToken
      // 1a8: astore 14
      // 1aa: aload 14
      // 1ac: invokeinterface com/l7tech/security/token/X509SigningSecurityToken.isPossessionProved ()Z 1
      // 1b1: ifeq 253
      // 1b4: aload 0
      // 1b5: aload 7
      // 1b7: aload 8
      // 1b9: aload 14
      // 1bb: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a ([Lorg/w3c/dom/Element;[Lorg/w3c/dom/Element;Lcom/l7tech/security/token/X509SigningSecurityToken;)Z
      // 1be: ifeq 253
      // 1c1: goto 1c8
      // 1c4: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1c7: athrow
      // 1c8: aload 14
      // 1ca: invokeinterface com/l7tech/security/token/X509SigningSecurityToken.getMessageSigningCertificate ()Ljava/security/cert/X509Certificate; 1
      // 1cf: astore 15
      // 1d1: aload 9
      // 1d3: ifnull 218
      // 1d6: aload 9
      // 1d8: aload 14
      // 1da: invokeinterface com/l7tech/security/token/X509SigningSecurityToken.getSignedElements ()[Lcom/l7tech/security/token/SignedElement; 1
      // 1df: bipush 0
      // 1e0: aaload
      // 1e1: invokeinterface com/l7tech/security/token/SignedElement.getSignatureElement ()Lorg/w3c/dom/Element; 1
      // 1e6: if_acmpeq 218
      // 1e9: goto 1f0
      // 1ec: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1ef: athrow
      // 1f0: aload 0
      // 1f1: getfield com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 1f4: checkcast com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert
      // 1f7: invokevirtual com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert.isAllowMultipleSignatures ()Z
      // 1fa: ifne 218
      // 1fd: goto 204
      // 200: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 203: athrow
      // 204: aload 0
      // 205: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSS_X509_TOO_MANY_VALID_SIG Lcom/l7tech/gateway/common/audit/Messages$M;
      // 208: bipush 1
      // 209: anewarray 131
      // 20c: dup
      // 20d: bipush 0
      // 20e: aload 3
      // 20f: aastore
      // 210: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 213: aload 0
      // 214: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.getBadMessageStatus ()Lcom/l7tech/policy/assertion/AssertionStatus;
      // 217: areturn
      // 218: aload 14
      // 21a: invokeinterface com/l7tech/security/token/X509SigningSecurityToken.getSignedElements ()[Lcom/l7tech/security/token/SignedElement; 1
      // 21f: bipush 0
      // 220: aaload
      // 221: invokeinterface com/l7tech/security/token/SignedElement.getSignatureElement ()Lorg/w3c/dom/Element; 1
      // 226: astore 9
      // 228: aload 15
      // 22a: invokestatic com/l7tech/common/io/CertUtils.extractFirstCommonNameFromCertificate (Ljava/security/cert/X509Certificate;)Ljava/lang/String;
      // 22d: astore 16
      // 22f: aload 4
      // 231: aload 14
      // 233: aload 0
      // 234: getfield com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 237: checkcast com/l7tech/policy/assertion/xmlsec/RequireWssX509Cert
      // 23a: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 23d: invokestatic com/l7tech/policy/assertion/credential/LoginCredentials.makeLoginCredentials (Lcom/l7tech/security/token/SecurityToken;Ljava/lang/Class;)Lcom/l7tech/policy/assertion/credential/LoginCredentials;
      // 240: invokevirtual com/l7tech/server/message/AuthenticationContext.addCredentials (Lcom/l7tech/policy/assertion/credential/LoginCredentials;)V
      // 243: aload 0
      // 244: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSS_X509_CERT_LOADED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 247: bipush 1
      // 248: anewarray 131
      // 24b: dup
      // 24c: bipush 0
      // 24d: aload 16
      // 24f: aastore
      // 250: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 253: goto 280
      // 256: astore 15
      // 258: aload 0
      // 259: getstatic com/l7tech/gateway/common/audit/AssertionMessages.EXCEPTION_WARNING_WITH_MORE_INFO Lcom/l7tech/gateway/common/audit/Messages$M;
      // 25c: bipush 1
      // 25d: anewarray 131
      // 260: dup
      // 261: bipush 0
      // 262: aload 15
      // 264: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 267: getstatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.g [Ljava/lang/String;
      // 26a: bipush 0
      // 26b: aaload
      // 26c: swap
      // 26d: 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" ]
      // 272: aastore
      // 273: aload 15
      // 275: invokestatic com/l7tech/util/ExceptionUtils.getDebugException (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 278: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V
      // 27b: aload 0
      // 27c: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.getBadMessageStatus ()Lcom/l7tech/policy/assertion/AssertionStatus;
      // 27f: areturn
      // 280: iinc 12 1
      // 283: goto 18c
      // 286: aload 9
      // 288: ifnonnull 2ac
      // 28b: aload 0
      // 28c: aload 1
      // 28d: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Lcom/l7tech/server/message/PolicyEnforcementContext;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 290: astore 10
      // 292: aload 0
      // 293: getstatic com/l7tech/gateway/common/audit/AssertionMessages.WSS_X509_NO_PROVEN_CERT Lcom/l7tech/gateway/common/audit/Messages$M;
      // 296: bipush 2
      // 297: anewarray 131
      // 29a: dup
      // 29b: bipush 0
      // 29c: aload 3
      // 29d: aastore
      // 29e: dup
      // 29f: bipush 1
      // 2a0: aload 10
      // 2a2: invokevirtual com/l7tech/policy/assertion/AssertionStatus.getMessage ()Ljava/lang/String;
      // 2a5: aastore
      // 2a6: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 2a9: aload 10
      // 2ab: areturn
      // 2ac: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 2af: areturn
      // try (0 -> 14): 45 org/xml/sax/SAXException
      // try (17 -> 28): 29 org/xml/sax/SAXException
      // try (0 -> 15): 15 com/l7tech/policy/variable/NoSuchVariableException
      // try (17 -> 44): 45 org/xml/sax/SAXException
      // try (53 -> 72): 73 org/xml/sax/SAXException
      // try (51 -> 65): 66 org/xml/sax/SAXException
      // try (112 -> 137): 138 com/l7tech/policy/variable/NoSuchVariableException
      // try (149 -> 174): 175 com/l7tech/policy/variable/NoSuchVariableException
      // try (216 -> 231): 232 org/xml/sax/SAXException
      // try (214 -> 223): 224 org/xml/sax/SAXException
      // try (199 -> 208): 209 org/xml/sax/SAXException
      // try (199 -> 245): 273 com/l7tech/util/InvalidDocumentFormatException
      // try (246 -> 272): 273 com/l7tech/util/InvalidDocumentFormatException
   }

   private boolean a(XmlSecurityToken var1) {
      return d ? var1 instanceof X509BinarySecurityTokenImpl : var1 instanceof X509SigningSecurityToken;
   }

   private AssertionStatus a(PolicyEnforcementContext var1) {
      AssertionStatus var2;
      if (this.isRequest()) {
         var2 = AssertionStatus.AUTH_REQUIRED;
         var1.setAuthenticationMissing();
      } else {
         var2 = AssertionStatus.FALSIFIED;
      }

      return var2;
   }

   private boolean a(Element[] param1, Element[] param2, X509SigningSecurityToken param3) throws InvalidDocumentFormatException {
      // $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 4
      // 03: aload 1
      // 04: ifnonnull 18
      // 07: aload 2
      // 08: ifnonnull 18
      // 0b: goto 12
      // 0e: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 11: athrow
      // 12: bipush 1
      // 13: istore 4
      // 15: goto 9f
      // 18: aload 3
      // 19: invokeinterface com/l7tech/security/token/X509SigningSecurityToken.getSignedElements ()[Lcom/l7tech/security/token/SignedElement; 1
      // 1e: astore 5
      // 20: aload 5
      // 22: arraylength
      // 23: ifle 9f
      // 26: aload 5
      // 28: bipush 0
      // 29: aaload
      // 2a: invokeinterface com/l7tech/security/token/SignedElement.getSignatureElement ()Lorg/w3c/dom/Element; 1
      // 2f: astore 6
      // 31: aload 6
      // 33: ifnull 9f
      // 36: aload 0
      // 37: aload 2
      // 38: aload 5
      // 3a: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a ([Lorg/w3c/dom/Element;[Lcom/l7tech/security/token/SignedElement;)Z
      // 3d: ifeq 9f
      // 40: goto 47
      // 43: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 46: athrow
      // 47: aload 1
      // 48: ifnull 9c
      // 4b: goto 52
      // 4e: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 51: athrow
      // 52: aload 1
      // 53: aload 6
      // 55: invokestatic com/l7tech/util/ArrayUtils.contains ([Ljava/lang/Object;Ljava/lang/Object;)Z
      // 58: ifeq 68
      // 5b: goto 62
      // 5e: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 61: athrow
      // 62: bipush 1
      // 63: istore 4
      // 65: goto 9f
      // 68: aload 1
      // 69: astore 7
      // 6b: aload 7
      // 6d: arraylength
      // 6e: istore 8
      // 70: bipush 0
      // 71: istore 9
      // 73: iload 9
      // 75: iload 8
      // 77: if_icmpge 99
      // 7a: aload 7
      // 7c: iload 9
      // 7e: aaload
      // 7f: astore 10
      // 81: aload 6
      // 83: aload 10
      // 85: invokeinterface org/w3c/dom/Element.isEqualNode (Lorg/w3c/dom/Node;)Z 2
      // 8a: ifeq 93
      // 8d: bipush 1
      // 8e: istore 4
      // 90: goto 99
      // 93: iinc 9 1
      // 96: goto 73
      // 99: goto 9f
      // 9c: bipush 1
      // 9d: istore 4
      // 9f: iload 4
      // a1: ireturn
      // try (2 -> 6): 7 com/l7tech/util/InvalidDocumentFormatException
      // try (23 -> 30): 31 com/l7tech/util/InvalidDocumentFormatException
      // try (25 -> 35): 36 com/l7tech/util/InvalidDocumentFormatException
      // try (33 -> 42): 43 com/l7tech/util/InvalidDocumentFormatException
   }

   private boolean a(Element[] param1, SignedElement[] param2) throws InvalidDocumentFormatException {
      // $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 1
      // 01: ifnull 63
      // 04: aload 1
      // 05: arraylength
      // 06: ifle 18
      // 09: goto 10
      // 0c: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0f: athrow
      // 10: bipush 1
      // 11: goto 19
      // 14: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 17: athrow
      // 18: bipush 0
      // 19: istore 4
      // 1b: aload 1
      // 1c: astore 5
      // 1e: aload 5
      // 20: arraylength
      // 21: istore 6
      // 23: bipush 0
      // 24: istore 7
      // 26: iload 7
      // 28: iload 6
      // 2a: if_icmpge 5d
      // 2d: aload 5
      // 2f: iload 7
      // 31: aaload
      // 32: astore 8
      // 34: aload 8
      // 36: invokestatic com/l7tech/xml/soap/SoapUtil.getElementWsuId (Lorg/w3c/dom/Element;)Ljava/lang/String;
      // 39: astore 9
      // 3b: aload 9
      // 3d: ifnull 51
      // 40: aload 0
      // 41: aload 2
      // 42: aload 9
      // 44: invokevirtual com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a ([Lcom/l7tech/security/token/SignedElement;Ljava/lang/String;)Z
      // 47: ifne 57
      // 4a: goto 51
      // 4d: invokestatic com/l7tech/server/policy/assertion/xmlsec/ServerRequireWssX509Cert.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 50: athrow
      // 51: bipush 0
      // 52: istore 4
      // 54: goto 5d
      // 57: iinc 7 1
      // 5a: goto 26
      // 5d: iload 4
      // 5f: istore 3
      // 60: goto 65
      // 63: bipush 1
      // 64: istore 3
      // 65: iload 3
      // 66: ireturn
      // try (0 -> 5): 6 com/l7tech/util/InvalidDocumentFormatException
      // try (2 -> 10): 10 com/l7tech/util/InvalidDocumentFormatException
      // try (31 -> 38): 39 com/l7tech/util/InvalidDocumentFormatException
   }

   private boolean a(SignedElement[] var1, String var2) throws InvalidDocumentFormatException {
      boolean var3 = false;

      for (SignedElement var7 : var1) {
         Element var8 = var7.asElement();
         if (var8 != null) {
            String var9 = SoapUtil.getElementWsuId(var8);
            if (var2.equals(var9)) {
               var3 = true;
               break;
            }
         }
      }

      return var3;
   }

   static {
      String[] var5 = new String[5];
      int var3 = 0;
      String var2 = "i\u0004\r$\u007fI\u001cH\u0005L%{I_WJ\u001f#pYNU\u001e\u0015fgCWY\u0004\u001f|3B_\u0005\u0001h\u007f\u001bHY\t\u0004h`INJ\u000f\u001ehcCPU\t\u0015hr_OY\u0018\u0018/|B\u0012D\u0007\u00005vO\u0012D_\\\u007f@XNU\t\u0018\u0012|GYR>\u00156voTY\t\u0007\u0015O\u000f\u000f3aEHE>\u0003-vBnY\u0019\u0003*eIN";
      int var4 = "i\u0004\r$\u007fI\u001cH\u0005L%{I_WJ\u001f#pYNU\u001e\u0015fgCWY\u0004\u001f|3B_\u0005\u0001h\u007f\u001bHY\t\u0004h`INJ\u000f\u001ehcCPU\t\u0015hr_OY\u0018\u0018/|B\u0012D\u0007\u00005vO\u0012D_\\\u007f@XNU\t\u0018\u0012|GYR>\u00156voTY\t\u0007\u0015O\u000f\u000f3aEHE>\u0003-vBnY\u0019\u0003*eIN"
         .length();
      char var1 = '!';
      int var7 = -1;

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

         while (true) {
            String var8 = c(var10000, a(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     g = var5;
                     d = ConfigFactory.getBooleanProperty(g[1], true);
                     return;
                  }

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

                  var2 = "p\"$SXehd4$\u000eGe)b?6\u001fDrCb72\u000fZrcU4&\bMdsW#8\u001eMdtn?0\ft4%\u000bMeDh?1\u0014O";
                  var4 = "p\"$SXehd4$\u000eGe)b?6\u001fDrCb72\u000fZrcU4&\bMdsW#8\u001eMdtn?0\ft4%\u000bMeDh?1\u0014O".length();
                  var1 = '-';
                  var7 = -1;
            }

            var10000 = 33;
            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] ^ 38);
      }

      return var10000;
   }

   private static String c(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 -> 38;
            case 1 -> 112;
            case 2 -> 118;
            case 3 -> 92;
            case 4 -> 9;
            case 5 -> 54;
            default -> 38;
         });
      }

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