How to test my build of gpg2?

Andrey Jivsov openpgp at brainhub.org
Thu May 9 02:33:40 CEST 2013


I wonder what's the process of running my own build of gpg2?

I am getting the error:
> gpg: agent_genkey failed: Unsupported certificate
> Key generation failed: Unsupported certificate

when I generate a default RSA key, as bellow. I think this is where the 
password dialog would come up.

I think I followed all the steps that I did in the past that were 
needed, but I am getting an error. There used to be a pinentry, but I 
don't see it being built now, so I didn't do any replacement for the 
pinentry.

The code is the latest from git+ssh://playfair.gnupg.org/git/gnupg

Thank you.

> /usr/local/gpg2ecc/bin/gpg2 --gen-key
> gpg (GnuPG) 2.1.0-beta210; Copyright (C) 2012 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.
>
> gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
> gpg: It is only intended for test purposes and should NOT be
> gpg: used in a production environment or with production keys!
> Please select what kind of key you want:
>    (1) RSA and RSA (default)
>    (2) DSA and Elgamal
>    (3) DSA (sign only)
>    (4) RSA (sign only)
> Your selection? 1
> RSA keys may be between 1024 and 4096 bits long.
> What keysize do you want? (2048)
> Requested keysize is 2048 bits
> 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
>
> GnuPG needs to construct a user ID to identify your key.
>
> Real name: testrsa
> Email address:
> Comment:
> You selected this USER-ID:
>     "testrsa"
>
> Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
> We need to generate a lot of random bytes. It is a good idea to perform
> some other action (type on the keyboard, move the mouse, utilize the
> disks) during the prime generation; this gives the random number
> generator a better chance to gain enough entropy.
> gpg: agent_genkey failed: Unsupported certificate
> Key generation failed: Unsupported certificate

I launched my own version of the agent:
> andrey at sandy gnupg $ ./agent/gpg-agent --daemon --write-env-file 
> ./gpg-agent-info --enable-ssh-support --debug-all 
> --allow-preset-passphrase --verbose --log-file ./gpg-agent-verbose.log
> gpg-agent[14011]: NOTE: no default option file 
> '/home/andrey/.gnupg/gpg-agent.conf'
> gpg-agent[14011]: enabled debug flags: command mpi crypto memory cache 
> memstat hashing assuan
> GPG_AGENT_INFO=/home/andrey/.gnupg/S.gpg-agent:14012:1; export 
> GPG_AGENT_INFO;
> SSH_AUTH_SOCK=/home/andrey/.gnupg/S.gpg-agent.ssh; export SSH_AUTH_SOCK;

I made sure that the libraries that I built are used:
> andrey at sandy gnupg $ ldd /usr/local/gpg2ecc/bin/gpg2
>     linux-vdso.so.1 =>  (0x00007fff74c7f000)
>     libz.so.1 => /lib64/libz.so.1 (0x00007f0c294e4000)
>     libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f0c292d3000)
>     libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f0c290ba000)
>     libreadline.so.6 => /lib64/libreadline.so.6 (0x00007f0c28e75000)
>     libgcrypt.so.20 => /usr/local/gpg2ecc/lib/libgcrypt.so.20 
> (0x00007f0c28bb3000)
>     libgpg-error.so.0 => /usr/local/gpg2ecc/lib/libgpg-error.so.0 
> (0x00007f0c289af000)
>     libksba.so.8 => /usr/local/gpg2ecc/lib/libksba.so.8 
> (0x00007f0c2877a000)
>     libassuan.so.0 => /usr/local/gpg2ecc/lib/libassuan.so.0 
> (0x00007f0c28566000)
>     libc.so.6 => /lib64/libc.so.6 (0x00007f0c281af000)
>     libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f0c27f86000)
>     /lib64/ld-linux-x86-64.so.2 (0x00007f0c29723000)

gpg-agent-verbose.log contains entries like:
> 2013-05-08 16:26:59 gpg-agent[20517] handler 0x7fe91fa08700 for fd 7 
> terminated
> 2013-05-08 16:27:59 gpg-agent[20517] handler 0x7fe920209700 for fd 7 
> started
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_7 -> OK Pleased to meet 
> you, process 20517
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_6 <- OK Pleased to meet 
> you, process 20517
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_6 -> GETINFO pid
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_7 <- GETINFO pid
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_7 -> D 20517
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_7 -> OK
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_6 <- D 20517
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_6 <- OK
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_6 -> BYE
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_7 <- BYE
> 2013-05-08 16:27:59 gpg-agent[20517] DBG: chan_7 -> OK closing connection




More information about the Gnupg-devel mailing list