Questions tagged [xmlseclibs]

xmlseclibs is a library written in PHP for working with XML Encryption and Signatures.

xmlseclibs is a library written in PHP for working with XML Encryption and Signatures.

xmlseclibs requires PHP version 5 or greater.

The author of xmlseclibs is Rob Richards.

xmlseclibs is being used in many different software, one of them is simpleSAMLphp.

References:

https://code.google.com/p/xmlseclibs/

20 questions
13
votes
5 answers

How do I convert an XML RSA key to a PEM file?

I have two XML files, structured as follows: My Key ... ...

...

... ... ... ... ...
A…
Philip
  • 3,386
  • 3
  • 22
  • 33
6
votes
1 answer

Proper XML Canonicalization for SAML

I am running into the problem with validating the signature for the SAML 2.0 Assertion XML. I am using the SAML2 library from simpleSAMLphp project, which in turn is using the PHP xmlseclibs library for signing XML and verifying the signatures. I…
obaranovsky
  • 165
  • 7
6
votes
0 answers

Adding WSSE Headers to XML with PHP

I am currently developing a WS client that needs to sign its requests before sending them to the server. I have a private key and a certificate for this purpose but I am struggling with the security header. The expected structure of the output XML…
wtf8_decode
  • 406
  • 5
  • 18
5
votes
2 answers

Verifying windows 8 purchases (receipts) using PHP

I need to verify in-app purchases made in Windows 8 applications server-side using PHP. MSDN's documentation page has an example only in C#. Right now I've spent a whole day by searching for a way to do it in PHP. No success. All over the internet…
Speedy
  • 798
  • 1
  • 8
  • 15
4
votes
1 answer

php - xmlseclibs can't sign the node i want

I've been signing work-related xml for almost a year, and today i noticed that i was doing it wrong (please excuse my bad english, it's not my primary language) I use the xmlseclibs library for php, and i want the signatures to be like…
JSrodC
  • 41
  • 3
4
votes
2 answers

Is there any documentation for xmlseclibs?

I have signed the XML but I don't know how to include KeyValue element in the signature. Having some documentation would save a lot of time. The code below (if you are interested) is what I managed to do with xmlseclibs so…
mikl
  • 853
  • 16
  • 29
3
votes
0 answers

XML signature with smlseclibs returning invalid data:data and digest do not match

I'm trying to submit a signed XML document (with xmlseclibs), but the signature is turning itself to be wrong. The code I'm using looks like this: // input variables: $tout = __DIR__ . "/" . $firmacert2; $certBuffer =…
2
votes
1 answer

How to sign a complex XML document?

I am new in this world of XML and electronic signatures. I'm trying to sign an XML document with the xmlseclibs library. Perhaps someone has come across this methodology when signing much more complex documents. In my XML document I have this label…
jecorrales
  • 259
  • 3
  • 16
2
votes
1 answer

fatal error: xmlsec/xmlsec.h: No such file or directory

I have a makefile as follows: CC=gcc CFLAGS= -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_XSLT=1 -DXMLSEC_NO_XKMS=1 -I/usr/include/libxml2 -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO=\"openssl\" -DUNIX_SOCKETS -DXML_SECURITY…
Ashish K
  • 850
  • 9
  • 26
2
votes
2 answers

XML signature differences between HEREDOC and DOMDocument

An API client I have developed works with XML messages and the messages are signed according to the XML Signature Syntax and Processing specification. After a long struggle, I finally got the signatures working. At this moment I am building the XML…
Jurian Sluiman
  • 13,328
  • 3
  • 63
  • 95
2
votes
2 answers

DSA signature check in SAML 2.0 with PHP

I've checked SO and googled around, but haven't found answers so far. I am using SAML 2.0 as a service provider, and embedded php-saml - used simplesamlphp first, but found a bit tough to embed. The IdP-s response comes back with a…
Zsolt
  • 67
  • 7
2
votes
1 answer

Sign XML with key and cert

I want to sign my xml files so that the persons I give them to can be certain that they are not tampered with and that I guarantee that these are XML files from me. Im using xmlseclib (php which seems to work). I have som questions I hope you could…
user727507
  • 255
  • 1
  • 2
  • 10
1
vote
1 answer

How to send SOAP digital signed message using cert

I want to sign an XML document using certificate. It should looks like:
sir_MysH
  • 11
  • 2
1
vote
1 answer

XML Signature DigestValue is invalid

I am trying to sign XML file with PHP and xmlseclibs. However all validation tools say that my signature is invalid. XMLSpy says: "The calculated digest value doesn't match the digest of reference" This is my XML: x This…
Robert Zrinski
  • 124
  • 1
  • 7
1
vote
1 answer

PHP Signing SAML Document

I'm working on a project and have basically reached a point where I don't know what to do to get much farther. Trying to work with a vendor to setup an SSO process using SAML. We are, at this time, doing this process by hand because we don't have a…
1
2