Geoff
Geoff

Reputation: 41

How to verify an XML digital signature in Cocoa?

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:

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

Upvotes: 1

Views: 1488

Answers (1)

Geoff
Geoff

Reputation: 41

The solution was to define below:

\#define XMLSEC_NO_SIZE_T

before including any of the xmlsec header files. Otherwise the type xmlSecSize will be defined differently to when the program was built on the Mac and the xmlSecDSigCtx structure will appear corrupted to the library. See xmlsec.h for more details.

Upvotes: 3

Related Questions