On Wed Jul 30 22:11:21 2025 +0000, Mohamad Al-Jaf wrote:
I wasn't sure what the magic field was for in your earlier suggestion, is this the right way to use it? The value is hex for xmldoc but truncated. Casting the handle to `struct xmldoc` doesn't work, it needs to be retrieved using the `CONTAINING_RECORD` function. I also added some more tests for `CryptXmlGetStatus()` and it returns the same status regardless of the handle passed from CRYPT_XML_DOC_CTXT. The tests are a bit redundant, I can remove them if you want. `CryptXmlGetDocContext()` crashes if the handle passed is not the one returned from `CryptXmlOpenToDecode()` so I assume the current code is an implementation and not a stub?
It turns out that signatures are separate objects with their own handles and there are other objects types too. I'm attaching a version of cryptxml.c that should model this more closely. [cryptxml.c](/uploads/288bf801e361068b4c35da7c836146ea/cryptxml.c)