cruft--
authorPierre Habouzit <madcoder@debian.org>
Mon, 2 Apr 2007 22:56:05 +0000 (00:56 +0200)
committerPierre Habouzit <madcoder@debian.org>
Mon, 2 Apr 2007 22:56:05 +0000 (00:56 +0200)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
lib-crypt/Makefile.am
lib-crypt/crypt-gpgme.h
lib-crypt/crypt-mod.h [deleted file]
lib-crypt/cryptglue.c

index 89eda9d..a4d7298 100644 (file)
@@ -1,9 +1,8 @@
 noinst_LIBRARIES = libcrypt.a
 
-libcrypt_a_SOURCES = crypt.h crypt-mod.h \
-                    crypt.c \
-                    cryptglue.c \
-                    crypt-gpgme.h crypt-gpgme.c
+libcrypt_a_SOURCES = crypt.h crypt-gpgme.h \
+                    crypt.c crypt-gpgme.c \
+                    cryptglue.c
 
 noinst_HEADERS     =  crypt.h crypt-gpgme.h
 
index 45f9145..4fabd3c 100644 (file)
 
 #include <lib-crypt/crypt.h>
 
+/* {{{ cruft */
+
+/* Type defintions for crypto module functions. */
+typedef int (*crypt_func_decrypt_mime_t) (FILE * a, FILE ** b,
+                                          BODY * c, BODY ** d);
+
+typedef int (*crypt_func_application_handler_t) (BODY * m, STATE * s);
+typedef int (*crypt_func_encrypted_handler_t) (BODY * m, STATE * s);
+
+typedef void (*crypt_func_pgp_invoke_getkeys_t) (address_t * addr);
+typedef int (*crypt_func_pgp_check_traditional_t) (FILE * fp, BODY * b,
+                                                   int tagged_only);
+typedef BODY *(*crypt_func_pgp_traditional_encryptsign_t) (BODY * a,
+                                                           int flags,
+                                                           char *keylist);
+typedef BODY *(*crypt_func_pgp_make_key_attachment_t) (char *tempf);
+typedef char *(*crypt_func_findkeys_t) (address_t * to,
+                                        address_t * cc, address_t * bcc);
+typedef BODY *(*crypt_func_sign_message_t) (BODY * a);
+typedef BODY *(*crypt_func_pgp_encrypt_message_t) (BODY * a, char *keylist,
+                                                   int sign);
+typedef void (*crypt_func_pgp_invoke_import_t) (const char *fname);
+typedef int (*crypt_func_verify_one_t) (BODY * sigbdy, STATE * s,
+                                        const char *tempf);
+typedef void (*crypt_func_pgp_extract_keys_from_attachment_list_t)
+     (FILE * fp, int tag, BODY * top);
+
+typedef int (*crypt_func_send_menu_t) (HEADER * msg, int *redraw);
+
+ /* (SMIME) */
+typedef void (*crypt_func_smime_getkeys_t) (ENVELOPE * env);
+typedef int (*crypt_func_smime_verify_sender_t) (HEADER * h);
+
+typedef BODY *(*crypt_func_smime_build_smime_entity_t) (BODY * a,
+                                                        char *certlist);
+
+typedef void (*crypt_func_smime_invoke_import_t) (char *infile,
+                                                  char *mailbox);
+
+typedef void (*crypt_func_init_t) (void);
+
+
+typedef struct crypt_module_specs {
+    /* Common/General functions.  */
+    crypt_func_init_t init;
+    crypt_func_decrypt_mime_t decrypt_mime;
+    crypt_func_application_handler_t application_handler;
+    crypt_func_encrypted_handler_t encrypted_handler;
+    crypt_func_findkeys_t findkeys;
+    crypt_func_sign_message_t sign_message;
+    crypt_func_verify_one_t verify_one;
+    crypt_func_send_menu_t send_menu;
+
+    /* PGP specific functions.  */
+    crypt_func_pgp_encrypt_message_t pgp_encrypt_message;
+    crypt_func_pgp_make_key_attachment_t pgp_make_key_attachment;
+    crypt_func_pgp_check_traditional_t pgp_check_traditional;
+    crypt_func_pgp_traditional_encryptsign_t pgp_traditional_encryptsign;
+    crypt_func_pgp_invoke_getkeys_t pgp_invoke_getkeys;
+    crypt_func_pgp_invoke_import_t pgp_invoke_import;
+
+    crypt_func_pgp_extract_keys_from_attachment_list_t
+        pgp_extract_keys_from_attachment_list;
+
+    /* S/MIME specific functions.  */
+
+    crypt_func_smime_getkeys_t smime_getkeys;
+    crypt_func_smime_verify_sender_t smime_verify_sender;
+    crypt_func_smime_build_smime_entity_t smime_build_smime_entity;
+    crypt_func_smime_invoke_import_t smime_invoke_import;
+} crypt_module_specs_t;
+
+extern struct crypt_module_specs crypt_mod_SMIME_gpgme;
+extern struct crypt_module_specs crypt_mod_PGP_gpgme;
+
+#define CRYPT_MOD_CALL_CHECK(identifier, func) \
+    ((crypt_mod_##identifier##_gpgme).func)
+
+#define CRYPT_MOD_CALL(identifier, func) \
+    (*((crypt_mod_##identifier##_gpgme).func))
+
+
+/* }}} */
+
 void pgp_gpgme_init (void);
 void smime_gpgme_init (void);
 
diff --git a/lib-crypt/crypt-mod.h b/lib-crypt/crypt-mod.h
deleted file mode 100644 (file)
index fa1833d..0000000
+++ /dev/null
@@ -1,95 +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.
- */
-
-#ifndef CRYPTOGRAPHY_H
-#define CRYPTOGRAPHY_H
-
-#include <lib-mime/mime.h>
-#include "crypt.h"
-
-/* Type defintions for crypto module functions. */
-typedef int (*crypt_func_decrypt_mime_t) (FILE * a, FILE ** b,
-                                          BODY * c, BODY ** d);
-
-typedef int (*crypt_func_application_handler_t) (BODY * m, STATE * s);
-typedef int (*crypt_func_encrypted_handler_t) (BODY * m, STATE * s);
-
-typedef void (*crypt_func_pgp_invoke_getkeys_t) (address_t * addr);
-typedef int (*crypt_func_pgp_check_traditional_t) (FILE * fp, BODY * b,
-                                                   int tagged_only);
-typedef BODY *(*crypt_func_pgp_traditional_encryptsign_t) (BODY * a,
-                                                           int flags,
-                                                           char *keylist);
-typedef BODY *(*crypt_func_pgp_make_key_attachment_t) (char *tempf);
-typedef char *(*crypt_func_findkeys_t) (address_t * to,
-                                        address_t * cc, address_t * bcc);
-typedef BODY *(*crypt_func_sign_message_t) (BODY * a);
-typedef BODY *(*crypt_func_pgp_encrypt_message_t) (BODY * a, char *keylist,
-                                                   int sign);
-typedef void (*crypt_func_pgp_invoke_import_t) (const char *fname);
-typedef int (*crypt_func_verify_one_t) (BODY * sigbdy, STATE * s,
-                                        const char *tempf);
-typedef void (*crypt_func_pgp_extract_keys_from_attachment_list_t)
-     (FILE * fp, int tag, BODY * top);
-
-typedef int (*crypt_func_send_menu_t) (HEADER * msg, int *redraw);
-
- /* (SMIME) */
-typedef void (*crypt_func_smime_getkeys_t) (ENVELOPE * env);
-typedef int (*crypt_func_smime_verify_sender_t) (HEADER * h);
-
-typedef BODY *(*crypt_func_smime_build_smime_entity_t) (BODY * a,
-                                                        char *certlist);
-
-typedef void (*crypt_func_smime_invoke_import_t) (char *infile,
-                                                  char *mailbox);
-
-typedef void (*crypt_func_init_t) (void);
-
-
-typedef struct crypt_module_specs {
-    /* Common/General functions.  */
-    crypt_func_init_t init;
-    crypt_func_decrypt_mime_t decrypt_mime;
-    crypt_func_application_handler_t application_handler;
-    crypt_func_encrypted_handler_t encrypted_handler;
-    crypt_func_findkeys_t findkeys;
-    crypt_func_sign_message_t sign_message;
-    crypt_func_verify_one_t verify_one;
-    crypt_func_send_menu_t send_menu;
-
-    /* PGP specific functions.  */
-    crypt_func_pgp_encrypt_message_t pgp_encrypt_message;
-    crypt_func_pgp_make_key_attachment_t pgp_make_key_attachment;
-    crypt_func_pgp_check_traditional_t pgp_check_traditional;
-    crypt_func_pgp_traditional_encryptsign_t pgp_traditional_encryptsign;
-    crypt_func_pgp_invoke_getkeys_t pgp_invoke_getkeys;
-    crypt_func_pgp_invoke_import_t pgp_invoke_import;
-
-    crypt_func_pgp_extract_keys_from_attachment_list_t
-        pgp_extract_keys_from_attachment_list;
-
-    /* S/MIME specific functions.  */
-
-    crypt_func_smime_getkeys_t smime_getkeys;
-    crypt_func_smime_verify_sender_t smime_verify_sender;
-    crypt_func_smime_build_smime_entity_t smime_build_smime_entity;
-    crypt_func_smime_invoke_import_t smime_invoke_import;
-} crypt_module_specs_t;
-
-struct crypt_module_specs crypt_mod_SMIME_gpgme;
-struct crypt_module_specs crypt_mod_PGP_gpgme;
-
-#define CRYPT_MOD_CALL_CHECK(identifier, func) \
-    ((crypt_mod_##identifier##_gpgme).func)
-
-#define CRYPT_MOD_CALL(identifier, func) \
-    (*((crypt_mod_##identifier##_gpgme).func))
-
-#endif
index ea5ba59..904e4bb 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "mutt.h"
 #include "crypt.h"
-#include "crypt-mod.h"
 #include "crypt-gpgme.h"
 
 struct crypt_module_specs crypt_mod_SMIME_gpgme = {