How to verify an XML digital signature in Cocoa?
Posted
by Geoff Smith
on Stack Overflow
See other posts from Stack Overflow
or by Geoff Smith
Published on 2010-05-29T23:45:16Z
Indexed on
2010/05/29
23:52 UTC
Read the original article
Hit count: 430
I have a C# application that uses XML digital signatures to sign license files. I've used the standard Microsoft approach described here.
I'm porting the application to the MAC and need to verify the signature. My general question is how best to do this?
This is what I've done:
I've used macport to install Aleksey's xmlsec1 library.
Used the Chilkat library to convert my XML public key to a PEM file
Chilkat.PublicKey pubKey = new Chilkat.PublicKey(); pubKey.LoadXml(publicKeyXml); pubKey.SaveOpenSslPemFile("publicKey.pem");
Compiled and ran the alekseys sample program. See (http://www.aleksey.com/xmlsec/api/xmlsec-verify-with-key.html) to verify an XML dsig.
Result: my license files fail to validate. The call to xmlSecDSigCtxVerify fails with status=unknown. Now for my specific question: What can I do next?
Geoff
© Stack Overflow or respective owner