drop even more glue.
authorPierre Habouzit <madcoder@debian.org>
Mon, 2 Apr 2007 22:37:44 +0000 (00:37 +0200)
committerPierre Habouzit <madcoder@debian.org>
Mon, 2 Apr 2007 22:37:44 +0000 (00:37 +0200)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
lib-crypt/Makefile.am
lib-crypt/crypt-mod-pgp-gpgme.c [deleted file]
lib-crypt/crypt-mod-smime-gpgme.c [deleted file]
lib-crypt/cryptglue.c

index ab296ba..eaefdb9 100644 (file)
@@ -3,8 +3,8 @@ noinst_LIBRARIES = libcrypt.a
 libcrypt_a_SOURCES = crypt.h crypt-mod.h \
                     crypt.c crypt-mod.c \
                     cryptglue.c \
-                    crypt-gpgme.h crypt-gpgme.c crypt-mod-pgp-gpgme.c crypt-mod-smime-gpgme.c
+                    crypt-gpgme.h crypt-gpgme.c
 
-noinst_HEADERS     =  smime.h crypt.h crypt-mod.h crypt-gpgme.h
+noinst_HEADERS     =  crypt.h crypt-mod.h crypt-gpgme.h
 
 -include $(top_builddir)/tools/cflags.mk
diff --git a/lib-crypt/crypt-mod-pgp-gpgme.c b/lib-crypt/crypt-mod-pgp-gpgme.c
deleted file mode 100644 (file)
index da506f2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright notice from original mutt:
- * Copyright (C) 2004 g10 Code GmbH
- *
- * This file is part of mutt-ng, see http://www.muttng.org/.
- * It's licensed under the GNU General Public License,
- * please see the file GPL in the top level source directory.
- */
-
-/* This is a crytpo module wrapping the gpgme based pgp code.  */
-
-#include <lib-lib/lib-lib.h>
-
-#include <lib-crypt/crypt-mod.h>
-#include "crypt-gpgme.h"
-
-struct crypt_module_specs crypt_mod_pgp_gpgme = { APPLICATION_PGP,
-    {
-        /* Common.  */
-        pgp_gpgme_init,
-        pgp_gpgme_decrypt_mime,
-        pgp_gpgme_application_handler,
-        pgp_gpgme_encrypted_handler,
-        pgp_gpgme_findkeys,
-        pgp_gpgme_sign_message,
-        pgp_gpgme_verify_one,
-        pgp_gpgme_send_menu,
-
-        /* PGP specific.  */
-        pgp_gpgme_encrypt_message,
-        NULL,                        /* pgp_make_key_attachment, */
-        pgp_gpgme_check_traditional,
-        NULL,                        /* pgp_traditional_encryptsign  */
-        NULL,                        /* pgp_invoke_getkeys  */
-        pgp_gpgme_invoke_import,     /* pgp_invoke_import  */
-        pgp_gpgme_from_attachment_list,
-                                     /* pgp_extract_keys_from_attachment_list  */
-
-        NULL,                        /* smime_getkeys */
-        NULL,                        /* smime_verify_sender */
-        NULL,                        /* smime_build_smime_entity */
-        NULL,                        /* smime_invoke_import */
-    }
-};
diff --git a/lib-crypt/crypt-mod-smime-gpgme.c b/lib-crypt/crypt-mod-smime-gpgme.c
deleted file mode 100644 (file)
index 5396b28..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright notice from original mutt:
- * Copyright (C) 2004 g10 Code GmbH
- *
- * This file is part of mutt-ng, see http://www.muttng.org/.
- * It's licensed under the GNU General Public License,
- * please see the file GPL in the top level source directory.
- */
-
-/* 
-    This is a crytpo module wrapping the gpgme based smime code.
- */
-
-#include <lib-lib/lib-lib.h>
-
-#include <lib-crypt/crypt-mod.h>
-#include "crypt-gpgme.h"
-
-static void crypt_mod_smime_init (void)
-{
-  smime_gpgme_init ();
-}
-
-static int crypt_mod_smime_decrypt_mime (FILE * a, FILE ** b, BODY * c,
-                                         BODY ** d)
-{
-  return smime_gpgme_decrypt_mime (a, b, c, d);
-}
-
-static int crypt_mod_smime_application_handler (BODY * m, STATE * s)
-{
-  return smime_gpgme_application_handler (m, s);
-}
-
-static char *crypt_mod_smime_findkeys (address_t * to, address_t * cc,
-                                       address_t * bcc)
-{
-  return smime_gpgme_findkeys (to, cc, bcc);
-}
-
-static BODY *crypt_mod_smime_sign_message (BODY * a)
-{
-  return smime_gpgme_sign_message (a);
-}
-
-static int crypt_mod_smime_verify_one (BODY * sigbdy, STATE * s,
-                                       const char *tempf)
-{
-  return smime_gpgme_verify_one (sigbdy, s, tempf);
-}
-
-static int crypt_mod_smime_send_menu (HEADER * msg, int *redraw)
-{
-  return smime_gpgme_send_menu (msg, redraw);
-}
-
-static BODY *crypt_mod_smime_build_smime_entity (BODY * a, char *certlist)
-{
-  return smime_gpgme_build_smime_entity (a, certlist);
-}
-
-static int crypt_mod_smime_verify_sender (HEADER * h)
-{
-  return smime_gpgme_verify_sender (h);
-}
-
-struct crypt_module_specs crypt_mod_smime_gpgme = { APPLICATION_SMIME,
-  {
-   crypt_mod_smime_init,
-   crypt_mod_smime_decrypt_mime,
-   crypt_mod_smime_application_handler,
-   NULL,                        /* encrypted_handler */
-   crypt_mod_smime_findkeys,
-   crypt_mod_smime_sign_message,
-   crypt_mod_smime_verify_one,
-   crypt_mod_smime_send_menu,
-
-   NULL,                        /* pgp_encrypt_message */
-   NULL,                        /* pgp_make_key_attachment */
-   NULL,                        /* pgp_check_traditional */
-   NULL,                        /* pgp_traditional_encryptsign */
-   NULL,                        /* pgp_invoke_getkeys */
-   NULL,                        /* pgp_invoke_import */
-   NULL,                        /* pgp_extract_keys_from_attachment_list */
-
-   NULL,                        /* smime_getkeys */
-   crypt_mod_smime_verify_sender,
-   crypt_mod_smime_build_smime_entity,
-   NULL,                        /* smime_invoke_import */
-   }
-};
index 046e777..742c4a0 100644 (file)
 #include "mutt.h"
 #include "crypt.h"
 #include "crypt-mod.h"
-
-/*
-    Generic
-*/
-
-extern struct crypt_module_specs crypt_mod_pgp_gpgme;
-extern struct crypt_module_specs crypt_mod_smime_gpgme;
+#include "crypt-gpgme.h"
+
+static struct crypt_module_specs crypt_mod_smime_gpgme = { APPLICATION_SMIME,
+    {
+        smime_gpgme_init,
+        smime_gpgme_decrypt_mime,
+        smime_gpgme_application_handler,
+        NULL,                        /* encrypted_handler */
+        smime_gpgme_findkeys,
+        smime_gpgme_sign_message,
+        smime_gpgme_verify_one,
+        smime_gpgme_send_menu,
+
+        NULL,                        /* pgp_encrypt_message */
+        NULL,                        /* pgp_make_key_attachment */
+        NULL,                        /* pgp_check_traditional */
+        NULL,                        /* pgp_traditional_encryptsign */
+        NULL,                        /* pgp_invoke_getkeys */
+        NULL,                        /* pgp_invoke_import */
+        NULL,                        /* pgp_extract_keys_from_attachment_list */
+
+        NULL,                        /* smime_getkeys */
+        smime_gpgme_verify_sender,
+        smime_gpgme_build_smime_entity,
+        NULL,                        /* smime_invoke_import */
+    }
+};
+
+static struct crypt_module_specs crypt_mod_pgp_gpgme = { APPLICATION_PGP,
+    {
+        pgp_gpgme_init,
+        pgp_gpgme_decrypt_mime,
+        pgp_gpgme_application_handler,
+        pgp_gpgme_encrypted_handler,
+        pgp_gpgme_findkeys,
+        pgp_gpgme_sign_message,
+        pgp_gpgme_verify_one,
+        pgp_gpgme_send_menu,
+
+        /* PGP specific.  */
+        pgp_gpgme_encrypt_message,
+        NULL,                        /* pgp_make_key_attachment, */
+        pgp_gpgme_check_traditional,
+        NULL,                        /* pgp_traditional_encryptsign  */
+        NULL,                        /* pgp_invoke_getkeys  */
+        pgp_gpgme_invoke_import,     /* pgp_invoke_import  */
+        pgp_gpgme_from_attachment_list,
+                                     /* pgp_extract_keys_from_attachment_list  */
+
+        NULL,                        /* smime_getkeys */
+        NULL,                        /* smime_verify_sender */
+        NULL,                        /* smime_build_smime_entity */
+        NULL,                        /* smime_invoke_import */
+    }
+};
 
 void crypt_init (void)
 {