mirror of
git://git.gnupg.org/gnupg.git
synced 2025-05-24 16:43:28 +02:00
See ChangeLog: Fri Aug 18 14:27:14 CEST 2000 Werner Koch
This commit is contained in:
parent
7a8c8b4826
commit
c9c709545a
@ -1,3 +1,8 @@
|
|||||||
|
Fri Aug 18 14:27:14 CEST 2000 Werner Koch <wk@openit.de>
|
||||||
|
|
||||||
|
* agent/: New.
|
||||||
|
* Makefile.am, configure.in: Support for the new directory.
|
||||||
|
|
||||||
Mon Jul 17 16:35:47 CEST 2000 Werner Koch <wk@>
|
Mon Jul 17 16:35:47 CEST 2000 Werner Koch <wk@>
|
||||||
|
|
||||||
* configure.in (mingw32): Changes to allow for mingw32msvc
|
* configure.in (mingw32): Changes to allow for mingw32msvc
|
||||||
|
@ -17,7 +17,14 @@ else
|
|||||||
checks = checks
|
checks = checks
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = intl zlib jnlib util mpi cipher ${gcrypt} g10 po tools doc ${checks}
|
if COMPILE_AGENT
|
||||||
|
agent = agent
|
||||||
|
else
|
||||||
|
agent =
|
||||||
|
endif
|
||||||
|
|
||||||
|
SUBDIRS = intl zlib jnlib util mpi cipher ${gcrypt} g10 po tools \
|
||||||
|
${agent} doc ${checks}
|
||||||
EXTRA_DIST = README-alpha VERSION PROJECTS BUGS
|
EXTRA_DIST = README-alpha VERSION PROJECTS BUGS
|
||||||
# gettext never gets it right, so we take here care of deleting the
|
# gettext never gets it right, so we take here care of deleting the
|
||||||
# symlink. my_clean_gcrypt is just a kludge until we can include
|
# symlink. my_clean_gcrypt is just a kludge until we can include
|
||||||
|
14
configure.in
14
configure.in
@ -302,6 +302,19 @@ AC_SUBST(USE_NLS)
|
|||||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Where is the GTK+ toolkit
|
||||||
|
if test "$cross_compiling" = yes ; then
|
||||||
|
CFLAGS="$CFLAGS -I/home/wk/work/gtk+w32/include/gtk+/gdk/win32 \
|
||||||
|
-I/home/wk/work/gtk+w32/include -I/home/wk/work/gtk+w32/include/gtk+"
|
||||||
|
LIBS="$LIBS -L/home/wk/work/gtk+w32/lib -lgtk -lgdk -lglib"
|
||||||
|
compile_agent=no
|
||||||
|
else
|
||||||
|
AM_PATH_GTK(1.2.1, compile_agent=yes,compile_agent=no)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(COMPILE_AGENT, test x$compile_agent = xyes)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl There are lot of misconfigured systems. We include
|
dnl There are lot of misconfigured systems. We include
|
||||||
dnl gdbm support only if the lib and the header is installed.
|
dnl gdbm support only if the lib and the header is installed.
|
||||||
@ -760,6 +773,7 @@ util/Makefile
|
|||||||
mpi/Makefile
|
mpi/Makefile
|
||||||
cipher/Makefile
|
cipher/Makefile
|
||||||
g10/Makefile
|
g10/Makefile
|
||||||
|
agent/Makefile
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
doc/version.sgml
|
doc/version.sgml
|
||||||
tools/Makefile
|
tools/Makefile
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Aug 18 14:27:14 CEST 2000 Werner Koch <wk@openit.de>
|
||||||
|
|
||||||
|
* status.c (do_get_from_fd): Ooops, we used fd instead of opt.command_fd.
|
||||||
|
Thanks to Michael Tokarev.
|
||||||
|
|
||||||
Mon Jul 31 10:04:47 CEST 2000 Werner Koch <wk@openit.de>
|
Mon Jul 31 10:04:47 CEST 2000 Werner Koch <wk@openit.de>
|
||||||
|
|
||||||
* encode.c, sign.c, keygen.c, pubkey-enc.c: Replaced all
|
* encode.c, sign.c, keygen.c, pubkey-enc.c: Replaced all
|
||||||
|
@ -368,7 +368,7 @@ do_get_from_fd( const char *keyword, int hidden, int bool )
|
|||||||
i=0;
|
i=0;
|
||||||
}
|
}
|
||||||
/* Hmmm: why not use our read_line function here */
|
/* Hmmm: why not use our read_line function here */
|
||||||
if( read( fd, string+i, 1) != 1 || string[i] == '\n' )
|
if( read( opt.command_fd, string+i, 1) != 1 || string[i] == '\n' )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
string[i] = 0;
|
string[i] = 0;
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
|
Fri Aug 18 14:27:14 CEST 2000 Werner Koch <wk@openit.de>
|
||||||
|
|
||||||
|
* gpga-prot.h: New.
|
||||||
|
|
||||||
Fri Jul 14 19:38:23 CEST 2000 Werner Koch <wk@>
|
Fri Jul 14 19:38:23 CEST 2000 Werner Koch <wk@>
|
||||||
|
|
||||||
* http.h (HTTP_FLAG_TRY_PROXY): new.
|
* http.h (HTTP_FLAG_TRY_PROXY): new.
|
||||||
|
|
||||||
* error.h (G10ERR_NOT_PROCESSED): New.
|
* error.h (G10ERR_NOT_PROCESSED): New.
|
||||||
|
|
||||||
* iobuf.h (IOBUFCTRL_CANCEL): New.
|
* iobuf.h (IOBUFCTRL_CANCEL): New.
|
||||||
|
|
||||||
* types.h (HAVE_U64_TYPEDEF): Defined depending on configure test.
|
* types.h (HAVE_U64_TYPEDEF): Defined depending on configure test.
|
||||||
|
|
||||||
Thu Jan 27 18:00:44 CET 2000 Werner Koch <wk@gnupg.de>
|
Thu Jan 27 18:00:44 CET 2000 Werner Koch <wk@gnupg.de>
|
||||||
|
|
||||||
|
@ -6,5 +6,6 @@ util.h
|
|||||||
i18n.h
|
i18n.h
|
||||||
host2net.h
|
host2net.h
|
||||||
http.h
|
http.h
|
||||||
|
gpga-prot.h
|
||||||
|
|
||||||
ChangeLog
|
ChangeLog
|
||||||
|
126
include/gpga-prot.h
Normal file
126
include/gpga-prot.h
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/* gpga-prot.h - GnuPG Agent protocol definition
|
||||||
|
* Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
*
|
||||||
|
* This file is part of GnuPG.
|
||||||
|
*
|
||||||
|
* GnuPG is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* GnuPG is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The gpg-agent protocol:
|
||||||
|
* The protocol is connection based and runs over a Unix Domain socket.
|
||||||
|
* The client requests a service from the server and waits for the result.
|
||||||
|
* A connection request starts with a magic string to transfer the
|
||||||
|
* version number the followed by the regular traffic. All numbers
|
||||||
|
* are transfered in network-byte-order, strings are prefixed with a
|
||||||
|
* 32 bit length and NOT 0 terminated.
|
||||||
|
* The magic string is:
|
||||||
|
* 0x47, 0x50, 0x47, 0x41, 0x00, 0x00, 0x00, 0x01
|
||||||
|
* which nicely fits into 2 32 bit words.
|
||||||
|
* The server does not respond to this magic string if the protocol
|
||||||
|
is supported; otherwise it will return an error packet and close
|
||||||
|
the connection.
|
||||||
|
Standard request and reply packets are composed like this
|
||||||
|
u32 Length of following packet ( 4 <= n < 2048 )
|
||||||
|
u32 Request/Reply type or error code
|
||||||
|
n-bytes Data specific to the request/reply
|
||||||
|
|
||||||
|
Request codes are just the given number,
|
||||||
|
Reply codes are all to be ORed with 0x00010000,
|
||||||
|
Error codes are all to be ORer with 0x00020000.
|
||||||
|
|
||||||
|
Requests:
|
||||||
|
=========
|
||||||
|
GET_VERSION
|
||||||
|
|
||||||
|
GET_PASSPHRASE, expected data:
|
||||||
|
20 Bytes fingerprint of the key
|
||||||
|
(use all zeroes to get a passphrase not associated with a key)
|
||||||
|
n Bytes with the text to be displayed in case the
|
||||||
|
passphrase is not cached or the fingerprint was all zero.
|
||||||
|
|
||||||
|
CLEAR_PASSPHRASE, expected data:
|
||||||
|
20 Bytes fingerprint of the key
|
||||||
|
|
||||||
|
Returns either OKAY or NO_PASSPHRASE
|
||||||
|
|
||||||
|
HAVE_PASSPHRASE, expected data:
|
||||||
|
20 Bytes fingerprint of the key
|
||||||
|
|
||||||
|
Returns either OKAY or NO_PASSPHRASE
|
||||||
|
|
||||||
|
|
||||||
|
Replies:
|
||||||
|
========
|
||||||
|
OKAY (reply code 1)
|
||||||
|
Data may be interpreted as the version string
|
||||||
|
|
||||||
|
GOT_PASSPHRASE (reply code 2)
|
||||||
|
u32 Length of passphrase
|
||||||
|
n bytes passphrase
|
||||||
|
m bytes padding so that the packets have some standard length
|
||||||
|
|
||||||
|
|
||||||
|
Error Replies:
|
||||||
|
==============
|
||||||
|
PROTOCOL_ERROR
|
||||||
|
no data yes specified
|
||||||
|
|
||||||
|
CANCELED
|
||||||
|
User canceled the input
|
||||||
|
|
||||||
|
NO_PASSPHRASE
|
||||||
|
No user intercation possible and passphrase not available.
|
||||||
|
Also return as answer on HAVE_PASSPHRASE etc.
|
||||||
|
|
||||||
|
BAD_PASSPHRASE
|
||||||
|
Returned when the user does not repeat the passphrase correctly
|
||||||
|
|
||||||
|
INVALID_DATA
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef GPG_GPGA_PROT_H
|
||||||
|
#define GPG_GPGA_PROT_H 1
|
||||||
|
|
||||||
|
enum gpga_protocol_codes {
|
||||||
|
/* Request codes */
|
||||||
|
GPGA_PROT_GET_VERSION = 1,
|
||||||
|
GPGA_PROT_GET_PASSPHRASE = 2,
|
||||||
|
GPGA_PROT_CLEAR_PASSPHRASE= 3,
|
||||||
|
GPGA_PROT_SHUTDOWN = 4,
|
||||||
|
|
||||||
|
/* Reply codes */
|
||||||
|
GPGA_PROT_REPLY_BASE = 0x10000,
|
||||||
|
GPGA_PROT_OKAY = 0x10001,
|
||||||
|
GPGA_PROT_GOT_PASSPHRASE = 0x10002,
|
||||||
|
|
||||||
|
/* Error codes */
|
||||||
|
GPGA_PROT_ERROR_BASE = 0x20000,
|
||||||
|
GPGA_PROT_PROTOCOL_ERROR = 0x20001,
|
||||||
|
GPGA_PROT_INVALID_REQUEST= 0x20002,
|
||||||
|
GPGA_PROT_CANCELED = 0x20003,
|
||||||
|
GPGA_PROT_NO_PASSPHRASE = 0x20004,
|
||||||
|
GPGA_PROT_BAD_PASSPHRASE = 0x20005,
|
||||||
|
GPGA_PROT_INVALID_DATA = 0x20006,
|
||||||
|
GPGA_PROT_NOT_IMPLEMENTED= 0x20007,
|
||||||
|
GPGA_PROT_UI_PROBLEM = 0x20008,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /*GPG_GPGA_PROT_H*/
|
@ -1,3 +1,7 @@
|
|||||||
|
Fri Aug 18 14:27:14 CEST 2000 Werner Koch <wk@openit.de>
|
||||||
|
|
||||||
|
* logger.c (log_set_file): Allow to set the file by name.
|
||||||
|
|
||||||
Fri Jul 28 18:19:11 CEST 2000 Werner Koch <wk@openit.de>
|
Fri Jul 28 18:19:11 CEST 2000 Werner Koch <wk@openit.de>
|
||||||
|
|
||||||
* iobuf.c: Use setmode() at several places to set stdin and stdout
|
* iobuf.c: Use setmode() at several places to set stdin and stdout
|
||||||
|
@ -41,17 +41,19 @@ static FILE *logfp;
|
|||||||
void
|
void
|
||||||
log_set_logfile( const char *name, int fd )
|
log_set_logfile( const char *name, int fd )
|
||||||
{
|
{
|
||||||
if( name )
|
|
||||||
BUG();
|
|
||||||
|
|
||||||
if( logfp && logfp != stderr && logfp != stdout )
|
if( logfp && logfp != stderr && logfp != stdout )
|
||||||
fclose( logfp );
|
fclose( logfp );
|
||||||
if( fd == 1 )
|
if( name ) {
|
||||||
logfp = stdout;
|
logfp = fopen ( name, "a" );
|
||||||
else if( fd == 2 )
|
}
|
||||||
logfp = stderr;
|
else {
|
||||||
else
|
if( fd == 1 )
|
||||||
logfp = fdopen( fd, "a" );
|
logfp = stdout;
|
||||||
|
else if( fd == 2 )
|
||||||
|
logfp = stderr;
|
||||||
|
else
|
||||||
|
logfp = fdopen( fd, "a" );
|
||||||
|
}
|
||||||
if( !logfp ) {
|
if( !logfp ) {
|
||||||
logfp = stderr;
|
logfp = stderr;
|
||||||
log_fatal("can't open fd %d for logging: %s\n", fd, strerror(errno));
|
log_fatal("can't open fd %d for logging: %s\n", fd, strerror(errno));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user