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 8ba0462..56b0e31 100644 (file)
@@ -26,3 +26,6 @@ EXPORTS
         prefs_gpg_get_config
 
        cm_gpgme_data_rewind
+
+       get_part_as_string
+       fp_read_noconv
index 75f83a6..c9f0ecd 100644 (file)
@@ -22,4 +22,3 @@ procmime_scan_file
 procmime_write_mimeinfo
 procmime_get_part
 procmime_get_tmp_file_name
-fp_read_noconv
index 1e17672..a2f5c66 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 44dd8d2..eeba473 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 f439796..4657045 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;