<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Steademy Blog &#187; technology</title>
	<atom:link href="http://blog.steademy.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.steademy.com</link>
	<description>Steademy - steademy for every message</description>
	<lastBuildDate>Mon, 25 Jan 2010 22:19:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>CryptoStick with gnupg under MacOS Snow Leopard</title>
		<link>http://blog.steademy.com/2010/01/25/cryptostick-with-gnupg-under-macos-snow-leopard/</link>
		<comments>http://blog.steademy.com/2010/01/25/cryptostick-with-gnupg-under-macos-snow-leopard/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 22:03:50 +0000</pubDate>
		<dc:creator>tkoeppen</dc:creator>
				<category><![CDATA[encryption]]></category>
		<category><![CDATA[gpg]]></category>

		<guid isPermaLink="false">http://blog.steademy.com/?p=194</guid>
		<description><![CDATA[I&#8217;m a beta tester a crypto stick from GPF. The crypto stick is an USB card to secure gpg keys on a smartcard. The card was tested under some Linux and Windows systems successfully. Running under MacOS Snow Leopard (Jan 2010) brought some issue with the card driver. Current progress can be followed in the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a beta tester a <a href="http://www.privacyfoundation.de/crypto_stick/">crypto stick from GPF</a>.</p>
<p>The crypto stick is an USB card to secure gpg keys on a smartcard.</p>
<p><a href="http://www.privacyfoundation.de/crypto_stick/"><img src="http://blog.steademy.com/wp-content/uploads/2010/01/cryptostick_1.0.jpeg" alt="cryptostick" title="cryptostick_1.0" width="500" height="231" class="alignnone size-full wp-image-203" /></a></p>
<p>The card was tested under some Linux and Windows systems successfully.</p>
<p>Running under MacOS Snow Leopard (Jan 2010) brought some issue with the card driver.</p>
<p>Current progress can be followed in the <a href="http://lists.gnupg.org/pipermail/gnupg-users/2010-January/038037.html">gnupg-users mailing-list</a>.</p>
<p><strong><br />
Running pcscd in debug mode</strong><br />
Following the debug hint from <a href="http://pcsclite.alioth.debian.org/ccid.html#support">driver developer&#8217;s page</a></p>
<p><code><br />
  LIBCCID_ifdLogLevel=0x0007<br />
  export LIBCCID_ifdLogLevel<br />
  ps -ef | grep pcsc<br />
  pcscd --foreground --debug --apdu<br />
</code></p>
<p>Inserting the cryptostick to the USB port, i get two different debug outputs:<br />
<strong><br />
Variante 1: debug output after inserting the card (card red light is blinking)</strong><br />
<code><br />
bash-3.2# pcscd --foreground --debug --apdu<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/debuglog.c:240:DebugLogSetLevel() debug level=debug<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/debuglog.c:269:DebugLogSetCategory() Debug options: APDU<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:585:main() pcsc-lite 1.4.0 daemon ready.<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:1545:ReaderCheckArchitecture() Send respawn signal to pcscd (pid=275)<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:678:signal_respawn() Got signal to respawn in 32 bit mode<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:294:SVCServiceRunLoop() Preparing to exit...<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:1048:RFCleanupReaders() entering cleaning function<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/debuglog.c:240:DebugLogSetLevel() debug level=debug<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/debuglog.c:269:DebugLogSetCategory() Debug options: APDU<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:585:main() pcsc-lite 1.4.0 daemon ready.<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:781:RFInitializeReader() Attempting startup of Gemplus GemPC Twin 00 00 using /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:507:RFBindFunctions() Binding driver functions<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:643:RFBindFunctions() Loading IFD Handler 3.0<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:1323:init_driver() Driver version: 1.3.8<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:1346:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x0007<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:1356:init_driver() DriverOptions: 0x0000<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:81:IFDHCreateChannelByName() lun: 0, device: Gemplus GemPC Twin<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:158:OpenUSBByName() Reader index: 0, Device: Gemplus GemPC Twin<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:236:OpenUSBByName() Manufacturer: Ludovic Rousseau (ludovic.rousseau@free.fr)<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:246:OpenUSBByName() ProductString: Generic CCID driver<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:252:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:311:OpenUSBByName() Checking device: 003/004-08e6-3437-00-00<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:361:OpenUSBByName() Trying to open USB bus/device: 003/004-08e6-3437-00-00<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:408:OpenUSBByName() Found Vendor/Product: 08E6/3437 (Gemplus GemPC Twin)<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:410:OpenUSBByName() Using USB bus/device: 003/004-08e6-3437-00-00<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:836:ControlUSB() request: 0x03<br />
receive: 01 2A 00 00 01 38 00 00 09 3D 00 00 34 43 00 00 61 51 00 00 01 54 00 00 8E 5B 00 00 CE 64 00 00 02 70 00 00 12 7A 00 00 02 7E 00 00 69 86 00 00 97 98 00 00 C3 A2 00 00 03 A8 00 00 1B B7 00 00 73 CB 00 00 03 D2 00 00 04 E0 00 00 24 F4 00 00 04 FC 00 00 D1 0C 01 00 05 18 01 00 2D 31 01 00 85 45 01 00 06 50 01 00 36 6E 01 00 E7 96 01 00 07 A4 01 00 07 C0 01 00 48 E8 01 00 08 F8 01 00 09 30 02 00 5A 62 02 00 0B 8B 02 00 0B A0 02 00 0E 48 03 00 0F 80 03 00 90 D0 03 00 16 40 05 00<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 10753 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 14337 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 15625 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 17204 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 20833 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 21505 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 23438 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 25806 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 28674 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 31250 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 32258 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 34409 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 39063 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 41667 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 43011 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 46875 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 52083 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 53763 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 57348 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 62500 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 64516 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 68817 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 71685 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 78125 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 83333 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 86022 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 93750 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 104167 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 107527 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 114695 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 125000 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 129032 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 143369 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 156250 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 166667 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 172043 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 215054 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 229391 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 250000 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:816:get_data_rates() declared: 344086 bps<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:307:IFDHGetCapabilities() lun: 0, tag: 0xFAE<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:353:IFDHGetCapabilities() Reader supports 1 slot(s)<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:924:IFDHPowerICC() lun: 0, action: PowerUp<br />
-> 000000 62 00 00 00 00 00 04 01 00 00<br />
<- 000000 80 00 00 00 00 00 04 41 03 00<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/commands.c:203:CmdPowerOn error on byte 3<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:964:IFDHPowerICC() PowerUp failed<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/eventhandler.cpp:314:EHStatusHandlerThread() Error powering up card: -2146435050 0x80100016<br />
^C/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:662:signal_trap() Preparing for suicide<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:294:SVCServiceRunLoop() Preparing to exit...<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:1048:RFCleanupReaders() entering cleaning function<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:1057:RFCleanupReaders() Stopping reader: Gemplus GemPC Twin 00 00<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/eventhandler.cpp:177:EHDestroyEventHandler() Stomping thread.<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/eventhandler.cpp:194:EHDestroyEventHandler() Thread stomped.<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:832:RFUnInitializeReader() Attempting shutdown of Gemplus GemPC Twin 00 00.<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:226:IFDHCloseChannel() lun: 0<br />
-> 000000 63 00 00 00 00 00 1C 00 00 00<br />
<- 000000 81 00 00 00 00 00 1C 01 00 00<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:569:CloseUSB() Closing USB device: 003/004-08e6-3437-00-00<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:584:CloseUSB() Last slot closed. Release resources<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:675:RFUnBindFunctions() Unbinding driver functions<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:687:RFUnloadReader() Unloading reader driver.<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:690:RFUnloadReader() --- closing dynamic library<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:611:at_exit() cleaning /var/run</p>
<p></code></p>
<p><strong>Variante 2: insert card another time (card red light is permanent on)<br />
</strong><br />
<code><br />
bash-3.2# pcscd --foreground --debug --apdu<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/debuglog.c:240:DebugLogSetLevel() debug level=debug<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/debuglog.c:269:DebugLogSetCategory() Debug options: APDU<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:585:main() pcsc-lite 1.4.0 daemon ready.<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:1545:ReaderCheckArchitecture() Send respawn signal to pcscd (pid=389)<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:678:signal_respawn() Got signal to respawn in 32 bit mode<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:294:SVCServiceRunLoop() Preparing to exit...<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:1048:RFCleanupReaders() entering cleaning function<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/debuglog.c:240:DebugLogSetLevel() debug level=debug<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/debuglog.c:269:DebugLogSetCategory() Debug options: APDU<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/pcscdaemon.c:585:main() pcsc-lite 1.4.0 daemon ready.<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:781:RFInitializeReader() Attempting startup of Gemplus GemPC Twin 00 00 using /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:507:RFBindFunctions() Binding driver functions<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:643:RFBindFunctions() Loading IFD Handler 3.0<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:1323:init_driver() Driver version: 1.3.8<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:1346:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x0007<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:1356:init_driver() DriverOptions: 0x0000<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:81:IFDHCreateChannelByName() lun: 0, device: Gemplus GemPC Twin<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:158:OpenUSBByName() Reader index: 0, Device: Gemplus GemPC Twin<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:236:OpenUSBByName() Manufacturer: Ludovic Rousseau (ludovic.rousseau@free.fr)<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:246:OpenUSBByName() ProductString: Generic CCID driver<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:252:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:311:OpenUSBByName() Checking device: 003/004-08e6-3437-00-00<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:361:OpenUSBByName() Trying to open USB bus/device: 003/004-08e6-3437-00-00<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ccid_usb.c:402:OpenUSBByName() Can't claim interface 003/004-08e6-3437-00-00: Unknown error: 0<br />
/SourceCache/SmartcardCCID/SmartcardCCID-35253/ccid/ccid/src/ifdhandler.c:99:IFDHCreateChannelByName() failed<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:820:RFInitializeReader() Open Port 6400000 Failed (Gemplus GemPC Twin)<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:675:RFUnBindFunctions() Unbinding driver functions<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:687:RFUnloadReader() Unloading reader driver.<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:690:RFUnloadReader() --- closing dynamic library<br />
/SourceCache/SmartCardServices/SmartCardServices-36160/src/PCSC/readerfactory.c:261:RFAddReader() RFAddReader: Gemplus GemPC Twin init failed: -2146435067<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steademy.com/2010/01/25/cryptostick-with-gnupg-under-macos-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails command validation</title>
		<link>http://blog.steademy.com/2009/04/13/grails-command-validation/</link>
		<comments>http://blog.steademy.com/2009/04/13/grails-command-validation/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 19:33:13 +0000</pubDate>
		<dc:creator>tmaus</dc:creator>
				<category><![CDATA[Groovy & Grails]]></category>
		<category><![CDATA[command pattern]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[validator]]></category>

		<guid isPermaLink="false">http://blog.steademy.com/?p=111</guid>
		<description><![CDATA[I have setup a small example that demonstrates how to use grails validation on non domain objects using the command pattern. Collecting all required information was not that easy. Forums do not yet cover many G&#038;G related topics, at least if you want to look under the hood of it In general, my blogs target [...]]]></description>
			<content:encoded><![CDATA[<p>I have setup a small example that demonstrates how to use grails validation on non domain objects using the command pattern.<br />
Collecting all required information was not that easy. Forums do not yet cover many G&#038;G related topics, at least if you want to look under the hood of it </p>
<p>In general, my blogs target G&#038;G developers. You should have at least an idea of how to use it, how to setup a project and what a controller is. My code is tested against Grails 1.1</p>
<h3>Short summary</h2>
<p>We are going to setup a simple controller with two closures. The one we use is responsible for logging a user into any platform.<br />
Our controller uses a command to gather  all params and to validate its values. </p>
<h2>The controller</h2>
<p>First thing you should create is the controller.<br />
grails create-controller my<br />
You might now copy and paste the following code into your controller class. </p>
<pre>
<p style="border: 1px solid black; overflow: auto; width: 100%; height: 180px">
<b>grails-app/controllers/MyController.groovy</b>

class MyController {

    def index = { }

    def  run = {
    		MyCommand cmd ->

    		if(cmd.hasErrors()){
    			render(view:"error")
    		}else{
    			render(view:"ok")
    		}
    }
}

class MyCommand {
	String login
	String passwd1
	String passwd2

	static constraints = {
		login(blank:false, size:5..15, validator: {
			it=="foobar"
		})
		passwd1(blank:false, validator: { val, obj ->
			obj.properties['passwd2']==val
		})
	}
}

</pre>
<p>The important closure for the upcoming test is called &#8220;run&#8221;.<br />
As an argument it takes a command object.<br />
The springframework behind the scenes is taking care, that all request params are properly mapped to the command object (MyCommand).<br />
Furthermore the command object&#8217;s constraints are executed prior any other line of code in the &#8220;run&#8221; closure.<br />
A powerful feature if you ask me :O)</p>
<p>The command class itself is in charge of all the validation work. As outlined in the grails docs (very good ones indeed) all domain oriented constraints<br />
can be applied to non domain validation objects as well. </p>
<p>The contraint:</p>
<pre>
<p style="border: 1px solid black; overflow: auto; width: 100%; height: 50px">
login(blank:false, size:5..15, validator: {
	it=="foobar"
})

</pre>
<p>for example adds an error if the param login is null, if its length is smaller 5 chars or greate 15, or if the validator is returning anything else than null.<br />
Adding an error ?<br />
Grails is making extensive use of  spring&#8217;s error handling. Have a look at their excellent docs.<br />
For each error, an error object is added to the command object. The controller checks for errors in the command validation and can redirect back to the form if needed. </p>
<h2>The test class</h2>
<pre>
<p style="border: 1px solid black; overflow: auto; width: 100%; height: 180px">
<b>test/integration/MyControllerTests.groovy</b>

import grails.test.*

class MyControllerTests extends ControllerUnitTestCase {
    protected void setUp() {
        super.setUp()
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testValidCommand() {
    	def cmd = new MyCommand(login:"foobar", passwd1:"password", passwd2:"password")
    	def cntr = new MyController()
    	cntr.run(cmd)
    	assert "ok" == cntr.modelAndView.view
    }

    void testInvalidCommand() {
    	def cmd = new MyCommand(login:"foobar", passwd1:"password", passwd2:"not-equals")
    	def cntr = new MyController()
    	cntr.run(cmd)
    	//println cmd.errors.allErrors
    	println "field error " + cmd.errors.fieldError
    	assert 'passwd1' == cmd.errors.getFieldError('passwd1').field
    	assert 'validator.invalid' == cmd.errors.getFieldError('passwd1').code
    }
}

</pre>
<p> The test itself is simple. You have to create a command object that you use as the request object when calling the &#8220;run&#8221; closure within the controller.<br />
The way I evaluate an error is ok, but not as good as I wanted it to be.<br />
Grails ships with an enhanced way to handle message codes. Instead of letting the developer create a message key for each error,  Grails makes strong usage of their convention over configuration approach by automatically assigning errors to dedicated message keys.<br />
The error key for the login:blank constraint would be mapped in  <b>grails-app/i18n/messages.properties</b>  as:<i>myCommand.login.blank</i>.<br />
Again the time consuming job of assigning messages keys to errors is omitted. </p>
<p>What I was not yet able to achieve is to fetch the associated error key for a given constraint within a test case.<br />
So, what I am looking for is a line like:</p>
<pre>
assert 'myCommand.login.blank' == cmd.errors.getField('login').???
</pre>
<p>Well, I hope that this blog helped you a bit. Yo may leave a comment or try to reach my directly using the steademy plugin and invite me (tmaus@steademy.com) from within the firefox plugin. </p>
<p>Have a nice day</p>
<p>Thorsten </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steademy.com/2009/04/13/grails-command-validation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Login user against Steademy API</title>
		<link>http://blog.steademy.com/2009/03/20/cross-service-communication/</link>
		<comments>http://blog.steademy.com/2009/03/20/cross-service-communication/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 07:00:47 +0000</pubDate>
		<dc:creator>tmaus</dc:creator>
				<category><![CDATA[Groovy & Grails]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://blog.steademy.com/2009/03/20/cross-service-communication/</guid>
		<description><![CDATA[Steademy exposes a public API that allows any third party tool to directly connect to steademy. My first blog outlines the groovy &#38; grails way to login against the steademy platform and to receive a valid sessionKey. The steademy sessionKey uniquely identifies a user at our platform. You have to deliver it with every consequent [...]]]></description>
			<content:encoded><![CDATA[<p>Steademy exposes a public <a href="http://api.steademy.com">API</a> that allows any third party tool to directly connect to steademy.<br />
My first blog outlines the groovy &amp; grails way to login against the steademy platform and to receive a valid sessionKey.</p>
<p>The steademy sessionKey uniquely identifies a user at our platform. You have to deliver it with every consequent request. </p>
<p>We accept simple POST based requests and return JSON strings. </p>
<h2>Setup:</h2>
<p>You basically need to setup a grails project (<em>grails create-app</em> std), and create your service (<em>grails create-service steademy</em>)<br />
Furthermore the <a href="http://www.grails.org/XFire+plugin">xfire plugin</a> needs to be nstalled into your grails project.<br />
I downloaded release 0.8.1 from <a href="http://svn.codehaus.org/grails-plugins/grails-xfire/trunk/grails-xfire-0.8.1.zip">here</a></p>
<h2> Adjust config</h2>
<p>Getting rid of static properties in our class is our first goal<br />
We therefore add a couple of new lines into <i>grails-conf/Config.groovy</i><br />
Grails provides a very elegant way to read properties from the config file. </p>
<pre>
<p style="border: 1px solid black; overflow: auto; width: 100%; height: 80px">
<b>grails-app/conf/Config.groovy</b>

std{
  msapi{
    url = "https://steademy.com
    login.path="/msapi/Login"
  }
}

</pre>
<p></code></p>
<h2>SteademyService</h2>
<p>Our groovy driven service only needs a couple of code-lines for proper execution.</p>
<pre>
<p style="border: 1px solid black; overflow: auto; width: 100%; height: 180px">
<b>grails-service/SteademyService.groovy</b>

...
class SteademyService implements InitializingBean{
    boolean transactional = true
    def grailsApplication

    def msapi
    def crs

    void afterPropertiesSet(){
    	msapi 	= grailsApplication.config.std.msapi
    	crs 	= grailsApplication.config.std.crs
    }
...

String loginUser(String login, String password){
    	log.debug "remote login to steademy using [login:${login}] [password:${password}]"
    	def builder = new HTTPBuilder(msapi.url+msapi.login.path)

    	builder.request(POST, JSON){ req ->
		send URLENC,[login:login, password:password, appId:"12345678", appversion:"1.0"] 

                response.success = {resp,json ->
			if(json.error){
				log.debug "ERROR: ${json.error}"
				return null
			}

		return json.steademy.sessionKey
	       }

    		response.failure = {
		    log.debug "url ${msapi.url}/${msapi.login.path} not valid"
    		    return null
    		}
    	}
    }
}

</pre>
<ul>
<li> The service implements the <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/InitializingBean.html">Initalizing Bean</a>. Thus the method <i>afterPropertiesSet</i> is called once all properties have been initialized by spring.
<li> We directly reference the properties set in the <b>grails-app/conf/Config.groovy</b> file by defining the <b>grailsApplication</b> object. Grails/Spring in the backend takes care for its proper binding. The command <i>grailsApplication.config.std.crs</i> finally reads the corresponding property from with the config file.
</ul>
<p>The actual login method is quite simple. Due to grails perfect support for JSON and thanks to the <a href="http://groovy.codehaus.org/modules/http-builder/">http-builder</a> project, some simple lines of code connect to the steademy api and process the user login. </p>
<h2>SteademyServiceTest</h2>
<p>Lets step forward to our test. If you created the service in the grails way, there should exist a groovy class called. <b>test/integration/SteademyServiceTest</b>. </p>
<pre>
<p style="border: 1px solid black; overflow: auto; width: 100%; height: 150px">
<b>SteademyServicetest</b> 

...
def steademyService
	void testSteademyLogin(){
		steademyService.loginUser("foo", "bar")
	}

</pre>
<p>Thats it basically.<br />
The next blog will outline a couple of more API calls that allow us to send messages through steademy. </p>
<p>Thorsten Maus</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steademy.com/2009/03/20/cross-service-communication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Groovy and Grails : My weekly blog</title>
		<link>http://blog.steademy.com/2009/03/15/groovy-and-grails-my-weekly-blog/</link>
		<comments>http://blog.steademy.com/2009/03/15/groovy-and-grails-my-weekly-blog/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 11:06:59 +0000</pubDate>
		<dc:creator>tmaus</dc:creator>
				<category><![CDATA[Groovy & Grails]]></category>
		<category><![CDATA[goovy]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://blog.steademy.com/?p=27</guid>
		<description><![CDATA[I have started to investigate in Groovy &#038; Grails more by accident than by practical means. A Berlin company was looking for a freelancer with knowhow in G&#038;G that I was not able to deliver. I consequently used my spare time to dive into G&#038;G for a couple of months. The upcoming blogs will outline [...]]]></description>
			<content:encoded><![CDATA[<p>I have started to investigate in Groovy &#038; Grails more by accident than by practical means. A Berlin company was looking for a freelancer with knowhow in G&#038;G that I was not able to deliver.<br />
I consequently used my spare time to dive into G&#038;G for a couple of months.<br />
The upcoming blogs will outline topics that might be interesting for others to follow.<br />
At steademy, we use G&#038;G for chatroom administration and chatroom communication where as the rest of our platform runs on s2ap from springsource. </p>
<p>Thorsten Maus</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steademy.com/2009/03/15/groovy-and-grails-my-weekly-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>maven-par-plugin</title>
		<link>http://blog.steademy.com/2008/05/29/maven-par-plugin/</link>
		<comments>http://blog.steademy.com/2008/05/29/maven-par-plugin/#comments</comments>
		<pubDate>Thu, 29 May 2008 09:50:22 +0000</pubDate>
		<dc:creator>steademy</dc:creator>
				<category><![CDATA[OSGI]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://blog.steademy.com/?p=6</guid>
		<description><![CDATA[Introduction The maven-par-plugin was designed to allow developers create s2ap compliant par packages and deploy them to the platform. This plugin might not work for any other purpose. Usage A long howto is not required as the purpose of this plugin should be clear. Thus I will concentrate on the configuration and a simple usage [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong><br />
The maven-par-plugin was designed to allow developers create s2ap compliant par packages and deploy them to the platform. This plugin might not work for any other purpose.</p>
<p><strong>Usage</strong></p>
<p>A long howto is not required as the purpose of this plugin should be clear. Thus I will concentrate on the configuration and a simple usage pattern.</p>
<p>The infrastructure pom.xml acts as an example of how this plugin is used on our platform.<br />
The initial directory structure looks like:</p>
<pre>infrastructure
  | --&gt; hsqldb
  | --&gt; par
</pre>
<p><strong>par/pom.xml</strong></p>
<pre name="code" class="xml">
      <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
              <modelVersion>4.0.0</modelVersion>
              <artifactId>infrastructure-par</artifactId>
              <version>${service.version}</version>
              <name>S2AP Par bundle</name>
<packaging>par</packaging>
              <description>So long and thanks for all the fish</description>
              <repositories>
         <repository>
           <id>steademy</id>
           <name>Staademy repository</name>
           <url>http://repo.steademy.com/beta/maven2</url>
         </repository>
       </repositories>
<parent>
                <groupId>com.steademy.service.infrastructure</groupId>
                <artifactId>parent</artifactId>
                <version>SNAPSHOT</version>
              </parent>

              <dependencies>
                      <dependency>
                              <groupId>com.steademy.service.infrastructure</groupId>
                              <artifactId>hsqldb</artifactId>
                              <version>${service.version}</version>
                      </dependency>
              </dependencies>

              <build>
<plugins>
<plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-par-plugin</artifactId>
                    <version>0.2.0</version>
                    <configuration>
                       <fqn>true</fqn>
                       <applicationSymbolicName>com.steademy.service.infrastructure</applicationSymbolicName>
                       <applicationVersion>1.0.0</applicationVersion>
                       <applicationDescription>The db infrastructure</applicationDescription>
                       <applicationName>Application DB infrastructure</applicationName>
                   </configuration>
                 </plugin>
              </plugins>
             </build>
      </project>
</pre>
<p><strong>The repository</strong></p>
<p>In order to properly use the maven-par-plugin, you have to pick it up from our repository.<br />
The following repository entry must be added to your pom’s repository entries:</p>
<pre name="code" class="xml">
     <repositories>
          <repository>
            <id>steademy</id>
            <name>Steademy repository</name>
            <url>http://repo.steademy.com/beta/maven2</url>
          </repository>
       </repositories>
</pre>
<p>The packaging must be changed to par.</p>
<p><strong>par</strong></p>
<p><em>Dependencies</em><br />
The par/pom.xml simply aggregates all direct dependencies it finds. It does neither care about scopes nor indirect dependencies.</p>
<p><em>Plugin configuration</em></p>
<pre name="code" class="xml">
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-par-plugin</artifactId>
        <version>0.2.0</version>
        <configuration>
             <fqn>true</fqn>
             <applicationSymbolicName>com.steademy.service.infrastructure</applicationSymbolicName>
             <applicationVersion>1.0.0</applicationVersion>
             <applicationDescription>The db infrastructure</applicationDescription>
             <applicationName>Application DB infrastructure</applicationName>
        </configuration>
     </plugin>
</pre>
<p>Explaining the tags in right order:</p>
<p>1. groupId -&gt; We use the default maven groupId<br />
2. artifactId -&gt; Do I need to tell you about it ???<br />
3. version -&gt; latest “stable” version is 0.2.0</p>
<p>You will use the configuration in order to describe the final .par related META-INF/MANIFEST.MF file.<br />
The tags applicationSymbolicName, applicationVersion, applicationDescription &amp; applicationName have been defined and set mandatory by the springsource guys. Our plugin will pickup your personal settings and create the MANIFEST.MF file accordingly.</p>
<p>The fqn (fully qualified naming) allows to create artifact files using the pattern</p>
<p>${groupId}.${artifactId}</p>
<p><em>Example:</em><br />
Our infrastructure par with fqn=true looks echos the following log entries:</p>
<pre>[INFO] infrastructure-par
[INFO] artifact hsqldb is copied with fully qualified name com.steademy.service.infrastructure.hsqldb-SNAPSHOT
[INFO] added com.steademy.service.infrastructure.hsqldb-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing /home/tmaus/workspaces/beta-01/infrastructure/par/target/infrastructure-par-SNAPSHOT.par to /home/tmaus/.m2/repository/com/steademy/service/infrastructure/infrastructure-par/SNAPSHOT/infrastructure-par-SNAPSHOT.par
</pre>
<p>The same maven build using  fqn=false would produce the following log:</p>
<pre>[INFO] infrastructure-par
[INFO] added hsqldb.jar
[INFO] [install:install]
[INFO] Installing /home/tmaus/workspaces/beta-01/infrastructure/par/target/infrastructure-par-SNAPSHOT.par to /home/tmaus/.m2/repository/com/steademy/service/infrastructure/infrastructure-par/SNAPSHOT/infrastructure-par-SNAPSHOT.par
</pre>
<p>Switching this tag to true increases the readability of the deployed bundles within your s2ap/admin extremely.</p>
<p>So long and thanks for all the fish</p>
<p>t.maus</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steademy.com/2008/05/29/maven-par-plugin/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Steademy Introduction</title>
		<link>http://blog.steademy.com/2008/05/03/steademy-introduction/</link>
		<comments>http://blog.steademy.com/2008/05/03/steademy-introduction/#comments</comments>
		<pubDate>Sat, 03 May 2008 17:48:57 +0000</pubDate>
		<dc:creator>steademy</dc:creator>
				<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://blog.steademy.com/?p=4</guid>
		<description><![CDATA[Steademy technology is based on SOA with OSGI and Spring.]]></description>
			<content:encoded><![CDATA[<p>Steademy technology is based on SOA with <a title="Open Services Gateway initiative" href="http://www.osgi.org">OSGI</a> and <a title="spring framework" href="http://springframework.org">Spring</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.steademy.com/2008/05/03/steademy-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
