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.
# 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
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 );
}
if ( need_special )
argc++;
+ if (use_agent)
+ argc++;
argv = xtrycalloc ( argc+1, sizeof *argv );
if (!argv)
}
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) ) {
close (fd);
}
- execv ("./gpg", gpg->argv );
+ execv ("/usr/local/bin/gpg", gpg->argv );
fprintf (stderr,"exec of gpg failed\n");
_exit (8);
}
## 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
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
+
+
+
+
+
+
+
+
+
+
+
}
+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 )
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 );