BTW, this appears to be a Windows problem (I'm running Windows 7 64-bit). I've just tried it again on Ubuntu 12.04 and it works perfectly fine, the keys are generated properly, etc. Here's the dump from Ubuntu:
Code:
root@razubuntu:~# gpg --card-edit
Application ID ...: D2760001240102000000000000010000
Version ..........: 2.0
Manufacturer .....: test card
Serial number ....: 00000001
Name of cardholder: [not set]
Language prefs ...: [not set]
Sex ..............: unspecified
URL of public key : [not set]
Login data .......: [not set]
Signature PIN ....: forced
Key attributes ...: 2048R 2048R 2048R
Max. PIN lengths .: 127 127 127
PIN retry counter : 3 3 3
Signature counter : 1
Signature key ....: 1023 B45B C60F E018 E2BD CD35 1B65 1325 FF26 A9CB
created ....: 2013-04-08 17:25:43
Encryption key....: [none]
Authentication key: [none]
General key info..: [none]
gpg/card> admin
Admin commands are allowed
gpg/card> generate
gpg: NOTE: keys are already stored on the card!
Replace existing keys? (y/N) y
Please note that the factory settings of the PINs are
PIN = `123456' Admin PIN = `12345678'
You should change them using the command --change-pin
gpg: gpg-agent is not available in this session
gpg: 3 Admin PIN attempts remaining before card is permanently locked
Please enter the Admin PIN
Please enter the PIN
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0)
Key does not expire at all
Is this correct? (y/N) y
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
Real name: Razvan Dragomirescu
Email address: razvan.dragomirescu@gmail.com
Comment:
You selected this USER-ID:
"Razvan Dragomirescu <razvan.dragomirescu@gmail.com>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
gpg: existing key will be replaced
gpg: please wait while key is being generated ...
gpg: key generation completed (19 seconds)
gpg: signatures created so far: 0
gpg: generating new key
gpg: please wait while key is being generated ...
gpg: key generation completed (33 seconds)
gpg: signatures created so far: 1
gpg: signatures created so far: 2
gpg: generating new key
gpg: please wait while key is being generated ...
gpg: key generation completed (24 seconds)
gpg: signatures created so far: 3
gpg: signatures created so far: 4
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 690956B8 marked as ultimately trusted
public and secret key created and signed.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
pub 2048R/690956B8 2013-04-08
Key fingerprint = 7EA9 5CC8 F988 80AF CEEA CBD8 C73C 8BE2 6909 56B8
uid Razvan Dragomirescu <razvan.dragomirescu@gmail.com>
sub 2048R/CBF95AE0 2013-04-08
sub 2048R/C7B78E8E 2013-04-08