"I guess there is still few people using smart cards in linux?"
Most of Estonian people are using it, since it's our national ID card to
identify
yourself in various portals.
https://id.eesti.ee/idtrac/wiki/ArendajaSissejuhatus
https://id.eesti.ee/idtrac/wiki/SysteemiKirjeldus
...and linux is becoming more and more popular here, because it's free.
Most agreed with above [comment(s)#c6].
Furthermore, similar eID smart cards are in use in Finland, Belgium,
Portugal and Lithuania. There are already eGov establishments that work
across these EU countries and there's no reason it shouldn't make it into
the official
European eID standard.
Even though this deals with Linux support only, Mac OS X support tackles
similar issues, see
[http://code.google.com/p/chromium/issues/detail?id=44075 issue no 44075] I
reported some time ago.
Most agreed with above comments.
Furthermore, similar eID smart cards are in use in Finland, Belgium,
Portugal and Lithuania.
There are already eGov establishments that work across these EU countries
and there's
no reason it shouldn't make it into the official European eID standard.
Even though this deals with Linux support only, Mac OS X support tackles
similar issues,
see http://code.google.com/p/chromium/issues/detail?id=44075 I reported
some time ago.
Comment #12 on issue 42073 by w...@chromium.org: Chrome interaction with
smart cards in Linux
http://code.google.com/p/chromium/issues/detail?id=42073
(No comment was entered for this change.)
Which kind of help are you looking for in order to get it done for mstone6?
Comment #15 on issue 42073 by david...@chromium.org: Chrome interaction
with smart cards in Linux
http://code.google.com/p/chromium/issues/detail?id=42073
Started hooking up callback in http://codereview.chromium.org/3186021/show
Moving this to Mstone-8. I'll either make CLs with the other unfinished
branches (started over several times), or (hopefully) just finish a first
revision and put it up for review at some point.
If I'm not the one to finish this, I'll document some stuff: The primary
difficulty here is that NSS expects a blocking callback for the password
function, and it is not always easy to predict where NSS will attempt to
authenticate. Because we do not place every SSL connection on a worker
thread, we cannot block the IO thread on the UI thread for each of these.
As such, each potential call will need to be specially handled, usually via
one of two approaches:
1. Move the piece that calls the function onto a worker thread and use a
callback which blocks on the UI thread.
2. If we can predict which slot will be authenticated, we can query
ourselves whether authentication will be required, asynchronously request a
password ourselves, and pass to PK11_CheckUserPassword ourselves. This will
require us to reimplement the (trivial) retry loop that NSS does. (I
believe in PK11_DoPassword?)
Authenticating to list certificates for "unfriendly" stores in NSS will be
particularly difficult; that code currently runs within the
GetClientDataHook callback in NSS's SSL implementation. Long-term, we
probably want to move the certificate filtering completely out of the
socket implementation, but, short-term, it would be good to avoid making
the SSLClientSocketNSS state machine different on Linux from the other two
platforms, so I think it's best to simply not support it for now.
For friendly certificates, we should only require authenticating after
certificate selection to obtain the private key. That can be done
browser-side before continuing the request instead of within the
GetClientDataHook callback.
A final subtlety lies in stores with a protected authentication path. To
authenticate to those, call C_Login with NULL parameters. The call blocks
until the user has made an authentication attempt. Since
PK11_CheckUserPassword will automatically NULL arguments to C_Login for
protected authentication, we must correctly detect them to avoid blocking.
The first implementation can probably fail in that case and not support
them. Adding support later should be fairly simple; instead of displaying a
dialog, spawn a worker thread to do PK11_CheckUserPassword while displaying
a dialog instructing the user to authenticate to the smart card. In the
blocking callback codepath, one also calls PK11_CheckUserPassword and
returns one of two magic strings as the password to control the retry loop.
(There's also the nuisance that one of the instances where we will
authenticate (keygen) does not currently have enough information to display
a tab-constrained dialog; WebKit never passes us the relevant tab
responsible. That interface should be fixed anyway, as it currently blocks
the renderer. The first implementation will probably just open a normal
dialog for simplicity.)
davidben: I suggest that you talk to abarth about the WebKit changes.
But, this bug is not about <keygen>. This is about adding the NSS
password dialog on Linux.
Right. One of the places where we'll need the NSS password dialog is
<keygen>, but that's difficult because of the way WebKit implements keygen;
it doesn't give Chromium enough information to hook the password dialog
properly.
Comment #19 on issue 42073 by w...@chromium.org: Chrome interaction with
smart cards in Linux
http://code.google.com/p/chromium/issues/detail?id=42073
(No comment was entered for this change.)
There are still a few parts left:
1) Handle devices which use protected auth path (keypad on the device
itself).
2) UI for choosing which device to use for creating/importing a cert/key.
3) Prefs UI for configuring devices.
They don't all necessarily need to get done in the same milestone.
I think that something is still missing. I tried to add opensc library in
pkcs11.txt in ~/.pki/nssdb (using modutil has no success and I dont know if
it's possible to add device with certutil). Now when I run chromium I see
in certificate manager personal certificates which are stored in smartcard
device. But when I open page with cert authorization I'm not asked for PIN
and authorization failed. If I lock nssdb with password everything is OK
(one issue is that if I import new certificate on hard drive, I have to
restart chromium - without restart authorization failed too...).
Last chrome dev: 10.0.642.2 dev
I'm the original reporter of the bug. I tested it but unfortunately it
doesn't work for me. I have added the corresponding pkcs#11 lib with the
following command:
modutil -dbdir sql:$HOME/.pki/nssdb -add "My Card" -libfile
/usr/lib/opensc-pkcs11.so
I also added the corresponding certificate authorities...
In the certificate manager, under personal certificate, it only shows an
intermediate certificate authority (not my personal certificates). If I try
to export this certificate, it asks me for the PIN but it fails to export.
After that, my personal certificates are shown correctly (sign and auth)
but I cannot export them. Besides, every time I try to login to a webpage
which asks for a certificate, the page does not load and hangs... nothing
else.
I already tried to delete the nssdb and recreate it in case I messed the db
last time.
The smart card is from the spanish government in case somebody else is in
the same situation.
Any hint on what info do you need to debug this?
xleon.m...: thanks for your report. These two reports confirmed that
although the code can handle the NSS software crypto device (when
protected with a password), it still cannot handle a real smart card.
The best way for us to debug this is to get a real smart card. mattm
and I will look into that.
I'd love to help you testing.
I am running 10.0.650.0 (72596) on Ubuntu 10.10. My Estonia ID card is
being recognized by my system without any problems. Works in Firefox
(Thought installed some Firefox plugin
http://habreffect.ru/files/1c4/ea14a235e/screenshot1.png) but doesn't work
in Chromium.
Let me know if i can provide you any information.
I tried with Chromium 11.0.658.0 (73582) Ubuntu 10.04, Gemplus reader,
CoolKey middleware, and a US Dept of Defense Common Access Card... with
similar results to other testers.
The certificate manager dialog will show my certs, and prompts for pin on
export, but then reports "Unknown error."
Connecting to a web site that requires a cert does not prompt for pin and
fails to authenticate.
Ubuntu 10.10 Chrome 11.0.686.0 dev
Tested with Alladin eToken PRO Java 72K OS755
11.0.696.12 (78147) Ubuntu 10.10 amd64
ACR38-U reader, Siemens smartcard
Also works.
First user have to authorize to sc with PIN via prefs (as in comment 38),
which is not straight forward. When requested client auth by a site, the
browser should present user it the PIN dialogue.
However, it's a huge progress, congratulations!
12.0.707.0 (78659) Ubuntu 10.10 i386
Aladdin eToken Pro
Working too.
Every time when you re-open browser, you need to go into the preferences to
enter a PIN. It's sad.
Thanks, but I'm not sure what to substitute as "my smart card" - needless
to say the card has numerous unique identifiers.
Meanwhile I discovered that opensc had not been installed yet by my Ubuntu
distro (unless the Belgian eID middleware had installed it and now I have
two copies) and only libopenct1 was installed (so I added openct as that
came up in one of the intermediary error messages)
However, once I installed opensc and openct, I discovered that the card
reader did not work the next time I booted the computer (and this issue is
confirmed in the readme that came with the middleware from the government)!
However, on closer inspection of the file that came with the middleware I
found
else if (navigator.platform.indexOf("Linux") >= 0)
p11Lib = "/usr/local/lib/libbeidpkcs11.so";
res = pkcs11.addmodule(p11Name, p11Lib, 0, 0);
I therefore tried this:
sudo modutil -dbdir sql:$HOME/.pki/nssdb -add "Belgium Identity Card
PKCS#11" -libfile /usr/local/lib/libbeidpkcs11.so
and got
ERROR: Failed to add module "Belgium Identity Card PKCS#11". Probable
cause : "security library: received bad data.".
I just want to thank all of the devs and testers out there who are working
on this issue. This is a very important feature if Chromium/Chrome wants
penetration onto government desktops and devices. Keep up the good work.
Hi!
Im running 14.0.803.0-r90 and when i have logged in to my pkcs11-tokens
with the certificate manager, and then points the browser to a site
requesting a client certificate, i get the "choose-certificate" dialog but
after that the browser just errors out with a "Error 2 (net::ERR_FAILED):
Unknown error."
This have worked before but have stopped working a couple of weeks ago.
Im running the google-chrome-unstable builds on Ubuntu 10.04 and 11.10
Alpha2 with the same behavior.
Let me just also add that this smart card issue is not an issue with Chrome
under MS Windows 7. Smart cards, the readers, and the certificates are
handled by the OS, which is a new feature to W7. When I use Chrome (W7
versions) to access a smart card authenticated web site, as long a the
smart card is plugged in, the OS will ask for a PIN, using (what appears
be) the same dialogue box as what is presented if I were using IE. As long
as the PIN is entered correctly and website doesn't reject Chrome as a
browser, there is not any access restrictions.
It seems like under Linux, we have something similar with the OpenSC, PCSC
lite, and coolkey. It appears from above Chrome is using NSS (from
Mozilla). Maybe we should look into using OpenSC, PCSC, and Coolkey.
Maybe we already are I just don't know what I am talking about. Wish I
knew more (like how to code)... (BTW currently working on that)
pdobryakov: Probably issue 114134. See if it works on the dev channel.
Yes, in 19 version all ok