<html>
<head>
<title>Message</title>
<style>
<!--
P { margin-top:0; margin-bottom:0; }
-->
</style>
</head>
<body>
<p> </p>
<p> </p>
<p><b><font size=2>--- Исходное сообщение ---</b></p>
<p><b>От:</b> "waterfall@evol.ru" <waterfall@evol.ru></p>
<p><b>Отправлено:</b> 06.04.2010 01:23:14</p>
<p><b>Тема:</b> xmlsec, openssl , gost</font></p>
<p> </p>
<p>1. i install openssl 1.0 (use ./config shared ), xmlsec 1.2.4 (use ./configure --enable-gost --with-openssl="/usr/local/ssl") in slax</p>
<p>2. generate key : openssl genpkey -algorithm gost2001 -pkeyopt paramset:A -out seckey.pem</p>
<p> </p>
<p> </p><p><b><font face="Courier New" color="#C0C0C0">sign1-tmpl-rus.xml (from test)</p>
<p> </p>
<p><?xml version="1.0" encoding="UTF-8"?></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"><!-- </font></b></p>
<p><b><font face="Courier New" color="#C0C0C0">XML Security Library example: Simple signature template file for sign1 example. </font></b></p>
<p><b><font face="Courier New" color="#C0C0C0">--></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"><Envelope xmlns="urn:envelope"></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <Data></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0">Hello, World!</font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> </Data></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <SignedInfo></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411"/></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <Reference URI=""></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <Transforms></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"><Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"><XPath xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">not(ancestor-or-self::dsig:Signature)</XPath></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"></Transform></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> </Transforms></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#gostr3411"/></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <DigestValue></DigestValue></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> </Reference></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> </SignedInfo></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <SignatureValue/></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> <KeyInfo></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"><X509Data></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"><X509Certificate></X509Certificate></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"></X509Data></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"></KeyInfo></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"></Signature></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"></Envelope></font></b></p>
<p><b><font face="Courier New" color="#C0C0C0"> </font></b></p>
<p> </p>
<p>sign1 - one of examples (by default it use openssl engine)</p>
<p> </p>
<p> </p>
<p>command ./sign1 sign1-tmpl-rus.xml seckey.pem</p>
<p>get this</p>
<p> </p>
<p>func=xmlSecOpenSSLEvpKeyAdopt:file=evp.c:line=241:obj=unknown:subj=unknown:error=14:invalid type:evp key type 811 not supported</p>
<p>func=xmlSecOpenSSLAppKeyLoadBIO:file=app.c:line=333:obj=unknown:subj=xmlSecOpenSSLEvpKeyAdopt:error=1:xmlsec library function failed:</p>
<p>func=xmlSecOpenSSLAppKeyLoad:file=app.c:line=143:obj=unknown:subj=xmlSecOpenSSLAppKeyLoadBIO:error=1:xmlsec library function failed:filename=seckey.pem;errno=0</p>
<p>Error: failed to load private pem key from "seckey.pem" </p>
<p> </p>
<p>what should I do?:)</p>
</body>
</html>