From: Marcus Brinkmann Date: Thu, 22 Nov 2001 18:48:53 +0000 (+0000) Subject: 2001-11-22 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~1247 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=20b4415d809e1379416c2d82b3339286b2fa890b;p=gpgme.git 2001-11-22 Marcus Brinkmann * gpgme.h (gpgme_set_protocol): New prototype. 2001-11-22 Marcus Brinkmann * Makefile.am (libgpgsmplug_la_LIBADD): New variable. (libgpgsmplug_la_LDFLAGS): Likewise. (libgpgsmplug_la_SOURCES): Likewise. (lib_LTLIBRARIES): Add libgpgsmplug.la. (INCLUDES): Include the local gpgme.h. * gpgmeplug.c (signMessage): Set protocol. (GPGMEPLUG_PROTOCOL) [!GPGMEPLUG_PROTOCOL]: Set GPGMEPLUG_PROTOCOL. * gpgsmplug.c: New file. --- diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 419eda8..ed126a8 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,7 @@ +2001-11-22 Marcus Brinkmann + + * gpgme.h (gpgme_set_protocol): New prototype. + 2001-11-22 Marcus Brinkmann * engine-gpgsm.c (_gpgme_gpgsm_op_decrypt): New function. diff --git a/trunk/gpgme/gpgme.h b/trunk/gpgme/gpgme.h index 5ef5aaa..7a0f657 100644 --- a/trunk/gpgme/gpgme.h +++ b/trunk/gpgme/gpgme.h @@ -173,6 +173,7 @@ void gpgme_cancel (GpgmeCtx c); GpgmeCtx gpgme_wait (GpgmeCtx c, int hang); char *gpgme_get_notation (GpgmeCtx c); +GpgmeError gpgme_set_protocol (GpgmeCtx c, GpgmeProtocol prot); void gpgme_set_armor (GpgmeCtx c, int yes); int gpgme_get_armor (GpgmeCtx c); void gpgme_set_textmode (GpgmeCtx c, int yes); diff --git a/trunk/gpgmeplug/ChangeLog b/trunk/gpgmeplug/ChangeLog index 0b0e249..88180c3 100644 --- a/trunk/gpgmeplug/ChangeLog +++ b/trunk/gpgmeplug/ChangeLog @@ -1,3 +1,16 @@ +2001-11-22 Marcus Brinkmann + + * Makefile.am (libgpgsmplug_la_LIBADD): New variable. + (libgpgsmplug_la_LDFLAGS): Likewise. + (libgpgsmplug_la_SOURCES): Likewise. + (lib_LTLIBRARIES): Add libgpgsmplug.la. + (INCLUDES): Include the local gpgme.h. + + * gpgmeplug.c (signMessage): Set protocol. + (GPGMEPLUG_PROTOCOL) [!GPGMEPLUG_PROTOCOL]: Set + GPGMEPLUG_PROTOCOL. + * gpgsmplug.c: New file. + 2001-11-21 Marcus Brinkmann * gpgmeplug.c: Include config.h only if [HAVE_CONFIG_H]. Do not diff --git a/trunk/gpgmeplug/Makefile.am b/trunk/gpgmeplug/Makefile.am index 81db784..d4c51af 100644 --- a/trunk/gpgmeplug/Makefile.am +++ b/trunk/gpgmeplug/Makefile.am @@ -24,22 +24,28 @@ ## Process this file with automake to produce Makefile.in -INCLUDES = -I.. -I../gpgme -I$(top_srcdir)/include +INCLUDES = -I$(top_srcdir)/gpgme #LDADD = ../gpgme/libgpgme.la libgpgmeplug_la_LIBADD = ../gpgme/libgpgme.la +libgpgsmplug_la_LIBADD = ../gpgme/libgpgme.la BUILT_SOURCES = #noinst_LIBRARIES = libgpgmeplug.a #noinst_LTLIBRARIES = libgpgmeplug.la -lib_LTLIBRARIES = libgpgmeplug.la +lib_LTLIBRARIES = libgpgmeplug.la libgpgsmplug.la libgpgmeplug_la_LDFLAGS = -shared -Wl,-soname,libgpgmeplug.so +libgpgsmplug_la_LDFLAGS = -shared -Wl,-soname,libgpgsmplug.so libgpgmeplug_la_SOURCES = gpgme.h \ cryptplug.h \ gpgmeplug.c +libgpgsmplug_la_SOURCES = gpgme.h \ + cryptplug.h \ + gpgmeplug.c + diff --git a/trunk/gpgmeplug/gpgmeplug.c b/trunk/gpgmeplug/gpgmeplug.c index eac049e..05d1438 100644 --- a/trunk/gpgmeplug/gpgmeplug.c +++ b/trunk/gpgmeplug/gpgmeplug.c @@ -52,6 +52,9 @@ #include #include "gpgme.h" +#ifndef GPGMEPLUG_PROTOCOL +#define GPGMEPLUG_PROTOCOL GPGME_PROTOCOL_OpenPGP +#endif #include "cryptplug.h" @@ -719,6 +722,7 @@ bool signMessage( const char* cleartext, return false; gpgme_new (&ctx); + gpgme_set_protocol (ctx, GPGMEPLUG_PROTOCOL); diff --git a/trunk/gpgmeplug/gpgsmplug.c b/trunk/gpgmeplug/gpgsmplug.c new file mode 100644 index 0000000..f618267 --- /dev/null +++ b/trunk/gpgmeplug/gpgsmplug.c @@ -0,0 +1,2 @@ +#define GPGMEPLUG_PROTOCOL GPGME_PROTOCOL_CMS +#include "gpgmeplug.c"