Removing some debugging output now that we have settled down the signing issue
Got rid of the segfault when writing a CMS message to SMIME. Still not fully adding notes though