[xmlsec] Re: A question for LibXmlSec
Aleksey Sanin
aleksey at aleksey.com
Wed Sep 25 20:22:06 PDT 2002
XMLSec *does not* create PEM files. Take a look into ./test.pem file
produced on this first step --- it's an XML file! Please create a PEM file
using OpenSSL.
Aleksey
Michael Mi wrote:
> I tried it again, but still failed. The following is what I exactly do:
>
> 1) I used following command to create a key file named test.pem
>
> D:\Libxml2\libxmlsec-0.0.6.win32\util>xmlsec keys --gen-dsa newkey
> --pwd password ./test.pem
>
> 2) I copied the ./test.pem to the working directory.
>
> 3) I change following statement in dsig1.c
>
> if(xmlSecSimpleKeysMngrLoadPemKey(keysMngr, argv[1], NULL, NULL, 1) ==
> NULL) {
>
> into
>
> if(xmlSecSimpleKeysMngrLoadPemKey(keysMngr, argv[1], "password", NULL,
> 1) == NULL) {
>
> (I feel a little puzzled where I should put the keyname "newkey "into
> the function, and another thing is that when I open the file test.pem,
> there are no word "password" in this XML file, which I think should be
> somewhere.)
>
> 4) build the program and run it, the output is following:
>
> Error: failed to load key from "test.pem"
>
> So is any step I do wrong?
>
> Thanks
>
> Michael
>
>
> ----- Original Message -----
> From: Aleksey Sanin <mailto:aleksey at aleksey.com>
> To: Michael Mi <mailto:hao.mi at sun.com>
> Cc: SO-China-eng-xml at sun.com <mailto:SO-China-eng-xml at sun.com>
> Sent: Thursday, September 26, 2002 11:01 AM
> Subject: Re: A question for LibXmlSec
>
> XMLSec uses standard PEM files and it should read PEM files produced
> by OpenSSL or any other program. For simplicity, examples assume that
> PEM files are *not* protected by passwords. The xmlsec utility
> does have
> a special parameter "--pwd <password>" that specifies password to
> use.
> Please give it a try and if this will not work for you, I would
> appreciate
> if you can capture and send to me the output.
>
> Thanks,
> Aleksey
>
>
>
>
> Michael Mi wrote:
>
>> Hi, Aleksey,
>>
>> I met a problem which need your help.
>>
>> I am trying the sample program called dsig1.c from
>> http://www.aleksey.com/xmlsec/example-dsig1.html, but I can't
>> find a suitable keyfile for it. (I have tried many keyfile from
>> openssl package with ".pem" extension, but an error saying
>> "Error: failed to load key from "....pem"" always appeared. Also,
>> I created a keyfile by using xmlsec utility, failed again.) Maybe
>> the reason why I can't open these keyfiles is absence of
>> password, I am not sure.
>>
>> So can you tell me where I can get a valid keyfile for this
>> program, or how I can create one myself.
>>
>> Thank a lot.
>>
>> Michael.
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20020925/3e789888/attachment.htm
More information about the xmlsec
mailing list