[xmlsec] Re: A question for LibXmlSec
Aleksey Sanin
aleksey at aleksey.com
Thu Sep 26 19:29:28 PDT 2002
Good to know :) Thanks for update!
Aleksey
Michael Mi wrote:
>Hi Aleksey,
>
>You are right. It is not really a bug. I changed the compiling setting,
>everything is all right.
>
>Thanks a lot.
>
>Michael
>
>----- Original Message -----
>From: "Aleksey Sanin" <aleksey at aleksey.com>
>To: "Michael Mi" <hao.mi at sun.com>
>Cc: "xmlsec" <xmlsec at aleksey.com>
>Sent: Thursday, September 26, 2002 1:44 PM
>Subject: Re: A question for LibXmlSec
>
>
>
>
>>I don't have fix simply because this happens *only* on Windows and it is
>>
>>
>not
>
>
>>my primary development platform. Most likely you have problems with ms c
>>runtime libraries (there are 4 incompatible version and if you use two
>>different
>>libraries in one application you likely have a crash). This is described
>>in OpenSSL
>>FAQ and in XMLSec mailing list.
>>However, I may be wrong and there is a bug somewhere. But I accept
>>patches :)
>>
>>Aleksey.
>>
>>Michael Mi wrote:
>>
>>
>>
>>>Hi Aleksey,
>>>
>>>Thanks for your suggestion. The program can work now.
>>>
>>>But there is another question when I am trying the dsig4.c. When I
>>>call the function xmlSecDSigResultDebugDump, the program crashes.
>>>
>>>I have checked the internet, and found that some other guys asked you
>>>this question some time ago
>>>(http://www.aleksey.com/pipermail/xmlsec/2002/000035.html). So is
>>>there any updated binary package which I can use to correct this bug?
>>>
>>>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> ;
>>> xmlsec at aleksey.com <mailto:xmlsec at aleksey.com>
>>> Sent: Thursday, September 26, 2002 11:22 AM
>>> Subject: Re: A question for LibXmlSec
>>>
>>> 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.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>
>>
>>
>
>
>
More information about the xmlsec
mailing list