<div dir="ltr">HiĀ Jaromir,<div><br></div><div>I had some experience using xmlsec-openssl with PKCS#11-capable engine and PKCS11-based keys, so I think it could be possible to do it using openssl pkcs11 engine.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 9, 2021 at 8:00 PM Jaromir Talir <<a href="mailto:jaromir.talir@nic.cz">jaromir.talir@nic.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Aleksey,<br>
<br>
I'm afraid this needs much deeper understanding of internals than I<br>
have. It's quite surprising nobody tried it in 15? years. Maybe author<br>
of libreoffice xmlsec client could assist in debugging where this PIN<br>
enters the API and than CLI could be updated to follow the same path?<br>
<br>
Regards,<br>
JaromirĀ  <br>
<br>
On Tue, 2021-02-09 at 08:19 -0800, Aleksey Sanin wrote:<br>
> Hi Jaromir,<br>
> <br>
> I never tested passing password to the token from CLI. If you can<br>
> debug it then I would gladly accept patches :)<br>
> <br>
> Best,<br>
> <br>
> Aleksey<br>
> <br>
> On 2/9/21 1:42 AM, Jaromir Talir wrote:<br>
> > Hi Miklos,<br>
> > <br>
> > I tried LibreOffice with NSS backend and I was able to sign ODT<br>
> > document with the key on the token. I was asked for PIN in GUI.<br>
> > <br>
> > So the question for the audience is - how to pass PIN to NSS in<br>
> > xmlsec1<br>
> > cli?<br>
> > <br>
> > The last possible problem can be in KeyName so the other question<br>
> > is -<br>
> > is the described process to guess KeyName from token correct?<br>
> > <br>
> > Regards,<br>
> > Jaromir<br>
> > <br>
> > On Tue, 2021-02-09 at 09:46 +0100, Miklos Vajna wrote:<br>
> > > Hi Jaromir,<br>
> > > <br>
> > > On Mon, Feb 08, 2021 at 10:16:17PM +0100, Jaromir Talir<br>
> > > <<a href="mailto:jaromir.talir@nic.cz" target="_blank">jaromir.talir@nic.cz</a>> wrote:<br>
> > > > good to hear you have succeeded. I played with nss and pkcs11<br>
> > > > and<br>
> > > > seems<br>
> > > > like I'm almost there but still not fully. I guess I managed to<br>
> > > > get<br>
> > > > over task how to find proper keyname but xmlsec1 still cannot<br>
> > > > find<br>
> > > > the<br>
> > > > key in the token. I suspect that problem may be in PIN code<br>
> > > > (i.e<br>
> > > > "123456") that needs to be entered and I'm not sure if xmlsec1<br>
> > > > "--<br>
> > > > pwd"<br>
> > > > parameter is used for this.<br>
> > > <br>
> > > To be clear, we only use the library part of xmlsec1, it's<br>
> > > invoked by<br>
> > > LibreOffice. Perhaps see if your HW works with LibreOffice (try<br>
> > > to<br>
> > > sign<br>
> > > e.g. an ODT file), and if so, track down how your code vs xmlsec1<br>
> > > cli<br>
> > > vs<br>
> > > LibreOffice uses the xmlsec1 library?<br>
> > > <br>
> > > Seeing you're on Linux, I only tried this with the NSS backend of<br>
> > > xmlsec1.<br>
> > > <br>
> > > Regards,<br>
> > > <br>
> > > Miklos<br>
> > <br>
> > <br>
> > _______________________________________________<br>
> > xmlsec mailing list<br>
> > <a href="mailto:xmlsec@aleksey.com" target="_blank">xmlsec@aleksey.com</a><br>
> > <a href="http://www.aleksey.com/mailman/listinfo/xmlsec" rel="noreferrer" target="_blank">http://www.aleksey.com/mailman/listinfo/xmlsec</a><br>
> > <br>
<br>
<br>
_______________________________________________<br>
xmlsec mailing list<br>
<a href="mailto:xmlsec@aleksey.com" target="_blank">xmlsec@aleksey.com</a><br>
<a href="http://www.aleksey.com/mailman/listinfo/xmlsec" rel="noreferrer" target="_blank">http://www.aleksey.com/mailman/listinfo/xmlsec</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">SY, Dmitry Belyavsky</div>