This Time Self-Hosted
dark mode light mode Search

In the land of smartcards

Even though I did post that I wanted to get onto hardware signatures I ended up getting an USB smartcard reader for a job that requires me to deal with some kind of smartcards; I cannot go much further on the matter right now though, so I’ll skip over most of the notes here.

Now, since I got the reader, but not yet most of the specifics I need to actually go on with the job, I’ve been playing with actually getting the reader to work with my system. Interestingly enough, as usual, the first problem is very Gentoo-specific: the init script does not work properly, and I’m now working on fixing that up.

But then the problem is to actually find a smart card to test with; in my haste I forgot about getting at least one or two smartcards to play with when I ordered the device, and now it’d be stupidly expensive to order them. Of course I’ll go around this time and get myself the Italian electronic ID card (CIE), but even that does not come cheap (€25, and a full morning wasted), and I cannot just do that right now.

So I went around to see what I had at home with a smartcard chip, after discarding my old, expired MasterCard (even though I thought about it before, I was warned against trying that), I decided to try with a GSM SIM card, which I had laying around (I had to get a new one to switch my current phone plan to a business subscriber plan; before I was using a consumer pre-paid plan).

Now, although I was able to test that the reader detects and initialises the card correctly (although it is not in the pcsc-tools database!), I wanted to see if it was actually possible to access it fully; luckily the page of a Gentoo user sent me to some software, written by an Italian programmer, that should do just that: monosim which, as you’d expect, is written in C# and Mono, which is good given I’m currently doing the same for another customer of mine.

Unfortunately, it seems like the mono problem comes up again: upstream never considered the fact that the libpcsclite.so ABI changes between different architectures, even on the same operating system. Not that I find that a good idea in general, since I always try to stick with properly-sized parameters (thanks stdint.h), but it happens, and we should get ready to actually resolve the problems when they appear.

Now, I really don’t even want to get started with all the mess that RMS have uncovered lately; just like I did a few years back, I replace the idealistic problems from Stallman with technical limitations, see for instance my post about “the java crap” (which – by the way – hasn’t finished being a problem, outlasting the idealistic problems).

And I’m still waiting for Berkeley DB to finish its testsuite, after more than twelve (12!) hours, on an eight core system, with parallel processes (I get five TCL processes to hog up the same amount of cores at almost any time). I don’t even want to think how long it would take on a single-core system. Once that’s done, I can turn the system down for some extraordinary maintenance.

Comments 6
  1. L’universita’ di Trento e Bolzano sono quelle che hanno fatto più studi e software in Italia, potrebbero esserti utili se intendi usarle per la camera di commercio o simili.

  2. Hello,I´m using my Belgian Identity Card from Gentoo:- In this packaging, beidgui application allows to display the content using a specific RLE encoding.- Client certificat is working at least under FireFox.- Using the previous version, I was able to do pam authentification. I didn´t test with the last version.Due to the RLE encoding for the photo included on the smart card, and the graphical interactif request of PIN code,this package contains modification of libraries. But this could be a good to start to define what to do or not to do. ;-)The full story is under https://bugs.gentoo.org/sho…Sincerely,Pierre

  3. yes pcsc-tools doesn’t natively contain the GSM SIM stuff, but I do have a patch I wrote to implement it. Upstream rejected it wanting me to do a lot of refactoring, so I just never pursued it.

  4. I’ve some experience in smartcard access and use, also under linux. Your work will be easier if you limit all at a 32 bit environment and I can give you some help if needed, hower the content of loux link is a very good start point.nbtux

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.