Problem in Key Deletion? help to delete the keys
Thanga Prakash S
thanga at midascomm.com
Mon Jul 22 17:13:01 CEST 2002
Sample code execution in gdb
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RedHat Linux 7.2
GNUPG 1.0.7
GPGME 0.3.8
GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) b gpgme_op_delete
Breakpoint 1 at 0x8048700
(gdb) r
Breakpoint 1, gpgme_op_delete (ctx=0x804a280, key=0x804b068, allow_secret=1)
at delete.c:142
(gdb) b _gpgme_io_spawn
Breakpoint 2 at 0x4003e1b4: file posix-io.c, line 159.
(gdb) c
Continuing.
Breakpoint 2, _gpgme_io_spawn (path=0x40041065 "/usr/bin/gpg", argv=0x804aa88,
fd_child_list=0x804abb8, fd_parent_list=0x804abd0) at posix-io.c:159
(gdb) printf "%s\n", argv[0]
gpg
(gdb) printf "%s\n", argv[1]
--batch
(gdb) printf "%s\n", argv[2]
--comment
(gdb) printf "%s\n", argv[3]
(gdb) printf "%s\n", argv[4]
--status-fd
(gdb) printf "%s\n", argv[5]
6
(gdb) printf "%s\n", argv[6]
--no-tty
(gdb) printf "%s\n", argv[7]
--verbose
(gdb) printf "%s\n", argv[8]
--delete-secret-and-public-key
(gdb) printf "%s\n", argv[9]
--
(gdb) printf "%s\n", argv[10]
F7A0E344A285FD91CEFD4B96F35ED62BE91C6FC1
(gdb) printf "%s\n", argv[11]
Cannot access memory at address 0x0
(gdb) printf "%s\n", argv[12]
Cannot access memory at address 0x0
_gpgme_gpg_spawn (gpg=0x804a4a8, opaque=0x804a280) at rungpg.c:903
(gdb) n
(gdb) n
(gdb) p pid
$11 = 2451
(gdb) n
_gpgme_engine_start (engine=0x804a3e0, opaque=0x804a280) at engine.c:568
(gdb) n
_gpgme_op_delete_start (ctx=0x804a280, synchronous=1, key=0x804b068,
allow_secret=1) at delete.c:112
(gdb) p err
$12 = GPGME_No_Error
(gdb) n
(gdb) p err
$13 = GPGME_No_Error
(gdb) n
(gdb) n
(gdb) n
gpgme_op_delete (ctx=0x804a280, key=0x804b068, allow_secret=1) at delete.c:143
(gdb) p err
$14 = GPGME_No_Error
Note:
******
Here return value of the gpgme_op_delete as GPGME_No_Error..
Note :
******
Here the gpg command string would be as
gpg --batch --comment --status-fd 6 --verbose --delete-secret-and-public-key -- F7A0E344A285FD91CEFD4B96F35ED62BE91C6FC1
Doubt :
********
in front of the Finger Print Value there is a space and hyphens
as "-- F7A0E344A285FD91CEFD4B96F35ED62BE91C6FC1" Is it Proper?
Problem :
*********
operations performed as follows:
* open list mode in the context
* found the matching userid in the list.
* stopped the list mode using gpgme_op_keylist_end().
* trying to delete the matched key from the context.
* return..
gpg --list-keys
shows the deleted key also in their list..
Please, consider this problem reply me in this regard asap..
Send me some sample codes or any other way to delete the keys
(both public and secret) from the keyring..
Waiting for some solution for these problem as soon as possible..
--
regards,
S. Thanga Prakash
More information about the Gnupg-devel
mailing list