Released 0.0.0
This commit is contained in:
parent
3868237d95
commit
08eaf1cea1
20
README
20
README
@ -1,7 +1,23 @@
|
||||
GPGME - GnuPG Made Easy
|
||||
---------------------------
|
||||
|
||||
THIS IS WORK IN PROGRESS !!!
|
||||
!!!! THIS IS WORK IN PROGRESS !!!
|
||||
|
||||
If you want to hack on it, start with one of the tests/t-foo programs.
|
||||
You need the latest CVS version of GnuPG 1.0, see
|
||||
http://www.gnupg.org/cvs-access.html . If you use passphrases for
|
||||
your keys, you should get the gpg-agent which comes with the GnuPG
|
||||
unstable version (either CVS HEAD or
|
||||
ftp.gnupg.org/pub/gcrypt/alpha/gnupg/gnupg-1.1.2.tar.gz) and install
|
||||
the agent from the agent subdirectory.
|
||||
|
||||
Please subscribe to the gnupg-devel@gnupg.org mailing list if you want
|
||||
to do serious work.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Contact wk@gnupg.org for questions.
|
||||
|
||||
|
@ -13,7 +13,7 @@ AM_MAINTAINER_MODE
|
||||
# AGE, set REVISION to 0.
|
||||
# 3. Interfaces removed (BAD, breaks upward compatibility): Increment
|
||||
# CURRENT, set AGE and REVISION to 0.
|
||||
AM_INIT_AUTOMAKE(gpgme,0.0)
|
||||
AM_INIT_AUTOMAKE(gpgme,0.0.0)
|
||||
LIBGPGME_LT_CURRENT=0
|
||||
LIBGPGME_LT_AGE=0
|
||||
LIBGPGME_LT_REVISION=0
|
||||
|
@ -312,6 +312,8 @@ build_argv ( GpgObject gpg )
|
||||
size_t datac=0, argc=0;
|
||||
char **argv;
|
||||
int need_special = 0;
|
||||
int use_agent = !!getenv ("GPG_AGENT_INFO");
|
||||
|
||||
|
||||
if ( gpg->argv ) {
|
||||
free_argv ( gpg->argv );
|
||||
@ -337,6 +339,8 @@ build_argv ( GpgObject gpg )
|
||||
}
|
||||
if ( need_special )
|
||||
argc++;
|
||||
if (use_agent)
|
||||
argc++;
|
||||
|
||||
argv = xtrycalloc ( argc+1, sizeof *argv );
|
||||
if (!argv)
|
||||
@ -364,6 +368,15 @@ build_argv ( GpgObject gpg )
|
||||
}
|
||||
argc++;
|
||||
}
|
||||
if ( use_agent ) {
|
||||
argv[argc] = xtrystrdup ( "--use-agent" );
|
||||
if (!argv[argc]) {
|
||||
xfree (fd_data_map);
|
||||
free_argv (argv);
|
||||
return mk_error (Out_Of_Core);
|
||||
}
|
||||
argc++;
|
||||
}
|
||||
for ( a=gpg->arglist; a; a = a->next ) {
|
||||
if ( a->data ) {
|
||||
switch ( _gpgme_data_get_mode (a->data) ) {
|
||||
@ -535,7 +548,7 @@ _gpgme_gpg_spawn( GpgObject gpg, void *opaque )
|
||||
close (fd);
|
||||
}
|
||||
|
||||
execv ("./gpg", gpg->argv );
|
||||
execv ("/usr/local/bin/gpg", gpg->argv );
|
||||
fprintf (stderr,"exec of gpg failed\n");
|
||||
_exit (8);
|
||||
}
|
||||
|
@ -1,8 +1,10 @@
|
||||
## Process this file with automake to create Makefile.in
|
||||
|
||||
TESTS_ENVIRONMENT = GNUPGHOME=.
|
||||
|
||||
TESTS = t-encrypt t-sign t-decrypt t-verify t-keylist
|
||||
|
||||
EXTRA_DIST = cipher-1.asc geheim.txt
|
||||
EXTRA_DIST = mkdemodirs pubdemo.asc secdemo.asc cipher-1.asc geheim.txt
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
|
||||
|
||||
@ -11,4 +13,28 @@ LDADD = ../gpgme/libgpgme.la
|
||||
|
||||
noinst_PROGRAMS = $(TESTS)
|
||||
|
||||
distclean-local:
|
||||
$(srcdir)/mkdemodirs --clean
|
||||
|
||||
all-local: ./pubring.gpg ./secring.gpg
|
||||
|
||||
./pubring.gpg: $(srcdir)/pubdemo.asc
|
||||
-gpg --homedir . --import $(srcdir)/pubdemo.asc
|
||||
|
||||
./secring.gpg: ./Alpha/Secret.gpg
|
||||
-gpg --homedir . --import Alpha/Secret.gpg Zulu/Secret.gpg
|
||||
|
||||
./Alpha/Secret.gpg: secdemo.asc
|
||||
srcdir=$(srcdir) $(srcdir)/mkdemodirs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -51,6 +51,22 @@ print_data ( GpgmeData dh )
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
mk_fname ( const char *fname )
|
||||
{
|
||||
const char *srcdir = getenv ("srcdir");
|
||||
char *buf;
|
||||
|
||||
if (!srcdir)
|
||||
srcdir = ".";
|
||||
buf = malloc (strlen(srcdir) + strlen(fname) + 2 );
|
||||
if (!buf )
|
||||
exit (8);
|
||||
strcpy (buf, srcdir);
|
||||
strcat (buf, "/");
|
||||
strcat (buf, fname );
|
||||
return buf;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv )
|
||||
@ -58,12 +74,13 @@ main (int argc, char **argv )
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
const char *cipher_1_asc = mk_fname ("cipher-1.asc");
|
||||
|
||||
do {
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
|
||||
err = gpgme_data_new_from_file ( &in, "cipher-1.asc", 1 );
|
||||
err = gpgme_data_new_from_file ( &in, cipher_1_asc, 1 );
|
||||
fail_if_err (err);
|
||||
|
||||
err = gpgme_data_new ( &out );
|
||||
|
Loading…
Reference in New Issue
Block a user