From 9d1641a5734ec763a34e90882340d79f6eb5e374 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 14 May 2001 21:14:34 +0000 Subject: Add camel-smime-context.[c,h] and camel-smime.[c,h] to the build. 2001-05-14 Jeffrey Stedfast * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h] to the build. * camel-smime.[c,h]: New source files for manipulating S/MIME message parts. svn path=/trunk/; revision=9799 --- camel/camel-pgp-mime.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'camel/camel-pgp-mime.c') diff --git a/camel/camel-pgp-mime.c b/camel/camel-pgp-mime.c index a9eef4e7cc..ba91804579 100644 --- a/camel/camel-pgp-mime.c +++ b/camel/camel-pgp-mime.c @@ -244,6 +244,20 @@ camel_pgp_mime_part_sign (CamelPgpContext *context, CamelMimePart **mime_part, c /* construct the signature stream */ sigstream = camel_stream_mem_new (); + switch (hash) { + case CAMEL_CIPHER_HASH_MD5: + hash_type = "pgp-md5"; + break; + case CAMEL_CIPHER_HASH_SHA1: + hash_type = "pgp-sha1"; + break; + default: + /* set a reasonable default */ + hash = CAMEL_CIPHER_HASH_SHA1; + hash_type = "pgp-sha1"; + break; + } + /* get the signature */ if (camel_pgp_sign (context, userid, hash, stream, sigstream, ex) == -1) { camel_object_unref (CAMEL_OBJECT (stream)); @@ -269,20 +283,6 @@ camel_pgp_mime_part_sign (CamelPgpContext *context, CamelMimePart **mime_part, c camel_object_unref (CAMEL_OBJECT (sigstream)); /* construct the container multipart/signed */ - switch (hash) { - case CAMEL_CIPHER_HASH_MD5: - hash_type = "pgp-md5"; - break; - case CAMEL_CIPHER_HASH_SHA1: - hash_type = "pgp-sha1"; - break; - default: - /* set a reasonable default */ - hash = CAMEL_CIPHER_HASH_SHA1; - hash_type = "pgp-sha1"; - break; - } - multipart = camel_multipart_new (); mime_type = header_content_type_new ("multipart", "signed"); -- cgit