Hello,
i am trying to generate a signature looking like this:
<ds:Signature>
<ds:SignedInfo>
...
<ds:Reference URI="#xpointer(//[EMAIL PROTECTED]'true'])">
...
<ds::Reference/>
...
</ds:SignedInfo>
<ds:SignatureValue>JVBERi0xLjMNJeLjz9MNCjE2NT...</ds:SignatureValue>
</AuthSignature>
where the xpointer expression selects all nodes (with subnodes) for
signing where attrib 'authenticate' is 'true'.
>From older postings i learned that i can NOT pass this xpointer
expression to DSIGSignature::createReference() :
sigNode = sig->createBlankSignature(doc,
CANON_C14N_NOC,SIGNATURE_RSA, HASH_SHA1);
parent->appendChild(sigNode);
DSIGReference * ref =
sig->createReference(MAKE_UNICODE_STRING("//[EMAIL PROTECTED]'true']"));
Instead, i found i have to use Xpath Transforms. If i say
ref->appendXPathTransform ("//[EMAIL PROTECTED]'true']");
does that mean that sig->sign() will only see (and sign) what matches
the #xpointer expression ? (I'm not shure because my peer still
says "authentication failed". Maybe use DSIGTransformXPathFilter instead
of DSIGTransformXPath? ). If someone already solved a similar problem i
would be happy to get a hint ...
Thank you in advance,
Volker