Hi Monks,

Customer is trying to decrypt the mailfile and write another file with decrypted email data. but getting empty file. below command giving me below error, what could be the possible reasons. this seems to have happened after customer updated there certificate before that same command seemed to be working fine.

#command my $system_output = system("$OPENSSL smime -decrypt -in $mailfile -rec +ip $RECIP_CERT -inkey $RECIP_KEY -passin pass:$RECIP_PASSWORD > ${ma +ilfile}.txt"); &DebugIncoming("SYSTEM OUTPUT : $system_output"); &DebugIncoming("FILE SIZE :". -s ${mailfile}.txt); ##it returning empt +y file.
#Error in detail Error reading S/MIME message 2992:error:0D0D40CD:asn1 encoding routines:SMIME_read_ASN1:invalid mim +e type:crypto/asn1/asn_mime.c:460:type: multipart/alternative
Thank you.

In reply to Error reading S/MIME message with openssl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.