mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Made genkey work again.
This commit is contained in:
parent
e2c88461fc
commit
355c76352a
1
THANKS
1
THANKS
@ -143,6 +143,7 @@ Stefan Keller dres@cs.tu-berlin.de
|
||||
Steffen Ullrich ccrlphr@xensei.com
|
||||
Steffen Zahn zahn@berlin.snafu.de
|
||||
Steven Bakker steven@icoe.att.com
|
||||
Steven Murdoch sjmurdoch@bigfoot.com
|
||||
Susanne Schultz schultz@hsp.de
|
||||
Ted Cabeen secabeen@pobox.com
|
||||
Thiago Jung Bauermann jungmann@cwb.matrix.com.br
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-03-27 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* run-gpg.patterns (gpg): Add some more patterns.
|
||||
|
||||
2001-03-20 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* Makefile.am: Import the pubdemo.asc file
|
||||
|
@ -13,7 +13,7 @@ fi
|
||||
LANG=
|
||||
LANGUAGE=
|
||||
|
||||
expect - <<EOF >/dev/null
|
||||
expect - <<EOF >/dev/null
|
||||
#set timeout -1
|
||||
set timeout 8
|
||||
match_max 100000
|
||||
|
@ -11,4 +11,6 @@ gpg: NOTE: signature key expired
|
||||
NOTE: this is a development version!
|
||||
gpg: encrypted with
|
||||
"test two (no pp) <two@test.nowhere.nil>"
|
||||
"Test one (pp=def) <one@test.nowhere.nil>"
|
||||
"pgp5 test <pgp5@dev.null>"
|
||||
gpg: using secondary key
|
||||
|
@ -1,5 +1,8 @@
|
||||
2001-03-27 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* getkey.c (cache_public_key): Made global.
|
||||
* keygen.c (write_selfsig, write_keybinding): Cache the new key.
|
||||
|
||||
* getkey.c (key_byname): Add new arg secmode and changed all
|
||||
callers to request explicitly the mode. Deriving this information
|
||||
from the other supplied parameters does not work if neither pk nor
|
||||
|
@ -40,6 +40,11 @@
|
||||
#define MAX_PK_CACHE_ENTRIES 200
|
||||
#define MAX_UID_CACHE_ENTRIES 200
|
||||
|
||||
#if MAX_PK_CACHE_ENTRIES < 2
|
||||
#error We need the cache for key creation
|
||||
#endif
|
||||
|
||||
|
||||
/* A map of the all characters valid used for word_match()
|
||||
* Valid characters are in in this table converted to uppercase.
|
||||
* because the upper 128 bytes have special meaning, we assume
|
||||
@ -177,7 +182,7 @@ print_stats()
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
cache_public_key( PKT_public_key *pk )
|
||||
{
|
||||
#if MAX_PK_CACHE_ENTRIES
|
||||
|
@ -142,6 +142,7 @@ char *get_last_passphrase(void);
|
||||
/*-- getkey.c --*/
|
||||
int classify_user_id( const char *name, u32 *keyid, byte *fprint,
|
||||
const char **retstr, size_t *retlen );
|
||||
void cache_public_key( PKT_public_key *pk );
|
||||
void getkey_disable_caches(void);
|
||||
int get_pubkey( PKT_public_key *pk, u32 *keyid );
|
||||
KBNODE get_pubkeyblock( u32 *keyid );
|
||||
|
@ -185,6 +185,9 @@ write_selfsig( KBNODE root, KBNODE pub_root, PKT_secret_key *sk )
|
||||
if( !node )
|
||||
BUG();
|
||||
pk = node->pkt->pkt.public_key;
|
||||
/* we have to cache the key, so that the verification of the signature
|
||||
* creation is able to retrieve the public key */
|
||||
cache_public_key (pk);
|
||||
|
||||
/* and make the signature */
|
||||
rc = make_keysig_packet( &sig, pk, uid, NULL, sk, 0x13, 0,
|
||||
@ -218,6 +221,10 @@ write_keybinding( KBNODE root, KBNODE pub_root, PKT_secret_key *sk )
|
||||
if( !node )
|
||||
BUG();
|
||||
pk = node->pkt->pkt.public_key;
|
||||
/* we have to cache the key, so that the verification of the signature
|
||||
* creation is able to retrieve the public key */
|
||||
cache_public_key (pk);
|
||||
|
||||
/* find the last subkey */
|
||||
subpk = NULL;
|
||||
for(node=pub_root; node; node = node->next ) {
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-03-27 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* mail-signed-keys: Add option --dry-run.
|
||||
|
||||
2001-03-21 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* shmtest.c: Add sys/types.h
|
||||
|
@ -2,6 +2,12 @@
|
||||
|
||||
# FIXME: Add --dry-run, use only valid email addreses, extract only given keys
|
||||
|
||||
dryrun=0
|
||||
if [ "$1" = "--dry-run" ]; then
|
||||
dryrun=1
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ -z "$1" -o -z "$2" ]; then
|
||||
echo "usage: mail-signed-keys keyring signedby" >&2
|
||||
exit 1
|
||||
@ -13,7 +19,7 @@ if [ ! -f $1 ]; then
|
||||
fi
|
||||
|
||||
[ -f '.#tdb.tmp' ] && rm '.#tdb.tmp'
|
||||
ro="--trustdb-name=./.#tdb.tmp --dry-run --lock-never --no-default-keyring --keyring $1"
|
||||
ro="--homedir . --no-options --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}'`
|
||||
@ -23,14 +29,15 @@ if [ -z "$signedby" ]; then
|
||||
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
|
||||
|
||||
if [ "$dryrun" = "0" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
gpg $ro --check-sigs --with-colons 2>/dev/null \
|
||||
| awk -F: -v signedby="$signedby" -v gpgopt="$ro" '
|
||||
| awk -F: -v signedby="$signedby" -v gpgopt="$ro" -v dryrun="$dryrun" '
|
||||
BEGIN { sendmail="/usr/lib/sendmail -oi -t " }
|
||||
$1 == "pub" { nextkid=$5; nextuid=$10
|
||||
if( uidcount > 0 ) { myflush() }
|
||||
@ -46,30 +53,34 @@ function myflush()
|
||||
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
|
||||
}
|
||||
if( dryrun == 0 ) {
|
||||
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
|
||||
if(dryrun == 0) {
|
||||
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 )
|
||||
}
|
||||
print "" | sendmail
|
||||
close(cmd)
|
||||
close( sendmail )
|
||||
uidcount=0
|
||||
}
|
||||
'
|
||||
|
@ -1,3 +1,10 @@
|
||||
2001-03-26 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* ttyio.c: Define TERMDEVICE depending on OS.
|
||||
|
||||
* http.c (http_start_data): send a CRLF and not just a LF.
|
||||
Pointed out by Steven Murdoch.
|
||||
|
||||
2001-03-13 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* iobuf.c (iobuf_sockopen): New.
|
||||
|
@ -150,6 +150,7 @@ void
|
||||
http_start_data( HTTP_HD hd )
|
||||
{
|
||||
if( !hd->in_data ) {
|
||||
iobuf_put( hd->fp_write, '\r' );
|
||||
iobuf_put( hd->fp_write, '\n' );
|
||||
hd->in_data = 1;
|
||||
}
|
||||
|
@ -50,7 +50,11 @@
|
||||
#include "ttyio.h"
|
||||
|
||||
#define CONTROL_D ('D' - 'A' + 1)
|
||||
|
||||
#ifdef __VMS
|
||||
#define TERMDEVICE "/dev/tty"
|
||||
#else
|
||||
#define TERMDEVICE "/dev/tty"
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__ /* use the odd Win32 functions */
|
||||
static struct {
|
||||
@ -120,7 +124,7 @@ init_ttyfp(void)
|
||||
#elif defined(__EMX__)
|
||||
ttyfp = stdout; /* Fixme: replace by the real functions: see wklib */
|
||||
#else
|
||||
ttyfp = batchmode? stderr : fopen("/dev/tty", "r+");
|
||||
ttyfp = batchmode? stderr : fopen(TERMDEVICE, "r+");
|
||||
if( !ttyfp ) {
|
||||
log_error("cannot open /dev/tty: %s\n", strerror(errno) );
|
||||
exit(2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user