libp11 auth.c how to veify sign?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

libp11 auth.c how to veify sign?

xabi esteban
I'm working with the libp11 example. I sign a text and with libp11 i verified the sign and all works OK.
Now i have written the text and the sign in files. I want to verify the sign using openssl, whats the command line to verify the sign generated with libp11?

Thanks


Compartir tus mejores FOTOS es fácil en Messenger ¡DESCUBRE cómo!
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: libp11 auth.c how to veify sign?

Andreas Jellinghaus-2
Am Donnerstag 01 April 2010 12:06:07 schrieb xabi esteban:
> I'm working with the libp11 example. I sign a text and with libp11 i
>  verified the sign and all works OK. Now i have written the text and the
>  sign in files. I want to verify the sign using openssl, whats the command
>  line to verify the sign generated with libp11?

openssl dgst -verify $p -md5 -signature $s < $m

where $p is the public key file / certificate, $s is the signature file,
and $m is the messagefile.

Andreas
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: libp11 auth.c how to veify sign?

xabi esteban
In reply to this post by xabi esteban
Thanks but i tryied and not work. I used the example auth.c and the verification in the code said that the sign is correct.
Then y print the message, the singn and the cert in files. but when i used the command:

openssl dgst -verify xabiPublicKey.pem -md5 -signature firma.sig < random.txt

 I only obtain Verification Failure.
I've proved with md5 sha1... but always the same fail.

What's the problem

Thanks



¿Quieres navegar seguro? Hazlo con Internet Explorer 8
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: libp11 auth.c how to veify sign?

xabi esteban
In reply to this post by xabi esteban
Thanks, but i have the solution. the problem was tha i was signing a string and trying to verificate a file. if i use the function rsa_verify for openssl wokrs fine bye.



Tu Hotmail a un clic con Internet Explorer 8. ¡Descárgatelo gratis!
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-user