How to sign an XML document or confirm the signing of an XML document using C ++?

Subj. I need to sign / verify under Windows in my native C ++ (without .NET), using the private key for signing, the public key for checking.

I saw several examples on MSDN ( http://msdn.microsoft.com/en-us/library/ms761363(VS.85).aspx ) that demonstrate how to sign a document with CSP (I don't know what that means) .

In my case, I need to use a β€œkey” from a binary data array (using the DSA encryption algorithm) ... can anyone help me with this?

Thanks in advance.

+4
source share
3 answers

I recommend libxml2 and xmlsec which are ideal for this purpose.

The API may seem difficult to read at first, but it works well. xmlsec uses OpenSSL to achieve the cryptographic part.

Providing a β€œshort” example here is probably difficult because the three libraries require some initialization and many C calls.

+3
source

Google keyczar lib is also very easy to use.

+2
source

There is also Crypto ++

0
source

Source: https://habr.com/ru/post/1309811/


All Articles