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

import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.gateway.common.audit.AuditHaver;
import com.l7tech.message.Message;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.policy.assertion.xmlsec.WssDecorationConfig;
import com.l7tech.security.xml.SignerInfo;
import com.l7tech.security.xml.decorator.DecorationRequirements;
import com.l7tech.server.message.AuthenticationContext;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.assertion.ServerAssertionUtils;
import java.io.IOException;
import java.security.KeyStoreException;
import org.springframework.beans.factory.BeanFactory;
import org.w3c.dom.Document;

public class AddWssSignatureSupport implements AuditHaver {
   private final AuditHaver a;
   private final SignerInfo b;
   private final boolean c;
   private final WssDecorationConfig d;
   private final boolean e;
   private boolean f;
   private static final String[] g;

   public AddWssSignatureSupport(AuditHaver var1, WssDecorationConfig var2, BeanFactory var3, boolean var4, boolean var5) {
      this.a = var1;
      this.d = var2;
      this.e = var4;
      this.f = var5;

      try {
         this.b = ServerAssertionUtils.getSignerInfo(var3, var2);
         this.c = ServerAssertionUtils.isPreferredSigner(var2);
      } catch (KeyStoreException var7) {
         throw new RuntimeException(var7.getMessage(), var7);
      }
   }

   public Audit getAuditor() {
      return this.a.getAuditor();
   }

   public SignerInfo getSignerInfo() {
      return this.b;
   }

   public AssertionStatus applySignatureDecorationRequirements(
      PolicyEnforcementContext param1, Message param2, String param3, AuthenticationContext param4, AddWssSignatureSupport.SignedElementSelector param5
   ) 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 0
      // 001: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a Lcom/l7tech/gateway/common/audit/AuditHaver;
      // 004: invokeinterface com/l7tech/gateway/common/audit/AuditHaver.getAuditor ()Lcom/l7tech/gateway/common/audit/Audit; 1
      // 009: astore 6
      // 00b: aconst_null
      // 00c: astore 7
      // 00e: aload 0
      // 00f: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.f Z
      // 012: ifeq 040
      // 015: aload 1
      // 016: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 01b: invokevirtual com/l7tech/message/Message.isSoap ()Z
      // 01e: ifeq 031
      // 021: aload 1
      // 022: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 027: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 02a: invokeinterface com/l7tech/message/SecurityKnob.getProcessorResult ()Lcom/l7tech/security/xml/processor/ProcessorResult; 1
      // 02f: astore 7
      // 031: goto 040
      // 034: astore 8
      // 036: new com/l7tech/util/CausedIOException
      // 039: dup
      // 03a: aload 8
      // 03c: invokespecial com/l7tech/util/CausedIOException.<init> (Ljava/lang/Throwable;)V
      // 03f: athrow
      // 040: aload 0
      // 041: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.d Lcom/l7tech/policy/assertion/xmlsec/WssDecorationConfig;
      // 044: invokeinterface com/l7tech/policy/assertion/xmlsec/WssDecorationConfig.getRecipientContext ()Lcom/l7tech/policy/assertion/xmlsec/XmlSecurityRecipientContext; 1
      // 049: astore 8
      // 04b: aload 2
      // 04c: invokevirtual com/l7tech/message/Message.isSoap ()Z
      // 04f: ifne 06c
      // 052: aload 6
      // 054: getstatic com/l7tech/gateway/common/audit/AssertionMessages.ADD_WSS_SIGNATURE_MESSAGE_NOT_SOAP Lcom/l7tech/gateway/common/audit/Messages$M;
      // 057: bipush 1
      // 058: anewarray 355
      // 05b: dup
      // 05c: bipush 0
      // 05d: aload 3
      // 05e: aastore
      // 05f: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V 3
      // 064: getstatic com/l7tech/policy/assertion/AssertionStatus.NOT_APPLICABLE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 067: areturn
      // 068: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 06b: athrow
      // 06c: goto 07b
      // 06f: astore 9
      // 071: new com/l7tech/util/CausedIOException
      // 074: dup
      // 075: aload 9
      // 077: invokespecial com/l7tech/util/CausedIOException.<init> (Ljava/lang/Throwable;)V
      // 07a: athrow
      // 07b: aload 2
      // 07c: invokevirtual com/l7tech/message/Message.getXmlKnob ()Lcom/l7tech/message/XmlKnob;
      // 07f: astore 10
      // 081: aload 2
      // 082: invokevirtual com/l7tech/message/Message.getSecurityKnob ()Lcom/l7tech/message/SecurityKnob;
      // 085: astore 11
      // 087: aload 10
      // 089: invokeinterface com/l7tech/message/XmlKnob.getDocumentReadOnly ()Lorg/w3c/dom/Document; 1
      // 08e: astore 9
      // 090: goto 0c4
      // 093: astore 12
      // 095: aload 3
      // 096: getstatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.g [Ljava/lang/String;
      // 099: astore 23
      // 09b: aload 23
      // 09d: bipush 2
      // 09e: aaload
      // 09f: swap
      // 0a0: aload 23
      // 0a2: bipush 0
      // 0a3: aaload
      // 0a4: 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" ]
      // 0a9: astore 13
      // 0ab: aload 6
      // 0ad: getstatic com/l7tech/gateway/common/audit/AssertionMessages.EXCEPTION_SEVERE_WITH_MORE_INFO Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0b0: bipush 1
      // 0b1: anewarray 355
      // 0b4: dup
      // 0b5: bipush 0
      // 0b6: aload 13
      // 0b8: aastore
      // 0b9: aload 12
      // 0bb: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V 4
      // 0c0: getstatic com/l7tech/policy/assertion/AssertionStatus.SERVER_ERROR Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0c3: areturn
      // 0c4: aload 11
      // 0c6: aload 8
      // 0c8: invokeinterface com/l7tech/message/SecurityKnob.getAlternateDecorationRequirements (Lcom/l7tech/policy/assertion/xmlsec/XmlSecurityRecipientContext;)Lcom/l7tech/security/xml/decorator/DecorationRequirements; 2
      // 0cd: astore 12
      // 0cf: aload 5
      // 0d1: aload 1
      // 0d2: aload 4
      // 0d4: aload 9
      // 0d6: aload 12
      // 0d8: aload 2
      // 0d9: invokeinterface com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport$SignedElementSelector.selectElementsToSign (Lcom/l7tech/server/message/PolicyEnforcementContext;Lcom/l7tech/server/message/AuthenticationContext;Lorg/w3c/dom/Document;Lcom/l7tech/security/xml/decorator/DecorationRequirements;Lcom/l7tech/message/Message;)I 6
      // 0de: istore 13
      // 0e0: iload 13
      // 0e2: ifge 0ed
      // 0e5: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0e8: areturn
      // 0e9: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0ec: athrow
      // 0ed: iload 13
      // 0ef: ifne 11e
      // 0f2: aload 0
      // 0f3: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.e Z
      // 0f6: ifeq 11a
      // 0f9: goto 100
      // 0fc: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0ff: athrow
      // 100: aload 6
      // 102: getstatic com/l7tech/gateway/common/audit/AssertionMessages.ADD_WSS_SIGNATURE_MESSAGE_NO_MATCHING_EL Lcom/l7tech/gateway/common/audit/Messages$M;
      // 105: bipush 1
      // 106: anewarray 355
      // 109: dup
      // 10a: bipush 0
      // 10b: aload 3
      // 10c: aastore
      // 10d: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V 3
      // 112: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 115: areturn
      // 116: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 119: athrow
      // 11a: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 11d: areturn
      // 11e: aload 7
      // 120: ifnull 20b
      // 123: aload 1
      // 124: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.isResponseWss11 ()Z 1
      // 129: ifeq 20b
      // 12c: goto 133
      // 12f: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 132: athrow
      // 133: aload 12
      // 135: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.getEncryptedKeyReferenceInfo ()Lcom/l7tech/security/xml/KeyInfoDetails;
      // 138: ifnull 151
      // 13b: goto 142
      // 13e: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 141: athrow
      // 142: aload 12
      // 144: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.getEncryptedKey ()[B
      // 147: ifnonnull 20b
      // 14a: goto 151
      // 14d: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 150: athrow
      // 151: aload 1
      // 152: aload 1
      // 153: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 158: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getAuthenticationContext (Lcom/l7tech/message/Message;)Lcom/l7tech/server/message/AuthenticationContext; 2
      // 15d: invokevirtual com/l7tech/server/message/AuthenticationContext.getCredentials ()Ljava/util/List;
      // 160: invokeinterface java/util/List.iterator ()Ljava/util/Iterator; 1
      // 165: astore 14
      // 167: aload 14
      // 169: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 16e: ifeq 20b
      // 171: aload 14
      // 173: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 178: checkcast com/l7tech/policy/assertion/credential/LoginCredentials
      // 17b: astore 15
      // 17d: aload 15
      // 17f: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.getSecurityTokens ()[Lcom/l7tech/security/token/SecurityToken;
      // 182: astore 16
      // 184: aload 16
      // 186: astore 17
      // 188: aload 17
      // 18a: arraylength
      // 18b: istore 18
      // 18d: bipush 0
      // 18e: istore 19
      // 190: iload 19
      // 192: iload 18
      // 194: if_icmpge 208
      // 197: aload 17
      // 199: iload 19
      // 19b: aaload
      // 19c: astore 20
      // 19e: aload 20
      // 1a0: instanceof com/l7tech/security/token/EncryptedKey
      // 1a3: ifeq 202
      // 1a6: aload 15
      // 1a8: aload 20
      // 1aa: invokevirtual com/l7tech/policy/assertion/credential/LoginCredentials.isSecurityTokenPresent (Lcom/l7tech/security/token/SecurityToken;)Z
      // 1ad: ifeq 202
      // 1b0: goto 1b7
      // 1b3: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1b6: athrow
      // 1b7: aload 20
      // 1b9: checkcast com/l7tech/security/token/EncryptedKey
      // 1bc: astore 21
      // 1be: aload 21
      // 1c0: invokeinterface com/l7tech/security/token/EncryptedKey.isUnwrapped ()Z 1
      // 1c5: ifeq 202
      // 1c8: aload 12
      // 1ca: aload 21
      // 1cc: invokeinterface com/l7tech/security/token/EncryptedKey.getSecretKey ()[B 1
      // 1d1: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setEncryptedKey ([B)V
      // 1d4: aload 12
      // 1d6: aload 21
      // 1d8: invokeinterface com/l7tech/security/token/EncryptedKey.getEncryptedKeySHA1 ()Ljava/lang/String; 1
      // 1dd: invokestatic com/l7tech/security/xml/KeyInfoDetails.makeEncryptedKeySha1Ref (Ljava/lang/String;)Lcom/l7tech/security/xml/KeyInfoDetails;
      // 1e0: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setEncryptedKeyReferenceInfo (Lcom/l7tech/security/xml/KeyInfoDetails;)V
      // 1e3: goto 208
      // 1e6: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1e9: athrow
      // 1ea: astore 22
      // 1ec: new java/lang/IllegalStateException
      // 1ef: dup
      // 1f0: aload 22
      // 1f2: invokespecial java/lang/IllegalStateException.<init> (Ljava/lang/Throwable;)V
      // 1f5: athrow
      // 1f6: astore 22
      // 1f8: new java/lang/IllegalStateException
      // 1fb: dup
      // 1fc: aload 22
      // 1fe: invokespecial java/lang/IllegalStateException.<init> (Ljava/lang/Throwable;)V
      // 201: athrow
      // 202: iinc 19 1
      // 205: goto 190
      // 208: goto 167
      // 20b: aload 0
      // 20c: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.c Z
      // 20f: ifeq 24d
      // 212: aload 12
      // 214: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.getPreferredSigningTokenType ()Lcom/l7tech/security/xml/decorator/DecorationRequirements$PreferredSigningTokenType;
      // 217: ifnonnull 230
      // 21a: goto 221
      // 21d: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 220: athrow
      // 221: aload 12
      // 223: getstatic com/l7tech/security/xml/decorator/DecorationRequirements$PreferredSigningTokenType.X509 Lcom/l7tech/security/xml/decorator/DecorationRequirements$PreferredSigningTokenType;
      // 226: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setPreferredSigningTokenType (Lcom/l7tech/security/xml/decorator/DecorationRequirements$PreferredSigningTokenType;)V
      // 229: goto 230
      // 22c: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 22f: athrow
      // 230: aload 12
      // 232: aload 0
      // 233: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.b Lcom/l7tech/security/xml/SignerInfo;
      // 236: invokevirtual com/l7tech/security/xml/SignerInfo.getCertificateChain ()[Ljava/security/cert/X509Certificate;
      // 239: bipush 0
      // 23a: aaload
      // 23b: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setSenderMessageSigningCertificate (Ljava/security/cert/X509Certificate;)V
      // 23e: aload 12
      // 240: aload 0
      // 241: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.b Lcom/l7tech/security/xml/SignerInfo;
      // 244: invokevirtual com/l7tech/security/xml/SignerInfo.getPrivate ()Ljava/security/PrivateKey;
      // 247: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setSenderMessageSigningPrivateKey (Ljava/security/PrivateKey;)V
      // 24a: goto 294
      // 24d: aload 12
      // 24f: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.getEncryptedKeyReferenceInfo ()Lcom/l7tech/security/xml/KeyInfoDetails;
      // 252: ifnull 264
      // 255: aload 12
      // 257: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.getEncryptedKey ()[B
      // 25a: ifnonnull 294
      // 25d: goto 264
      // 260: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 263: athrow
      // 264: aload 12
      // 266: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.getKerberosTicket ()Lcom/l7tech/kerberos/KerberosServiceTicket;
      // 269: ifnonnull 294
      // 26c: goto 273
      // 26f: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 272: athrow
      // 273: aload 12
      // 275: aload 0
      // 276: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.b Lcom/l7tech/security/xml/SignerInfo;
      // 279: invokevirtual com/l7tech/security/xml/SignerInfo.getCertificateChain ()[Ljava/security/cert/X509Certificate;
      // 27c: bipush 0
      // 27d: aaload
      // 27e: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setSenderMessageSigningCertificate (Ljava/security/cert/X509Certificate;)V
      // 281: aload 12
      // 283: aload 0
      // 284: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.b Lcom/l7tech/security/xml/SignerInfo;
      // 287: invokevirtual com/l7tech/security/xml/SignerInfo.getPrivate ()Ljava/security/PrivateKey;
      // 28a: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setSenderMessageSigningPrivateKey (Ljava/security/PrivateKey;)V
      // 28d: goto 294
      // 290: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 293: athrow
      // 294: goto 2c7
      // 297: astore 14
      // 299: aload 14
      // 29b: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 29e: getstatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.g [Ljava/lang/String;
      // 2a1: bipush 1
      // 2a2: aaload
      // 2a3: swap
      // 2a4: 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" ]
      // 2a9: astore 15
      // 2ab: aload 6
      // 2ad: getstatic com/l7tech/gateway/common/audit/AssertionMessages.EXCEPTION_SEVERE_WITH_MORE_INFO Lcom/l7tech/gateway/common/audit/Messages$M;
      // 2b0: bipush 1
      // 2b1: anewarray 355
      // 2b4: dup
      // 2b5: bipush 0
      // 2b6: aload 15
      // 2b8: aastore
      // 2b9: aload 14
      // 2bb: invokestatic com/l7tech/util/ExceptionUtils.getDebugException (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 2be: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V 4
      // 2c3: getstatic com/l7tech/policy/assertion/AssertionStatus.SERVER_ERROR Lcom/l7tech/policy/assertion/AssertionStatus;
      // 2c6: areturn
      // 2c7: aload 0
      // 2c8: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.d Lcom/l7tech/policy/assertion/xmlsec/WssDecorationConfig;
      // 2cb: invokeinterface com/l7tech/policy/assertion/xmlsec/WssDecorationConfig.getKeyReference ()Ljava/lang/String; 1
      // 2d0: astore 14
      // 2d2: aload 0
      // 2d3: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.d Lcom/l7tech/policy/assertion/xmlsec/WssDecorationConfig;
      // 2d6: invokeinterface com/l7tech/policy/assertion/xmlsec/WssDecorationConfig.isUsingProtectTokens ()Z 1
      // 2db: ifeq 2f3
      // 2de: aload 12
      // 2e0: aload 0
      // 2e1: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.d Lcom/l7tech/policy/assertion/xmlsec/WssDecorationConfig;
      // 2e4: invokeinterface com/l7tech/policy/assertion/xmlsec/WssDecorationConfig.isProtectTokens ()Z 1
      // 2e9: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setProtectTokens (Z)V
      // 2ec: goto 2f3
      // 2ef: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 2f2: athrow
      // 2f3: aload 14
      // 2f5: ifnull 30d
      // 2f8: getstatic com/l7tech/security/xml/KeyReference.BST Lcom/l7tech/security/xml/KeyReference;
      // 2fb: invokevirtual com/l7tech/security/xml/KeyReference.getName ()Ljava/lang/String;
      // 2fe: aload 14
      // 300: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 303: ifeq 31c
      // 306: goto 30d
      // 309: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 30c: athrow
      // 30d: aload 12
      // 30f: getstatic com/l7tech/security/xml/KeyInfoInclusionType.CERT Lcom/l7tech/security/xml/KeyInfoInclusionType;
      // 312: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setKeyInfoInclusionType (Lcom/l7tech/security/xml/KeyInfoInclusionType;)V
      // 315: goto 356
      // 318: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 31b: athrow
      // 31c: getstatic com/l7tech/security/xml/KeyReference.SKI Lcom/l7tech/security/xml/KeyReference;
      // 31f: invokevirtual com/l7tech/security/xml/KeyReference.getName ()Ljava/lang/String;
      // 322: aload 14
      // 324: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 327: ifeq 339
      // 32a: aload 12
      // 32c: getstatic com/l7tech/security/xml/KeyInfoInclusionType.STR_SKI Lcom/l7tech/security/xml/KeyInfoInclusionType;
      // 32f: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setKeyInfoInclusionType (Lcom/l7tech/security/xml/KeyInfoInclusionType;)V
      // 332: goto 356
      // 335: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 338: athrow
      // 339: getstatic com/l7tech/security/xml/KeyReference.ISSUER_SERIAL Lcom/l7tech/security/xml/KeyReference;
      // 33c: invokevirtual com/l7tech/security/xml/KeyReference.getName ()Ljava/lang/String;
      // 33f: aload 14
      // 341: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 344: ifeq 356
      // 347: aload 12
      // 349: getstatic com/l7tech/security/xml/KeyInfoInclusionType.ISSUER_SERIAL Lcom/l7tech/security/xml/KeyInfoInclusionType;
      // 34c: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setKeyInfoInclusionType (Lcom/l7tech/security/xml/KeyInfoInclusionType;)V
      // 34f: goto 356
      // 352: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 355: athrow
      // 356: aload 0
      // 357: getfield com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.d Lcom/l7tech/policy/assertion/xmlsec/WssDecorationConfig;
      // 35a: invokeinterface com/l7tech/policy/assertion/xmlsec/WssDecorationConfig.getDigestAlgorithmName ()Ljava/lang/String; 1
      // 35f: astore 15
      // 361: aload 15
      // 363: ifnull 374
      // 366: aload 12
      // 368: aload 15
      // 36a: invokevirtual com/l7tech/security/xml/decorator/DecorationRequirements.setSignatureMessageDigest (Ljava/lang/String;)V
      // 36d: goto 374
      // 370: invokestatic com/l7tech/server/policy/assertion/xmlsec/AddWssSignatureSupport.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 373: athrow
      // 374: aload 6
      // 376: getstatic com/l7tech/gateway/common/audit/AssertionMessages.ADD_WSS_SIGNATURE_MESSAGE_SIGNED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 379: bipush 2
      // 37a: anewarray 355
      // 37d: dup
      // 37e: bipush 0
      // 37f: aload 3
      // 380: aastore
      // 381: dup
      // 382: bipush 1
      // 383: iload 13
      // 385: invokestatic java/lang/String.valueOf (I)Ljava/lang/String;
      // 388: aastore
      // 389: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V 3
      // 38e: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 391: areturn
      // try (9 -> 18): 19 org/xml/sax/SAXException
      // try (29 -> 42): 46 org/xml/sax/SAXException
      // try (29 -> 43): 43 com/l7tech/util/InvalidDocumentFormatException
      // try (52 -> 61): 62 org/xml/sax/SAXException
      // try (179 -> 186): 187 org/xml/sax/SAXException
      // try (136 -> 145): 146 org/xml/sax/SAXException
      // try (130 -> 139): 140 org/xml/sax/SAXException
      // try (128 -> 133): 134 org/xml/sax/SAXException
      // try (107 -> 124): 124 org/xml/sax/SAXException
      // try (105 -> 110): 111 org/xml/sax/SAXException
      // try (99 -> 103): 103 org/xml/sax/SAXException
      // try (195 -> 204): 207 com/l7tech/util/InvalidDocumentFormatException
      // try (195 -> 204): 213 java/security/GeneralSecurityException
      // try (259 -> 277): 278 org/xml/sax/SAXException
      // try (253 -> 262): 263 org/xml/sax/SAXException
      // try (250 -> 256): 257 org/xml/sax/SAXException
      // try (225 -> 234): 235 org/xml/sax/SAXException
      // try (222 -> 228): 229 org/xml/sax/SAXException
      // try (192 -> 205): 205 org/xml/sax/SAXException
      // try (222 -> 280): 281 java/security/UnrecoverableKeyException
      // try (307 -> 316): 317 org/xml/sax/SAXException
      // try (319 -> 326): 327 org/xml/sax/SAXException
      // try (321 -> 333): 333 org/xml/sax/SAXException
      // try (335 -> 344): 344 org/xml/sax/SAXException
      // try (346 -> 354): 355 org/xml/sax/SAXException
      // try (361 -> 366): 367 org/xml/sax/SAXException
   }

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

   static {
      String[] var5 = new String[3];
      int var3 = 0;
      String var2 = "Ds\u0006\u0006\f(\u001f\n)1i\bD\u0013$X\u0010hIG\u001c\"\u001d\u0017tIE\u0010/\u001e\r`\u001cT\u001a%X\u0014u\u0000P\u001e5\u001dDl\f_Ea$\u0007f\u0007H\u00105X\u0003b\u001d\u0006\u001e/X\u001cj\u0005\u0006\u001b.\u001b\u0011j\fH\u000ba\u001e\u0016h\u0004\u0006\u000b)\u001dD";
      int var4 = "Ds\u0006\u0006\f(\u001f\n)1i\bD\u0013$X\u0010hIG\u001c\"\u001d\u0017tIE\u0010/\u001e\r`\u001cT\u001a%X\u0014u\u0000P\u001e5\u001dDl\f_Ea$\u0007f\u0007H\u00105X\u0003b\u001d\u0006\u001e/X\u001cj\u0005\u0006\u001b.\u001b\u0011j\fH\u000ba\u001e\u0016h\u0004\u0006\u000b)\u001dD"
         .length();
      char var1 = '\b';
      int var0 = -1;

      while (true) {
         String var10002 = a(86, a(var2.substring(++var0, var0 + var1)));
         byte var10001 = -1;
         var5[var3++] = var10002;
         if ((var0 += var1) >= var4) {
            g = var5;
            return;
         }

         var1 = var2.charAt(var0);
      }
   }

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

      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 -> 50;
            case 1 -> 81;
            case 2 -> 63;
            case 3 -> 112;
            case 4 -> 41;
            case 5 -> 23;
            default -> 46;
         });
      }

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

   public interface SignedElementSelector {
      int selectElementsToSign(PolicyEnforcementContext var1, AuthenticationContext var2, Document var3, DecorationRequirements var4, Message var5) throws PolicyAssertionException;
   }
}
