[xmlsec] Signing with RAM key/How to create a RSA key pair?

Aleksey Sanin aleksey at aleksey.com
Thu Aug 16 07:58:22 PDT 2007


> 1. How can I read RSA keys from the RAM? Beside xmlSecCryptoAppKeyLoad() I have found no function to do that.

Check xmlSecCryptoAppKeyLoadMemory() function.


> 2. How to create a pair of RSA keys?

This is a crypto library specific operation. Use native crypto-library
calls, don;t use xmlsec wrappers.

> 3. What should I put into the last param of xmlSecKeyGenerateByName()?

Don't use xmlsec API for this. It was designed *only* for internal
testing.

> PS: In the sign1.c examle is a BAD_CAST missing: In function sign_file()
>> if(xmlSecKeySetName(dsigCtx->signKey, key_file) < 0) { // Param key_file needs a BAD_CAST.

Thanks!

Aleksey



More information about the xmlsec mailing list