GnuPG 1.9.16/17 (S/MIME and gpg-agent) , importing pkcs12 fails: Invalid digest algorithm

thomas schorpp t.schorpp at gmx.de
Tue Jun 21 14:47:55 CEST 2005


Werner Koch wrote:
> On Tue, 21 Jun 2005 12:17:37 +0200, thomas schorpp said:
> 

> Ah you were talking about a private key - I have not checked this for
> a long time.  Will do so later.

ok

> 
> 
>>schorpp at tom1:~/data/tcom$ gpg-agent --daemon
>>GPG_AGENT_INFO=/tmp/gpg-xXQRRa/S.gpg-agent:14368:1; export GPG_AGENT_INFO;
> 
> 
>   @noindent
>   The usual way to run the agent is from the @code{~/.xsession} file:
>   
>   @example
>   eval `gpg-agent --daemon`
>   @end example
> 
> Note, the eval to get the stuff into your environment.  Another and
> probably more elegant way is by using a new option:
> 
>   gpg-agent --daemon --write-env-file $HOME/.gpg-agent-info

yes, tried this sooner, file is there this time again, result:

schorpp at tom1:~/data/tcom$ gpgsm --import cacert-schorpp.p12
gpgsm: NOTE: THIS IS A DEVELOPMENT VERSION!
gpgsm: It is only intended for test purposes and should NOT be
gpgsm: used in a production environment or with production keys!
gpgsm: gpgsm: GPG_TTY has not been set - using maybe bogus default
gpgsm: gpg-protect-tool: gpg-agent is not available in this session
gpgsm: gpg-protect-tool: error while asking for the passphrase: Invalid
digest algorithm
gpgsm: error running `/usr/local/libexec/gpg-protect-tool': exit status 2
gpgsm: total number processed: 0
random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
              outmix=0 getlvl1=0/0 getlvl2=0/0
secmem usage: 0/16384 bytes in 0 blocks
schorpp at tom1:~/data/tcom$

socket is there in /tmp and listening:

schorpp at tom1:~/data/tcom$ netstat -ap|grep gpg-agent
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
unix  2      [ ACC ]     STREAM     LISTENING     92640
16531/gpg-agent     /tmp/gpg-jZ9CUq/S.gpg-agent
schorpp at tom1:~/data/tcom$

> 
> and then sourcing this file.  This makes it pretty easy to carry the
> information to other sessions by adding for example
> 
> [ -f "$HOME/.gpg-agent-info" ] && . "$HOME/.gpg-agent-info"
> 
> to your .bashrc or .profile.  While we are at it:  What I am using is
> a script named ssh-agent:
> 
>   #!/bin/sh
>   exec /usr/local/bin/gpg-agent --daemon \
>        --write-env-file $HOME/.gpg-agent-info \
>        --enable-ssh-support "$@"
> 
> which replaces the orginal ssh-agent.  The only drawback is that it
> won't work with ssh 1 keys - but I doubt that they are still in wide
> use.
> 

ok

schorpp at tom1:~$ /usr/local/bin/gpg-agent --daemon --write-env-file
$HOME/.gpg-agent-info --enable-ssh-support
can't connect to `/home/schorpp/.gnupg/log-socket': Connection refused
GPG_AGENT_INFO=/tmp/gpg-Rs2cfT/S.gpg-agent:16862:1; export GPG_AGENT_INFO;
SSH_AUTH_SOCK=/tmp/gpg-mFO8pC/S.gpg-agent.ssh; export SSH_AUTH_SOCK;
SSH_AGENT_PID=16862; export SSH_AGENT_PID;

no go:

schorpp at tom1:~/data/tcom$ gpgsm --import cacert-schorpp.p12
gpgsm: NOTE: THIS IS A DEVELOPMENT VERSION!
gpgsm: It is only intended for test purposes and should NOT be
gpgsm: used in a production environment or with production keys!
gpgsm: gpgsm: GPG_TTY has not been set - using maybe bogus default
gpgsm: gpg-protect-tool: gpg-agent is not available in this session

gpgsm: signal Segmentation fault caught ... exiting
Segmentation fault XXXX reproducible at first call after starting agent XXX

gpgsm: used in a production environment or with production keys!
gpgsm: gpgsm: GPG_TTY has not been set - using maybe bogus default
gpgsm: gpg-protect-tool: gpg-agent is not available in this session

Program received signal SIGSEGV, Segmentation fault.
0xb7f39ad1 in pth_key_getdata () from /usr/lib/libpth.so.20
(gdb)
(gdb) bt
#0  0xb7f39ad1 in pth_key_getdata () from /usr/lib/libpth.so.20
#1  0xb7f38e97 in pth_event () from /usr/lib/libpth.so.20
#2  0xb7f3bcd1 in pth_waitpid () from /usr/lib/libpth.so.20
#3  0x0806e401 in gnupg_wait_process (pgmname=0x8073e60
"/usr/local/libexec/gpg-protect-tool", pid=16959) at exechelp.c:448
#4  0x08062861 in parse_p12 (ctrl=0x0, reader=0x0, retfp=0xbffff678,
stats=0xbffff6c0) at import.c:637
#5  0x080621a6 in import_one (ctrl=0xbffff7a0, stats=0xbffff6c0,
in_fd=0) at import.c:335
#6  0x08062553 in gpgsm_import_files (ctrl=0xbffff7a0, nfiles=1,
files=0xbffff8cc, of=0x804eae0 <open_read>)
    at import.c:441
#7  0x0804d868 in main (argc=1, argv=0xbffff8cc) at gpgsm.c:1536
(gdb)

schorpp at tom1:~/data/tcom$
schorpp at tom1:~/data/tcom$ gpgsm --import cacert-schorpp.p12
gpgsm: NOTE: THIS IS A DEVELOPMENT VERSION!
gpgsm: It is only intended for test purposes and should NOT be
gpgsm: used in a production environment or with production keys!
gpgsm: gpgsm: GPG_TTY has not been set - using maybe bogus default
gpgsm: gpg-protect-tool: gpg-agent is not available in this session
gpgsm: gpg-protect-tool: error while asking for the passphrase: Invalid
digest algorithm
gpgsm: error running `/usr/local/libexec/gpg-protect-tool': exit status 2
gpgsm: total number processed: 0
random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
              outmix=0 getlvl1=0/0 getlvl2=0/0
secmem usage: 0/16384 bytes in 0 blocks
schorpp at tom1:~/data/tcom$

btw, 1.9.15 debian packs are failing same way.

y
tom



More information about the Gnupg-devel mailing list