how to add URI=""

525 views
Skip to first unread message

agente_mor

unread,
Jan 25, 2013, 5:52:24 PM1/25/13
to xmlse...@googlegroups.com

Hi,
How can add the statement URI="" shown in the following image?
thanks
mario






Rob Richards

unread,
Jan 26, 2013, 5:39:10 AM1/26/13
to xmlse...@googlegroups.com, agente_mor
When adding the reference, you need to set the force_uri options to true:

$objDSig->addReference($doc, XMLSecurityDSig::SHA1, array('http://www.w3.org/2000/09/xmldsig#enveloped-signature'), array('force_uri' => true));

Rob

agente_mor

unread,
Jan 29, 2013, 12:47:55 PM1/29/13
to xmlse...@googlegroups.com, agente_mor
Hi Rob,
I formed the following instruction, with the force_uri at the end:

$objDSig->addReference($doc, XMLSecurityDSig::SHA1, array('http://www.w3.org/2000/09/xmldsig#enveloped-signature', array('http://www.w3.org/TR/1999/REC-xpath-19991116' => array("query" => "ancestor-or-self::*[local-name()='SolicitudRegistro']"),array("force_uri"=>true))));

and is not working, what can I change to make it work???
thanks
Mario

agente_mor

unread,
Jan 29, 2013, 5:03:49 PM1/29/13
to xmlse...@googlegroups.com, agente_mor

It is giving me this:

string 1 was calculated with my private key (.pem), the string for number 2 was calculated with a certificate (.crt) file.
What does it mean they are the same, I think, string 2 is wrong, doesnt it, what do you think
thanks a lot
mario

agente_mor

unread,
Jan 29, 2013, 6:02:19 PM1/29/13
to xmlse...@googlegroups.com, agente_mor

I checked another message form another gov agency that has succesfully sent the message and it has number 1 and number 2, THE SAME
so only remains the string UID="", following the reference.
How can I include it????

Thanks
Mario

Rob Richards

unread,
Jan 30, 2013, 6:56:52 AM1/30/13
to xmlse...@googlegroups.com, agente_mor
You added the options array as part of the transforms array. It is supposed to be the last parameter passed to the addReference method itself.

Rob
--
You received this message because you are subscribed to the Google Groups "xmlseclibs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmlseclibs+...@googlegroups.com.
To post to this group, send email to xmlse...@googlegroups.com.
Visit this group at http://groups.google.com/group/xmlseclibs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages