[dev] S/MIME again

Cliff Green green@UMDNJ.EDU
Fri, 27 Sep 2002 16:59:03 -0400


Quoting Michael M Slusarz <slusarz@bigworm.colorado.edu>:
 
> Your code looks correct and should send the correct message (with a content-
> type of "multipart/signed").  If it isn't, try the following:
> 1.) There is an extra single quote in the following line:
>    $sign_part->setContentTypeParameter('protocol', \
>  "application/x-pkcs7-signature"');

Okay, the unbalanced quotes was due to bad editing on my part, to make the stuff
visible in my message.  I've removed the remaining single quote (so it's
balanced), but that didn't quite help.

Also, I noticed after sending that last msg that I'm now sending out duplicates
of attachments.

So, I revised the if clause in compose.php to be like:
  if (send smime) {
       do stuff 
  } elseif (send pgp) {
       do stuff
  } else {
    just send the body
  }

to try to cut down on the extra cruft.

Now, when sending a signed msg, I show one copy of the body, and two copies of
the signature.  Actually, the raw message shows the properly formatted signed
message wrapped by another body and mime delimiter.

The signature verifies, but one must click on the link to open another window to
display the icons and comments.

Soooo Clooose.

> 2.) make sure no other unwanted cases are being run in compose.php (e.g. a
> blank text part being added).

I don't think so.  More later.

> 3.) do print_r() dumps of $mime and $sign_part right before the message is
> sent and send them to me.

I'm being hustled out of the house just now, so I'll come back to this later.

(And I apologize in advance if there's a dupe of this message.)

c
-- 
Cliff Green
Academic Computing Services - UMDNJ
Signature under NDA