[xmlsec] Problem when using the xmlSecOpenSSLAppKeyLoadMemory() API.

Venkataragavan Vijayakumar venkataragavan.v at gmail.com
Tue Apr 2 08:00:32 PDT 2013


Hi All,

Previously I have used the xmlSecCryptoAppKeyLoad() API to load the Key
file in the PEM format , it worked fine, but when i start to use
xmlSecCryptoAppKeyLoadMemory() with the same content in the key file is
given as input as buffer, it given error as


func=xmlSecOpenSSLAppKeyLoadBIO:file=app.c:line=263:obj=unknown:subj=PEM_read_bio_PrivateKey
and PEM_read_bio_PUBKEY:error=4:crypto library function
failed:

func=xmlSecOpenSSLAppKeyLoadMemory:file=app.c:line=205:obj=unknown:subj=xmlSecOpenSSLAppKeyLoadBIO:error=1:xmlsec
library function failed:


*

code used like this*:

 dsigCtx->signKey =
xmlSecCryptoAppKeyLoadMemory(keybuf,keysize,xmlSecKeyDataFormatPem, NULL,
NULL, NULL);
  if(dsigCtx->signKey == NULL) {
    fprintf(stderr,"Error: failed to load private pem key from \"%s\"\n",
key_file);
    goto done;
  }

Please help me to resolve this issue.

Thanks,
Venkat.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20130402/51db0c95/attachment.html>


More information about the xmlsec mailing list