[xmlsec] How load RSA key from RAM?

Aleksey Sanin aleksey at aleksey.com
Fri Aug 17 09:43:01 PDT 2007

Don't do base64 decoding... Send the content of the pem file "as-is"


Martin Salo wrote:
> I have tried it with a base64 key and a binary key format, but it dont work:
> xmlSecKey *oKey = xmlSecCryptoAppKeyLoadMemory(cBuffer, cBufferLen, xmlSecKeyDataFormatPem, 0, 0, 0);
> In both cases I get this error:
> func=xmlSecOpenSSLAppKeyLoadBIO:file=..\src\openssl\app.c:line=244:obj=unknown:
> subj=PEM_read_bio_PrivateKey and PEM_read_bio_PUBKEY:error=4:crypto library function failed:
> func=xmlSecOpenSSLAppKeyLoadMemory:file=..\src\openssl\app.c:line=194:obj=unknown:
> subj=xmlSecOpenSSLAppKeyLoadBIO:error=1:xmlsec library function failed:
> The key must be fix, so I cannot generate it by Openssl.

More information about the xmlsec mailing list