[xmlsec] xmlSecCryptoAppKeyLoadMemory
Yeshwanth C
cyeshwanth at gmail.com
Sun Dec 17 21:14:26 PST 2006
Sorry. I have put in some commented out code as well
The actual code reads as follows:-
ifstream::pos_type size;
char * memblock;
ifstream file ("c:\\fread.txt", ios::in|ios::binary|ios::ate);
if (file.is_open())
{
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
cout << "the complete file content is in memory";
}
else cout << "Unable to open file";
/* load public key */
xmlSecCryptoAppKeyLoadMemory((const unsigned char*)memblock,size,
xmlSecKeyDataFormatBinary, NULL,NULL,NULL);
Regards
Yesh
On 12/18/06, Aleksey Sanin <aleksey at aleksey.com> wrote:
>
> > //dsigCtx->signKey = xmlSecCryptoAppKeyLoad(key_file,
> > xmlSecKeyDataFormatPem, NULL, NULL, NULL);
> > xmlSecCryptoAppKeyLoadMemory((const unsigned char*)memblock,size,
> > xmlSecKeyDataFormatBinary, NULL,NULL,NULL);
> >
>
>
> PEM format != Binary format
>
> Aleksey
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20061218/d1dcf7cb/attachment-0002.htm
More information about the xmlsec
mailing list