<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
XMLSec *does not* create PEM files. Take a look into ./test.pem file<br>
produced on this first step --- it's an XML file! Please create a PEM file<br>
using OpenSSL.<br>
<br>
Aleksey<br>
<br>
Michael Mi wrote:<br>
<blockquote type="cite" cite="mid012601c2650b$d854d8c0$84d99e81@BATTER">
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<meta content="MSHTML 6.00.2600.0" name="GENERATOR">
<div><font size="2">I tried it again, but still failed. The following is
what I exactly do:</font></div>
<div> </div>
<div><font size="2">1) I used following command to create a key file named
test.pem</font></div>
<div> </div>
<div><font size="2">D:\Libxml2\libxmlsec-0.0.6.win32\util>xmlsec keys
--gen-dsa newkey --pwd password ./test.pem</font></div>
<div> </div>
<div><font size="2">2) I copied the ./test.pem to the working directory.</font></div>
<div> </div>
<div><font size="2">3) I change following statement in dsig1.c</font></div>
<div> </div>
<div><font size="2">if(xmlSecSimpleKeysMngrLoadPemKey(keysMngr, argv[1],
NULL, NULL, 1) == NULL) {</font></div>
<div> </div>
<div><font size="2">into </font></div>
<div> </div>
<div><font size="2">if(xmlSecSimpleKeysMngrLoadPemKey(keysMngr, argv[1],
"password", NULL, 1) == NULL) {</font></div>
<div> </div>
<div><font size="2">(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.)</font></div>
<div> </div>
<div><font size="2">4) build the program and run it, the output is following:</font></div>
<div> </div>
<div><font size="2">Error: failed to load key from "test.pem"</font></div>
<div> </div>
<div><font size="2">So is any step I do wrong?</font></div>
<div> </div>
<div><font size="2">Thanks</font></div>
<div> </div>
<div><font size="2">Michael</font></div>
<div> </div>
<blockquote
style="border-left: 2px solid rgb(0,0,0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;">-----
Original Message ----- </div>
<div
style="background: rgb(228,228,228) none repeat scroll 0%; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>From:</b>
<a title="aleksey@aleksey.com" href="mailto:aleksey@aleksey.com">Aleksey
Sanin</a> </div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>To:</b>
<a title="hao.mi@sun.com" href="mailto:hao.mi@sun.com">Michael Mi</a>
</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>Cc:</b>
<a title="SO-China-eng-xml@sun.com"
href="mailto:SO-China-eng-xml@sun.com">SO-China-eng-xml@sun.com</a> </div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>Sent:</b>
Thursday, September 26, 2002 11:01 AM</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>Subject:</b>
Re: A question for LibXmlSec</div>
<div><br>
</div>
XMLSec uses standard PEM files and it should read PEM files produced <br>
by OpenSSL or any other program. For simplicity, examples assume that<br>
PEM files are *not* protected by passwords. The xmlsec utility does have
<br>
a special parameter "--pwd <password>" that specifies password to
use. <br>
Please give it a try and if this will not work for you, I would appreciate
<br>
if you can capture and send to me the output.<br>
<br>
Thanks,<br>
Aleksey<br>
<br>
<br>
<br>
<br>
Michael Mi wrote:<br>
<blockquote cite="mid010b01c26507$3d3b0610$84d99e81@BATTER"
type="cite">
<meta content="MSHTML 6.00.2600.0" name="GENERATOR">
<style></style>
<div><font size="2">Hi, Aleksey,</font></div>
<div> </div>
<div><font size="2">I met a problem which need your help.</font></div>
<div> </div>
<div><font size="2">I am trying the sample program called dsig1.c from
<a href="http://www.aleksey.com/xmlsec/example-dsig1.html">http://www.aleksey.com/xmlsec/example-dsig1.html</a>,
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. </font></div>
<div> </div>
<div><font size="2">So can you tell me where I can get a valid keyfile
for this program, or how I can create one myself.</font></div>
<div> </div>
<div><font size="2">Thank a lot.</font></div>
<div> </div>
<div><font size="2">Michael.</font></div>
<div> </div>
<div> </div>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>