I need to know, if xmlsec returns 0 if file is well authenticated?
Asked
Active
Viewed 87 times
0
-
What ist the context of your question? What exactly is `xmlsec`? – Nov 03 '09 at 09:29
-
@lutz - Google tells me he means http://www.aleksey.com/xmlsec/index.html. – Dominic Rodger Nov 03 '09 at 09:34
-
Which actual function(s) of xmlsec are you using? – Remy Lebeau Nov 04 '09 at 02:01
1 Answers
1
I doubt that anyone cares at this point, 4.5 years later, but the question exists so it needs an answer, right?
Yes, xmlsec [version 1.2.19 (openssl)] returns 0 if file is authenticated:
Success:
$ xmlsec1 --verify --pubkey-cert-pem valid-cert.pem file.xml
OK
SignedInfo References (ok/all): 1/1
Manifests References (ok/all): 0/0
$ echo $?
0
Fail:
$ xmlsec1 --verify --pubkey-cert-pem invalid-cert.pem file.xml
FAIL
SignedInfo References (ok/all): 1/1
Manifests References (ok/all): 0/0
Error: failed to verify file "file.xml"
$ echo $?
1

savanto
- 4,470
- 23
- 40
-
Haha, cheers! Had to become an expert on xmlsec for another question, and figured I could put my new skills to use. – savanto May 05 '14 at 02:21