简体   繁体   中英

Does xmlsec returns a 0 on exit?

我需要知道,如果文件通过了正确的身份验证,那么xmlsec是否返回0?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM