mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-10 13:04:23 +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 Ullrich ccrlphr@xensei.com
|
||||||
Steffen Zahn zahn@berlin.snafu.de
|
Steffen Zahn zahn@berlin.snafu.de
|
||||||
Steven Bakker steven@icoe.att.com
|
Steven Bakker steven@icoe.att.com
|
||||||
|
Steven Murdoch sjmurdoch@bigfoot.com
|
||||||
Susanne Schultz schultz@hsp.de
|
Susanne Schultz schultz@hsp.de
|
||||||
Ted Cabeen secabeen@pobox.com
|
Ted Cabeen secabeen@pobox.com
|
||||||
Thiago Jung Bauermann jungmann@cwb.matrix.com.br
|
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>
|
2001-03-20 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* Makefile.am: Import the pubdemo.asc file
|
* Makefile.am: Import the pubdemo.asc file
|
||||||
|
@ -11,4 +11,6 @@ gpg: NOTE: signature key expired
|
|||||||
NOTE: this is a development version!
|
NOTE: this is a development version!
|
||||||
gpg: encrypted with
|
gpg: encrypted with
|
||||||
"test two (no pp) <two@test.nowhere.nil>"
|
"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
|
gpg: using secondary key
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
2001-03-27 Werner Koch <wk@gnupg.org>
|
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
|
* getkey.c (key_byname): Add new arg secmode and changed all
|
||||||
callers to request explicitly the mode. Deriving this information
|
callers to request explicitly the mode. Deriving this information
|
||||||
from the other supplied parameters does not work if neither pk nor
|
from the other supplied parameters does not work if neither pk nor
|
||||||
|
@ -40,6 +40,11 @@
|
|||||||
#define MAX_PK_CACHE_ENTRIES 200
|
#define MAX_PK_CACHE_ENTRIES 200
|
||||||
#define MAX_UID_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()
|
/* A map of the all characters valid used for word_match()
|
||||||
* Valid characters are in in this table converted to uppercase.
|
* Valid characters are in in this table converted to uppercase.
|
||||||
* because the upper 128 bytes have special meaning, we assume
|
* because the upper 128 bytes have special meaning, we assume
|
||||||
@ -177,7 +182,7 @@ print_stats()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static void
|
void
|
||||||
cache_public_key( PKT_public_key *pk )
|
cache_public_key( PKT_public_key *pk )
|
||||||
{
|
{
|
||||||
#if MAX_PK_CACHE_ENTRIES
|
#if MAX_PK_CACHE_ENTRIES
|
||||||
|
@ -142,6 +142,7 @@ char *get_last_passphrase(void);
|
|||||||
/*-- getkey.c --*/
|
/*-- getkey.c --*/
|
||||||
int classify_user_id( const char *name, u32 *keyid, byte *fprint,
|
int classify_user_id( const char *name, u32 *keyid, byte *fprint,
|
||||||
const char **retstr, size_t *retlen );
|
const char **retstr, size_t *retlen );
|
||||||
|
void cache_public_key( PKT_public_key *pk );
|
||||||
void getkey_disable_caches(void);
|
void getkey_disable_caches(void);
|
||||||
int get_pubkey( PKT_public_key *pk, u32 *keyid );
|
int get_pubkey( PKT_public_key *pk, u32 *keyid );
|
||||||
KBNODE get_pubkeyblock( u32 *keyid );
|
KBNODE get_pubkeyblock( u32 *keyid );
|
||||||
|
@ -185,6 +185,9 @@ write_selfsig( KBNODE root, KBNODE pub_root, PKT_secret_key *sk )
|
|||||||
if( !node )
|
if( !node )
|
||||||
BUG();
|
BUG();
|
||||||
pk = node->pkt->pkt.public_key;
|
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 */
|
/* and make the signature */
|
||||||
rc = make_keysig_packet( &sig, pk, uid, NULL, sk, 0x13, 0,
|
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 )
|
if( !node )
|
||||||
BUG();
|
BUG();
|
||||||
pk = node->pkt->pkt.public_key;
|
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 */
|
/* find the last subkey */
|
||||||
subpk = NULL;
|
subpk = NULL;
|
||||||
for(node=pub_root; node; node = node->next ) {
|
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>
|
2001-03-21 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* shmtest.c: Add sys/types.h
|
* shmtest.c: Add sys/types.h
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
# FIXME: Add --dry-run, use only valid email addreses, extract only given keys
|
# 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
|
if [ -z "$1" -o -z "$2" ]; then
|
||||||
echo "usage: mail-signed-keys keyring signedby" >&2
|
echo "usage: mail-signed-keys keyring signedby" >&2
|
||||||
exit 1
|
exit 1
|
||||||
@ -13,7 +19,7 @@ if [ ! -f $1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f '.#tdb.tmp' ] && rm '.#tdb.tmp'
|
[ -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 \
|
signedby=`gpg $ro --fast-list-mode --list-keys --with-colons $2 \
|
||||||
2>/dev/null | awk -F: '$1=="pub" {print $5; exit 0}'`
|
2>/dev/null | awk -F: '$1=="pub" {print $5; exit 0}'`
|
||||||
@ -23,14 +29,15 @@ if [ -z "$signedby" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$dryrun" = "0" ]; then
|
||||||
echo "About to send the the keys signed by $signedby" >&2
|
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
|
echo -n "to their owners. Do you really want to do this? (y/N)" >&2
|
||||||
read
|
read
|
||||||
[ "$REPLY" != "y" -a "$REPLY" != "Y" ] && exit 0
|
[ "$REPLY" != "y" -a "$REPLY" != "Y" ] && exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
gpg $ro --check-sigs --with-colons 2>/dev/null \
|
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 " }
|
BEGIN { sendmail="/usr/lib/sendmail -oi -t " }
|
||||||
$1 == "pub" { nextkid=$5; nextuid=$10
|
$1 == "pub" { nextkid=$5; nextuid=$10
|
||||||
if( uidcount > 0 ) { myflush() }
|
if( uidcount > 0 ) { myflush() }
|
||||||
@ -46,6 +53,7 @@ function myflush()
|
|||||||
print "sending key " substr(kid,9) " to" | "cat >&2"
|
print "sending key " substr(kid,9) " to" | "cat >&2"
|
||||||
for(i=0; i < uidcount; i++ ) {
|
for(i=0; i < uidcount; i++ ) {
|
||||||
print " " uids[i] | "cat >&2"
|
print " " uids[i] | "cat >&2"
|
||||||
|
if( dryrun == 0 ) {
|
||||||
if( i == 0 ) {
|
if( i == 0 ) {
|
||||||
printf "To: %s", uids[i] | sendmail
|
printf "To: %s", uids[i] | sendmail
|
||||||
}
|
}
|
||||||
@ -53,6 +61,8 @@ function myflush()
|
|||||||
printf ",\n %s", uids[i] | sendmail
|
printf ",\n %s", uids[i] | sendmail
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(dryrun == 0) {
|
||||||
printf "\n" | sendmail
|
printf "\n" | sendmail
|
||||||
print "Subject: I signed your key " substr(kid,9) | sendmail
|
print "Subject: I signed your key " substr(kid,9) | sendmail
|
||||||
print "" | sendmail
|
print "" | sendmail
|
||||||
@ -70,6 +80,7 @@ function myflush()
|
|||||||
print "" | sendmail
|
print "" | sendmail
|
||||||
close(cmd)
|
close(cmd)
|
||||||
close( sendmail )
|
close( sendmail )
|
||||||
|
}
|
||||||
uidcount=0
|
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>
|
2001-03-13 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* iobuf.c (iobuf_sockopen): New.
|
* iobuf.c (iobuf_sockopen): New.
|
||||||
|
@ -150,6 +150,7 @@ void
|
|||||||
http_start_data( HTTP_HD hd )
|
http_start_data( HTTP_HD hd )
|
||||||
{
|
{
|
||||||
if( !hd->in_data ) {
|
if( !hd->in_data ) {
|
||||||
|
iobuf_put( hd->fp_write, '\r' );
|
||||||
iobuf_put( hd->fp_write, '\n' );
|
iobuf_put( hd->fp_write, '\n' );
|
||||||
hd->in_data = 1;
|
hd->in_data = 1;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,11 @@
|
|||||||
#include "ttyio.h"
|
#include "ttyio.h"
|
||||||
|
|
||||||
#define CONTROL_D ('D' - 'A' + 1)
|
#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 */
|
#ifdef __MINGW32__ /* use the odd Win32 functions */
|
||||||
static struct {
|
static struct {
|
||||||
@ -120,7 +124,7 @@ init_ttyfp(void)
|
|||||||
#elif defined(__EMX__)
|
#elif defined(__EMX__)
|
||||||
ttyfp = stdout; /* Fixme: replace by the real functions: see wklib */
|
ttyfp = stdout; /* Fixme: replace by the real functions: see wklib */
|
||||||
#else
|
#else
|
||||||
ttyfp = batchmode? stderr : fopen("/dev/tty", "r+");
|
ttyfp = batchmode? stderr : fopen(TERMDEVICE, "r+");
|
||||||
if( !ttyfp ) {
|
if( !ttyfp ) {
|
||||||
log_error("cannot open /dev/tty: %s\n", strerror(errno) );
|
log_error("cannot open /dev/tty: %s\n", strerror(errno) );
|
||||||
exit(2);
|
exit(2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user