Re: PKCS#11 support for openssh

This is a discussion on Re: PKCS#11 support for openssh within the OpenSSH Development forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --------------070101080306090405000309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-18-2005
Alon Bar-Lev
 
Posts: n/a
Default Re: PKCS#11 support for openssh

This is a multi-part message in MIME format.
--------------070101080306090405000309
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Roumen Petrov wrote:
> Alon,
>
> you should improve security of code. I already sent some notes offlist.
>
>


Hello,

Attached is a new version modified according to Roumen
Petrov's helpful comments.

For those of you that did not follow this thread:

The PKCS#11 patch modify ssh-add and ssh-agent to support
PKCS#11 private keys and certificates.

It allows using multiple PKCS#11 providers at the same time,
selecting keys by id, label or certificate subject, handling
card removal and card insert events, handling card re-insert
to a different slot, supporting session expiration.

A valid X.509 certificate should exist on the token, without
X.509 support it is exported as regular RSA key. Self-signed
certificates are treated as RSA key and not as X.509 RSA
key. There is a simple utility Timo Felbinger wrote
(http://www.timof.qipc.org/x509toOpenSSH.c) that extracts
ssh public key from X.509 certificate.

If you like X.509 support apply the X.509 patch *AFTER* the
PKCS#11 patch. There are minor rejects that can be easily
corrected by:
$ autoreconf -i -v

One significant change is that the ssh-agent prompts for
passwords now... So you need to configure it with a program
that asks for card insert or PIN, a program such as
x11-ssh-askpass. Current implementation (ssh-add asks for
passwords) is not valid for dynamic smartcard environment.

Current implementation uses the askpin program also for
prompting card insert... Don't be confused, it only expects
ok or cancel, attached is a simple scripts that uses kde in
order to display these dialogs.

A common scenario is the following:

$ ssh-agent xterm ->

$ ssh-add --pkcs11-ask-pin `which openssh-kde-dialogs.sh`

$ ssh-add --pkcs11-add-provider --pkcs11-provider
/usr/lib/pkcs11/MyProvider.so

$ ssh-add --pkcs11-add-id --pkcs11-slot-type label
--pkcs11-slot "MyToken" --pkcs11-id-type subject --pkcs11-id
"/C=XX/CN=YY"

$ ssh myhost

In order to see available objects, you can use:

$ ssh-add --pkcs11-show-slots --pkcs11-provider
/usr/lib/pkcs11/MyProvider.so

$ ssh-add --pkcs11-show-objects --pkcs11-provider
/usr/lib/pkcs11/MyProvider.so --pkcs11-slot 0

I will be happy to receive any more comments!

Best Regards,
Alon Bar-Lev.

--------------070101080306090405000309
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://www.mindrot.org/mailman/listi...enssh-unix-dev

--------------070101080306090405000309--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0