gpgsm key creation problem

Lurkos lurkos.usenet at gmail.com
Mon Mar 30 00:54:07 CEST 2009


First of all excuse me for the long delay.
You can find the information requested below.
I hope this is enough.
Thanks!

*Werner Koch* wrote:
>> I'm new in gpgsm and I would like to test X.509 and S/MIME style encryption.
>> Then I tried the "classical" --gen-key option to generate a new
>> keypair, but this error appears.
>> What's wrong?
>>
>> gpgsm: line 1: key generation failed: Unknown IPC command <GpgSM>
> Most likely the gpg-agent is not running or not properly installed.
> Check the manual on how to do install the gpg-agent.

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.2"

# apt-get install gnupg-agent

$ apt-cache policy gpgsm gnupg-agent
gpgsm:
  Installed: 2.0.7-1
  Candidate: 2.0.7-1
  Version table:
 *** 2.0.7-1 0
        500 http://it.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status
gnupg-agent:
  Installed: 2.0.7-1
  Candidate: 2.0.7-1
  Version table:
 *** 2.0.7-1 0
        500 http://it.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

> A quick test to see whether the gpg-agent is working is to run
> gpg-agent without any options.
> You may want to configure a log file for the gpg-agent to see what is
> going on.  Put these lines into ~/.gnupg/gpg-agent.conf before starting
> gpg-agent:
> ======
> log-file /somewhere/gpg-agent.log
> debug 1024
> verbose
> =======
> In the log you should see a "GENKEY" command.

This the transcription of the output which I obtained.

lurkos at laptop:~$ LANG=en_US.UTF-8

lurkos at laptop:~$ export LANG

lurkos at laptop:~$ cat .gnupg/gpg-agent.conf 
log-file /tmp/gpg-agent.log
debug 1024
verbose

lurkos at laptop:~$ gpg-agent --daemon
GPG_AGENT_INFO=/tmp/gpg-lkV8GJ/S.gpg-agent:3922:1; export GPG_AGENT_INFO;

lurkos at laptop:~$ gpg-agent
gpg-agent: gpg-agent running and available
gpg-agent: secmem usage: 0/32768 bytes in 0 blocks

lurkos at laptop:~$ gpgsm --gen-key
gpgsm (GnuPG) 2.0.7; Copyright (C) 2007 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please select what kind of key you want:
   (1) RSA
   (2) Existing key
   (3) Existing key from card
Your selection? 1
What keysize do you want? (2048) 
Requested keysize is 2048 bits
Possible actions for a RSA key:
   (1) sign, encrypt
   (2) sign
   (3) encrypt
Your selection? 1
Enter the X.509 subject name: CN=Test
Enter email addresses (end with an empty line):
> test at mail.invalid
> 
Enter DNS names (optional; end with an empty line):
> 
Enter URIs (optional; end with an empty line):
> 
Parameters to be used for the certificate request:
    Key-Type: RSA
    Key-Length: 2048
    Key-Usage: sign, encrypt
    Name-DN: CN=Test
    Name-Email: test at mail.invalid

Really create request? (y/N) y
Now creating certificate request.  This may take a while ...
gpgsm: line 1: key generation failed: No pinentry <GPG Agent>
gpgsm: error creating certificate request: No pinentry <GPG Agent>

lurkos at laptop:~$ cat /tmp/gpg-agent.log 
gpg-agent[1702.0] DBG: -> OK Pleased to meet you
2009-03-30 00:38:31 gpg-agent[2703] listening on socket
`/tmp/gpg-cAKKBI/S.gpg-agent'
2009-03-30 00:38:31 gpg-agent[2787] handler 0x8097e38 for fd 9 started
gpg-agent[2787.9] DBG: -> OK Pleased to meet you
gpg-agent[2787.9] DBG: <- AGENT_ID
gpg-agent[2787.9] DBG: -> ERR 67109139 Comando IPC sconosciuto <GPG
Agent>
gpg-agent[2787.9] DBG: <- [EOF]
2009-03-30 00:38:31 gpg-agent[2787] handler 0x8097e38 for fd 9 terminated
2009-03-30 00:38:51 gpg-agent[3057] listening on socket
`/tmp/gpg-0eJXxA/S.gpg-agent'
2009-03-30 00:38:58 gpg-agent[2787] handler 0x8097e38 for fd 9 started
gpg-agent[2787.9] DBG: -> OK Pleased to meet you
gpg-agent[2787.9] DBG: <- BYE
gpg-agent[2787.9] DBG: -> OK closing connection
2009-03-30 00:38:58 gpg-agent[2787] handler 0x8097e38 for fd 9 terminated
2009-03-30 00:39:16 gpg-agent[2787] handler 0x8097e38 for fd 9 started
gpg-agent[2787.9] DBG: -> OK Pleased to meet you
gpg-agent[2787.9] DBG: <- RESET
gpg-agent[2787.9] DBG: -> OK
gpg-agent[2787.9] DBG: <- OPTION display=:0.0
gpg-agent[2787.9] DBG: -> OK
gpg-agent[2787.9] DBG: <- OPTION ttyname=/dev/pts/0
gpg-agent[2787.9] DBG: -> OK
gpg-agent[2787.9] DBG: <- OPTION ttytype=xterm
gpg-agent[2787.9] DBG: -> OK
gpg-agent[2787.9] DBG: <- OPTION lc-ctype=it_IT.UTF-8
gpg-agent[2787.9] DBG: -> OK
gpg-agent[2787.9] DBG: <- OPTION lc-messages=it_IT.UTF-8
gpg-agent[2787.9] DBG: -> OK
gpg-agent[2787.9] DBG: <- RESET
gpg-agent[2787.9] DBG: -> OK
gpg-agent[2787.9] DBG: <- GENKEY
gpg-agent[2787.9] DBG: -> INQUIRE KEYPARAM
gpg-agent[2787.9] DBG: <- D (6:genkey(3:rsa(5:nbits4:2048)))
gpg-agent[2787.9] DBG: <- END
2009-03-30 00:39:16 gpg-agent[2787] starting a new PIN Entry
2009-03-30 00:39:16 gpg-agent[2787] can't connect to the PIN entry
module: IPC connect call failed
2009-03-30 00:39:16 gpg-agent[2787] command genkey failed: Nessun
pinentry disponibile
gpg-agent[2787.9] DBG: -> ERR 67108949 Nessun pinentry disponibile <GPG
Agent>
gpg-agent[2787.9] DBG: <- [EOF]
2009-03-30 00:39:16 gpg-agent[2787] handler 0x8097e38 for fd 9 terminated
2009-03-30 00:42:35 gpg-agent[2787] parent process died - shutting down
2009-03-30 00:42:35 gpg-agent[2787] gpg-agent (GnuPG) 2.0.7 stopped
2009-03-30 00:42:35 gpg-agent[2787] secmem usage: 0/32768 bytes in 0
blocks
2009-03-30 00:42:46 gpg-agent[3357] listening on socket
`/tmp/gpg-NLC81b/S.gpg-agent'
2009-03-30 00:42:46 gpg-agent[3441] handler 0x8097e38 for fd 9 started
gpg-agent[3441.9] DBG: -> OK Pleased to meet you
gpg-agent[3441.9] DBG: <- AGENT_ID
gpg-agent[3441.9] DBG: -> ERR 67109139 Comando IPC sconosciuto <GPG
Agent>
gpg-agent[3441.9] DBG: <- [EOF]
2009-03-30 00:42:46 gpg-agent[3441] handler 0x8097e38 for fd 9 terminated
2009-03-30 00:44:06 gpg-agent[3921] listening on socket
`/tmp/gpg-lkV8GJ/S.gpg-agent'
2009-03-30 00:44:11 gpg-agent[3441] handler 0x8097e38 for fd 9 started
gpg-agent[3441.9] DBG: -> OK Pleased to meet you
gpg-agent[3441.9] DBG: <- BYE
gpg-agent[3441.9] DBG: -> OK closing connection
2009-03-30 00:44:11 gpg-agent[3441] handler 0x8097e38 for fd 9 terminated
2009-03-30 00:44:33 gpg-agent[3441] handler 0x8097e38 for fd 9 started
gpg-agent[3441.9] DBG: -> OK Pleased to meet you
gpg-agent[3441.9] DBG: <- RESET
gpg-agent[3441.9] DBG: -> OK
gpg-agent[3441.9] DBG: <- OPTION display=:0.0
gpg-agent[3441.9] DBG: -> OK
gpg-agent[3441.9] DBG: <- OPTION ttyname=/dev/pts/0
gpg-agent[3441.9] DBG: -> OK
gpg-agent[3441.9] DBG: <- OPTION ttytype=xterm
gpg-agent[3441.9] DBG: -> OK
gpg-agent[3441.9] DBG: <- OPTION lc-ctype=en_US.UTF-8
gpg-agent[3441.9] DBG: -> OK
gpg-agent[3441.9] DBG: <- OPTION lc-messages=en_US.UTF-8
gpg-agent[3441.9] DBG: -> OK
gpg-agent[3441.9] DBG: <- RESET
gpg-agent[3441.9] DBG: -> OK
gpg-agent[3441.9] DBG: <- GENKEY
gpg-agent[3441.9] DBG: -> INQUIRE KEYPARAM
gpg-agent[3441.9] DBG: <- D (6:genkey(3:rsa(5:nbits4:2048)))
gpg-agent[3441.9] DBG: <- END
2009-03-30 00:44:33 gpg-agent[3441] starting a new PIN Entry
2009-03-30 00:44:33 gpg-agent[3441] can't connect to the PIN entry
module: IPC connect call failed
2009-03-30 00:44:33 gpg-agent[3441] command genkey failed: Nessun
pinentry disponibile
gpg-agent[3441.9] DBG: -> ERR 67108949 Nessun pinentry disponibile <GPG
Agent>
gpg-agent[3441.9] DBG: <- [EOF]
2009-03-30 00:44:34 gpg-agent[3441] handler 0x8097e38 for fd 9
terminated

-- 
Lurkos




More information about the Gnupg-users mailing list