What data contained in this message, specifically, is used to verify the signature in this message assuming I have the correct public key? - sha256

I'm trying to validate this message using a public key that I know is good. If I had the code in php or c++, that would be perfect. Ideally, I just need to know the data that is being used from the message.
Below is the sample message.
-----BEGIN TR34_Sample_CA_KRD.p7b-----
MIIDcQYJKoZIhvcNAQcCoIIDYjCCA14CAQExADAPBgkqhkiG9w0BBwGgAgQAoIID
QjCCAz4wggImoAMCAQICBTQAAAAGMA0GCSqGSIb3DQEBCwUAMD8xCzAJBgNVBAYT
AlVTMRUwEwYDVQQKEwxUUjM0IFNhbXBsZXMxGTAXBgNVBAMTEFRSMzQgU2FtcGxl
IFJvb3QwHhcNMTAxMTAyMDAwMDAwWhcNMjUxMDI4MjM1OTU5WjBBMQswCQYDVQQG
EwJVUzEVMBMGA1UEChMMVFIzNCBTYW1wbGVzMRswGQYDVQQDExJUUjM0IFNhbXBs
ZSBDQSBLUkQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQD79+R/P7Ox
9NQVfsmKX8WFTDQpX8a4h29AWw437Z0+WkzplhwTpEcw5OiXqpJ2vSAw80UjuplX
8FZ7oFOpNOyVkj6zkF764ZygA5F4ycHwhGg+JScKc1YW5LoUpV38k7+shAh6Irwp
BxgwM0i+F6LGAVlF/ZoUcF18Q7qUgNdiP7tGjSS2EgRm+fCH49eJuCopHOF4uciv
4wGEp8uHaWIPTsxtIStFOPRumheKssvnrK7PHZEWTtDvWTNARH54UP99eT3EhRKI
TiDgneqACQljhHY1vtPpIXTfqYI4QdDviRLcInujDGgTM2hG2UEkjcDU8OLSWWWC
WO0aAhhHKeLbAgMBAAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFBI4
bs+2pm7a2/8Jb2W71bBQ+cwNMAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQsFAAOC
AQEAayNCRdcgDRQYHWB6xs5zWNl10j2jA/IfVLjeuvemiMtc5QUiMkrdktC4EzF6
vZYa1B0QdXY5qMjWGF3MyN8GPgtdSQayH65BFhyRN1MaicsRmPch5VekqnqijJ6G
mYPwbGlDE0ygJTkoaDreEzZOv8Ikqn4dvCC9h5Fu778A2iAvD0bebvxheOONLJrD
b8mLffrBQLI5YprFYeKE9W0JrhqHjukAfhBZl8XXTRrH+XA8eCskJRjxczCbuboA
qHekeCL8hZ4ePWFfVdEKDFmIRz+lhIZnNj+upKdhKVZasHmNft4aGLpUtgApbM42
MyKEQH/1tzSYfWJcMh5AAE9l4TEA
-----END TR34_Sample_CA_KRD.p7b-----

Answered my own question. Basically, it's the sequence tag and all the data under the sequence tag that's at the same level as the sequence tag containing the signature. Do not include the tags or data above it. Do not include the signature or the sequence tag of the signature.
ASN.1 DECODED DATA

Related

Mockoon | Configure mockoon with a seed to always return the same random data between requests

Although I am using faker to generate random data I would like the responses of a given endpoint to be the same on every request.
I noticed the general settings have an input text for setting a seed but does nothing regarding what I am aiming at.
Faker.js seeding is not always generating the same information.
Instead, it will always generate the same sequence. I'm not sure it's documented on Faker.js' website, but I added this to Mockoon's documentation.
If you want the answer to always be the same you can either:
use the inline body with "static" data (without templating), something like:
{
"username": "john"
}
use the data buckets feature as they are only generated once when the server starts.

Referencing input value by name in HTMX

I've started looking into using HTMX recently and I've ran accross a problem that I can't figure out. Essentially I have a select element which I use to make an http POST whenever the user makes a selection. In order to make that post however, I need to provide a token which is stored in the input about the select. Is there a way for me to reference in HTMX syntax the input from above using it's name "csrfmiddlewaretoken"?
So I figured out what my trouble was. In order for me to expand the payload of the hx-post request, what I needed to do was include the HTML elements that I wanted the contents of in the hx-post request. To do that you can use the hx-include attribute on the request emiting element, which references other elements by name and takes their value in the payload as a {name: value} pair.
<select name="sample_select" hx-post="link" hx-include="[name='csrfmiddlewaretoken']" hx-trigger="changed">...
The example select above would issue an HTTP Post request when the value of the select element would be changed. The request payload would then be
{
sample_select: selected_value;
csrfmiddlewaretoken: value
}
Keep in mind that if you have multiple elements on the same page with the same name, when you reference the name in the hx-include attribute then the HTMX library will take all the values from all the elements in the payload. I have not found a way to reference a specific element, or the closest one yet but if you know of a way please share.

Is it possible to call a URL in a Splunk dashboard and get the response as a string?

I have a Splunk dashboard where you have a table with selected encoded identifiers.
You can click on a row and select an identifier as a token which fills additional fields with data. Now on the intranet of my company we have a url where you can enter the encoded identifier and get back the decoded data in a GET request.
Right now I have a single-value field which displays the encoded identifier and when you click on it it makes a call to the decoder and opens the decoded result in a new tab. That's a standard Splunk link.
Is it possible to make Splunk call the URL automatically (do a GET request) when the identifier is selected (the token is set) and retrieve the response data as a string and extract (using regex) and display the decoded data automatically in the single value field?
If not, is it at least possible for Splunk to get the response data as a string instead of opening the result in a new tab when you click on the encoded identifier?
If I understand you correctly, you want to have the drilldown target be an external link.
If that is correct, just put the external URL in the drilldown:
If you want some value from an external link to be pulled-into Splunk, then you'll need to setup another mechanism.
For example, you might have a scripted input that will query an external endpoint, and add results to an index or lookup table.
Or you might utilize a REST endpoint app to achieve something similar.

vb.net - xmlserializer deserialize omitting first part of text that contains tags

I have xml that looks like
<AddResponse xmlns="http://www.test.com/webservices">
<ServerName>51</ServerName>
<Response Type="ERROR">
<ErrorDesc Type="VALIDATE" Number="215">We are sorry, that number is already in use. If it is your mobile number, we need to verify it with you. Please complete the one time verification by submitting your request at Contact Us using the keyword MYMOBILE</ErrorDesc>
</Response>
<ExternalInfo>
<![CDATA[?]]>
</ExternalInfo>
</AddResponse>
But when this is deserialized, it is returning just "using the keyword MYMOBILE" as ErrorDesc instead of the whole
We are sorry, that number is already in use. If it is your mobile number, we need to verify it with you. Please complete the one time verification by submitting your request at Contact Us using the keyword MYMOBILE
Can you please let me know why its omitting the first part and how to retain it?
Note: this works fine for rest of xml data that doesn't have html tags in it.

jmeter - multiple token extractions

In application I'm testing the authenticity token is changed after user logs in - so I have to extract the token twice (once while login in, second after login). I use the Regular Expression Extractor.
At first time (during login) it works fine.
At second time (after login) it does not extract the new token - subsequent POST is sending given Reference Name (from Regular Expression Extractor) instead of extracted token.
I use different reference names in both extractors. Both pages have the same source and the tokens are defined in the same way:
<meta content="authenticity_token" name="csrf-param" />
<meta content="g/bsiegqqexUreoJdRbogKSpw6ZJ7O86fEUPESolrpc=" name="csrf token" />
So I use the same regular expression in both cases:
name="authenticity_token".*value="(.+)"
But, as I said, it works only for the first token.
Any help appreciated and thanks in advance
Simply don't use regular expressions to parse HTML. Any slight markup change in response, line break, whitespace, attributes order change, etc. and you get nothing.
You have two pretty PostProcessors designed for working with HTML response types:
CSS/JQuery Extractor
Relevant configuration will look like:
CSS/JQuery Expression: meta[name=csrf token]
Attribute Name: content
XPath Extractor
XPath Query will look something like://meta[#name='csrf token']/#content
If your response is not XHTML-compliant you may need to tick Use Tidy (tolerant parser) box