Skip to content

Commit

Permalink
Fix failing conversion of signed messages
Browse files Browse the repository at this point in the history
The call to NSFNoteIsSignedOrSealed was preventing signed but encrypted mails from being converted
  • Loading branch information
adb014 authored Mar 30, 2017
1 parent 6afefc2 commit 0d70957
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nsf2x.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,11 +1098,11 @@ def ConvertToMIME(self, doc, _NotesEntries):
# The C API identifies some unencrypted mail as "Sealed". These don't need
# to be unencrypted to allow conversion to MIME.
enc = doc.GetFirstItem("Encrypt")
if enc != None and enc.Text == '1' :
if enc != None and enc.Text == '1':
# if the note is encrypted, try to decrypt it. If that fails
#(e.g., we don't have the key), then we can't convert to MIME
# (we don't care about the signature)
stat, isSigned, isSealed = _NotesEntries.NSFNoteIsSignedOrSealed(hNote)
isSignedSealed, isSigned, isSealed = _NotesEntries.NSFNoteIsSignedOrSealed(hNote)
if isSealed:
self.log(ErrorLevel.INFO, _("Document note id 0x%s is encrypted.") %
doc.NoteID)
Expand Down Expand Up @@ -1276,7 +1276,7 @@ def WriteMIMEOutput(self, f_mime, doc):
self.WriteMIMEChildren(f_mime, mime, True)
else:
enc = doc.GetFirstItem("Encrypt")
if enc != None and enc.Text == '1' :
if enc != None and enc.Text == '1':
# See https://msdn.microsoft.com/en-us/library/windows/desktop/aa382376(v=vs.85).aspx
# Note that the PROV_RSA_AES provider supplies RC2, RC4 and
# AES encryption whereas as the PROV_RSA_FULL provider only
Expand Down

0 comments on commit 0d70957

Please sign in to comment.