|
|
@ -29,6 +29,7 @@ |
|
|
|
#include <time.h> |
|
|
|
#include <unistd.h> |
|
|
|
#include <sys/stat.h> |
|
|
|
#include <err.h> |
|
|
|
|
|
|
|
#include <gpgme.h> |
|
|
|
#include <magic.h> |
|
|
@ -121,7 +122,7 @@ typedef struct fmail_ctx |
|
|
|
static char * |
|
|
|
generate_boundary(char *buffer, size_t len) |
|
|
|
{ |
|
|
|
int i; |
|
|
|
unsigned i; |
|
|
|
|
|
|
|
for ( i = 0; i < len - 1; i++ ) |
|
|
|
buffer[i] = base64_chars[rand() % (sizeof(base64_chars) - 1)]; |
|
|
@ -258,7 +259,7 @@ static void |
|
|
|
process_text_body(fmail_ctx_t *ctx, FILE *out) |
|
|
|
{ |
|
|
|
char boundary[32]; |
|
|
|
int i; |
|
|
|
unsigned i; |
|
|
|
|
|
|
|
if ( ctx->att_count > 0 ) { |
|
|
|
generate_boundary(boundary, sizeof(boundary)); |
|
|
@ -356,7 +357,6 @@ sign_stream(gpgme_ctx_t ctx, FILE *in, FILE *out) |
|
|
|
|
|
|
|
gpgme_op_sign(ctx, gin, gout, GPGME_SIG_MODE_DETACH); |
|
|
|
result = gpgme_op_sign_result(ctx); |
|
|
|
result->signatures->hash_algo; |
|
|
|
|
|
|
|
generate_boundary(boundary, sizeof(boundary)); |
|
|
|
fprintf(out, "Content-Type: multipart/signed;\r\n" |
|
|
|