2 Replies Latest reply on Mar 28, 2017 8:38 AM by johnaldridge

    Can a User-defined List Variable be Used In Rule Criteria?

    johnaldridge

      I've created a User-defined list variable, and I've figured out how to populate it with a split of a header string.

       

      Problem is, I can't get the interface to let me check it against anything other than a constant--and I want to compare it to a calculated/retrieved string. 

       

      Isn't this possible?  If so, how?  I can't figure out how to get the UI to do this.

       

      The ultimate goal: HTTP PUBLIC KEY PINNING

       

      Regardless of whether my ultimate goal can otherwise be addressed or the task is impossible, I definitely want to know about checking variables against string variables in rule criteria, pretty please.

        • 1. Re: Can a User-defined List Variable be Used In Rule Criteria?
          feickholt

          sure you can find a line in an user-defined list

          I use this in serveral places:

           

          examples

          set user-defined.userindex = list.ofString.Find (user-defined.ListofValues, Valuetofind)

           

          I think in your case you should have look at maptype lists. There you can find a key and get a value which is associated with the key.

          • 2. Re: Can a User-defined List Variable be Used In Rule Criteria?
            johnaldridge

            Thank you.  That wasn't quite it.

             

            I ended up finding that this was confusion in the creepy UI.

             

            Yes, I did find the maptype lists; but they are not what I was looking for.

             

            Yes, I could do the assignment--I had already created the following assignment:

            • Set User-Defined.Header_Public_Key_Pins_items = String.ToStringList (Header.Response.Get ("Public-Key-Pins"), ";", " \t\n\r")

             

            What I wanted to do a "contains" criteria; but at that time, it seemed it would only allow the comparison against a constant.  For some damn reason, I just could not see the "Property" option in the "Compare with" drop-down.

             

            I just couldn't see it the other day, but now it right there:

             

            From there, we now "need to have the SHA2-Digest from the servers public key" as you stated elsewhere.