mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
See ChangeLog: Mon Jul 17 16:35:47 CEST 2000 Werner Koch
This commit is contained in:
parent
92cd255508
commit
0bf44b072c
45 changed files with 31954 additions and 7194 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Jul 17 16:35:47 CEST 2000 Werner Koch <wk@>
|
||||
|
||||
* mail-signed-keys: New.
|
||||
* ring-a-party: New.
|
||||
|
||||
Mon Jan 31 17:46:35 CET 2000 Werner Koch <wk@>
|
||||
|
||||
* Makefile.am: Add libjnlib.
|
||||
|
@ -10,7 +15,6 @@ Thu Jul 8 16:21:27 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
|||
|
||||
Wed Jul 7 13:08:40 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
|
||||
* Makefile.am: Support for libtool.
|
||||
|
||||
Tue Jun 8 13:36:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
@ -30,4 +34,3 @@ Tue Apr 7 19:50:41 1998 Werner Koch (wk@isil.d.shuttle.de)
|
|||
|
||||
* bftest.c: Now supports all availabe ciphers.
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = lspgpot
|
||||
EXTRA_DIST = lspgpot mail-signed-keys ring-a-party
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
|
||||
# we need to add libutil.la a second time because we have to resolve
|
||||
# gpg_log_ in some libjnlib modules. - very ugly - should be removed soon.
|
||||
|
|
75
tools/mail-signed-keys
Executable file
75
tools/mail-signed-keys
Executable file
|
@ -0,0 +1,75 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" -o -z "$2" ]; then
|
||||
echo "usage: mail-signed-keys keyring signedby" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]; then
|
||||
echo "mail-signed-keys: '$1': no such file" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f '.#tdb.tmp' ] && rm '.#tdb.tmp'
|
||||
ro="--trustdb-name=./.#tdb.tmp --dry-run --lock-never --no-default-keyring --keyring $1"
|
||||
|
||||
signedby=`gpg $ro --fast-list-mode --list-keys --with-colons $2 \
|
||||
2>/dev/null | awk -F: '$1=="pub" {print $5; exit 0}'`
|
||||
|
||||
if [ -z "$signedby" ]; then
|
||||
echo "mail-signed-keys: '$2': no such signator" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "About to send the the keys signed by $signedby" >&2
|
||||
echo -n "to their owners. Do you really want to do this? (y/N)" >&2
|
||||
read
|
||||
[ "$REPLY" != "y" -a "$REPLY" != "Y" ] && exit 0
|
||||
|
||||
|
||||
gpg $ro --check-sigs --with-colons 2>/dev/null \
|
||||
| awk -F: -v signedby="$signedby" -v gpgopt="$ro" '
|
||||
BEGIN { sendmail="/usr/lib/sendmail -oi -t " }
|
||||
$1 == "pub" { nextkid=$5; nextuid=$10
|
||||
if( uidcount > 0 ) { myflush() }
|
||||
kid=nextkid; uid=nextuid; next
|
||||
}
|
||||
$1 == "uid" { uid=$10 ; next }
|
||||
$1 == "sig" && $2 == "!" && $5 == signedby { uids[uidcount++] = uid; next }
|
||||
END { if( uidcount > 0 ) { myflush() } }
|
||||
|
||||
function myflush()
|
||||
{
|
||||
if ( kid == signedby ) { uidcount=0; return }
|
||||
print "sending key " substr(kid,9) " to" | "cat >&2"
|
||||
for(i=0; i < uidcount; i++ ) {
|
||||
print " " uids[i] | "cat >&2"
|
||||
if( i == 0 ) {
|
||||
printf "To: %s", uids[i] | sendmail
|
||||
}
|
||||
else {
|
||||
printf ",\n %s", uids[i] | sendmail
|
||||
}
|
||||
}
|
||||
printf "\n" | sendmail
|
||||
print "Subject: I signed your key " substr(kid,9) | sendmail
|
||||
print "" | sendmail
|
||||
print "Hi," | sendmail
|
||||
print "" | sendmail
|
||||
print "Here you get back the signed key." | sendmail
|
||||
print "" | sendmail
|
||||
print "ciao," | sendmail
|
||||
print " your Key Signator" | sendmail
|
||||
print "" | sendmail
|
||||
cmd = "gpg " gpgopt " --export -a " kid " 2>/dev/null"
|
||||
while( (cmd | getline) > 0 ) {
|
||||
print | sendmail
|
||||
}
|
||||
print "" | sendmail
|
||||
close(cmd)
|
||||
close( sendmail )
|
||||
uidcount=0
|
||||
}
|
||||
'
|
||||
|
||||
|
103
tools/ring-a-party
Executable file
103
tools/ring-a-party
Executable file
|
@ -0,0 +1,103 @@
|
|||
#!/bin/sh
|
||||
# ring-a-party - print a keyring suitable for a key signing party
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "usage: ring-a-party keyring [headerline]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
keyring="$1"
|
||||
hdrline="$1"
|
||||
if [ $# -gt 1 ]; then
|
||||
hdrline="$2"
|
||||
fi
|
||||
|
||||
if [ ! -f $keyring ]; then
|
||||
echo "ring-a-party: '$keyring': no such file" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "ring-a-party: output will be written to 'a.pub'" >&2
|
||||
|
||||
|
||||
gpg --dry-run --with-fingerprint --with-colons $keyring \
|
||||
| gawk -v "KEYRING=$hdrline" '
|
||||
BEGIN { FS=":"
|
||||
algos[1] = "RSA";
|
||||
algos[16] = "ElGamal";
|
||||
algos[17] = "DSA";
|
||||
any = 0;
|
||||
lines = -1;
|
||||
page = 0;
|
||||
now = strftime("%b %d %H:%M %Y");
|
||||
}
|
||||
$1 == "pub" {
|
||||
if( any ) myflush();
|
||||
uidcount = 0;
|
||||
signencrypt = 0;
|
||||
uids[uidcount++] = $10;
|
||||
nbits = $3;
|
||||
keyid = substr($5,9);
|
||||
created = $6;
|
||||
expires = $7;
|
||||
algostr = mapalgo($4);
|
||||
if( $4 == 20 || $4 == 1 ) signencrypt = 1;
|
||||
any = 1;
|
||||
}
|
||||
$1 == "fpr" { fpr = $10 }
|
||||
$1 == "uid" { uids[uidcount++] = $10 }
|
||||
$1 == "sub" { if( $4 != 17 && $4 != 3 ) signencrypt=1 }
|
||||
|
||||
function myflush()
|
||||
{
|
||||
# fixme: take lines to print here into account
|
||||
if( lines > 50 || lines == -1 ) {
|
||||
if( lines != -1 ) printf "\f";
|
||||
page++;
|
||||
printf "%s %-50.50s Page %d\n\n", now, KEYRING, page ;
|
||||
printf "Type Bits KeyID Created Expires Algorithm Use\n";
|
||||
lines = 1;
|
||||
}
|
||||
printf "pub %04d 0x%s %10s %10s %-10s %15s\n",
|
||||
nbits, keyid, created, expires == ""? "----------":expires, algostr,
|
||||
signencrypt == 1? "Sign & Encrypt":"Sign only";
|
||||
length(fpr) == 40 ? printfpr20( fpr ) : printfpr16( fpr );
|
||||
lnes += 2;
|
||||
for( i=0; i < uidcount; i++ ) {
|
||||
printf "uid %s\n", uids[i];
|
||||
lines++;
|
||||
}
|
||||
printf "\n\n";
|
||||
lines += 2;
|
||||
}
|
||||
|
||||
function mapalgo( no )
|
||||
{
|
||||
if( no in algos )
|
||||
return algos[no];
|
||||
return sprintf( "algoID=%ds", no );
|
||||
}
|
||||
|
||||
|
||||
function printfpr16( s )
|
||||
{
|
||||
printf "f16 Fingerprint16 =";
|
||||
for(i=0; i < 16; i++ ) {
|
||||
if( i == 8 ) printf " ";
|
||||
printf " %s", substr( s, i*2, 2 );
|
||||
}
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
function printfpr20( s )
|
||||
{
|
||||
printf "f20 Fingerprint20 =";
|
||||
for(i=0; i < 10; i++ ) {
|
||||
if( i == 5 ) printf " ";
|
||||
printf " %s", substr( s, i*4, 4 );
|
||||
}
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
' | tee a.pub | gpg --print-mds
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue