Hans Leidekker (@hans) commented about dlls/cryptxml/cryptxml.c:
*ctx = &doc->ctx; return S_OK;
}
+HRESULT WINAPI CryptXmlGetSignature( HCRYPTXML handle, const CRYPT_XML_SIGNATURE **sig ) +{
- CRYPT_XML_SIGNATURE *signature = (CRYPT_XML_SIGNATURE *)handle;
- FIXME( "handle %p, sig %p semi-stub!\n", handle, sig );
- if (!handle || !sig) return E_INVALIDARG;
- if (signature->cbSize != sizeof( CRYPT_XML_SIGNATURE ))
This won't work with a handle returned from CryptXmlOpenToDecode(). You could add a magic field to the top of `struct xmldoc` like I suggested earlier and verify that here. You should at least cast the handle to a `struct xmldoc` pointer and return the signature stored there.