I am still getting the same error invalid format.
Shoud the binary data be converted to base64 before being used?
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, Yeshwanth C <[EMAIL PROTECTED]> wrote:
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 <[EMAIL PROTECTED]> 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
>
>
_______________________________________________
xmlsec mailing list
[email protected]
http://www.aleksey.com/mailman/listinfo/xmlsec