Finish previous fix
authorColin Leroy <colin@colino.net>
Fri, 26 Jul 2013 13:59:15 +0000 (15:59 +0200)
committerColin Leroy <colin@colino.net>
Fri, 26 Jul 2013 13:59:15 +0000 (15:59 +0200)
src/plugins/pgpcore/plugin.def
src/plugins/pgpinline/claws.def
src/plugins/pgpinline/mypgpcore.def
src/plugins/smime/mypgpcore.def
src/plugins/smime/smime.c

index 8ba04621f8cecd7ff4c402e9ca3969325eefb93d..56b0e3106bfe65d07ce0f7337bd1af94a26c3f8b 100644 (file)
@@ -26,3 +26,6 @@ EXPORTS
         prefs_gpg_get_config
 
        cm_gpgme_data_rewind
+
+       get_part_as_string
+       fp_read_noconv
index 75f83a65096186c5bee2f1e8473b13494de15cee..c9f0ecd18500d027aea4d0b18bb7edd28a430cb4 100644 (file)
@@ -22,4 +22,3 @@ procmime_scan_file
 procmime_write_mimeinfo
 procmime_get_part
 procmime_get_tmp_file_name
-fp_read_noconv
index 1e17672824ba16d85321695a0f32dbfc73007ebf..a2f5c66cc75de6b72b64b96d0958ec17bbfb70e3 100644 (file)
@@ -17,3 +17,4 @@ sgpgme_verify_signature
 get_part_as_string
 pgp_locate_armor_header
 prefs_gpg_auto_check_signatures
+fp_read_noconv
index 44dd8d22e10904c199045ab8525c91323b8ef068..eeba4735ccecddfdd3520e401add6d8c1d73beb3 100644 (file)
@@ -17,3 +17,4 @@ sgpgme_sigstat_info_short
 sgpgme_verify_signature
 cm_gpgme_data_rewind
 prefs_gpg_auto_check_signatures
+fp_read_noconv
index f439796ea9bf219b384ef3562cd197bb2db7cb4f..465704504a782e5cc4f849d9b63f08a107f427ec 100644 (file)
@@ -38,6 +38,7 @@
 #include "smime.h"
 #include <plugins/pgpcore/sgpgme.h>
 #include <plugins/pgpcore/prefs_gpg.h>
+#include <plugins/pgpcore/pgp_utils.h>
 #include <plugins/pgpcore/passphrase.h>
 
 #include "alertpanel.h"
@@ -692,37 +693,6 @@ static void smime_inhibit_encrypt_warning(gboolean inhibit)
                prefs_gpg_remove_skip_encryption_warning(smime_system.id);
 }
 
-static gchar *fp_read_noconv(FILE *fp)
-{
-       GByteArray *array;
-       guchar buf[BUFSIZ];
-       gint n_read;
-       gchar *result = NULL;
-
-       if (!fp)
-               return NULL;
-       array = g_byte_array_new();
-
-       while ((n_read = fread(buf, sizeof(gchar), sizeof(buf), fp)) > 0) {
-               if (n_read < sizeof(buf) && ferror(fp))
-                       break;
-               g_byte_array_append(array, buf, n_read);
-       }
-
-       if (ferror(fp)) {
-               FILE_OP_ERROR("file stream", "fread");
-               g_byte_array_free(array, TRUE);
-               return NULL;
-       }
-
-       buf[0] = '\0';
-       g_byte_array_append(array, buf, 1);
-       result = (gchar *)array->data;
-       g_byte_array_free(array, FALSE);
-       
-       return result;
-}
-
 gboolean smime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
 {
        MimeInfo *msgcontent, *encmultipart;