verifying sign using S/MIME signed-data

Hi,all! I need help anybody familiar with S/MIME format. In my current project I must verify e-mail message sign.My signed message  look like:

..............................whole message title........................


------------3B1811451B00BA09
Content-Type: text/plain; charset=Windows-1251
Content-Transfer-Encoding: 8bit

test

................................followed smime.p7s attachment section.........

Sign is verified by MS CryptoAPI function CryptVerifyDetachedMessageSignature.
My question is what is message part signed, any words, what signed message boundaries, is signed message "test",
"

test

", or
"
------------3B1811451B00BA09
Content-Type: text/plain; charset=Windows-1251
Content-Transfer-Encoding: 8bit

test

" ? Any help appreciate.
Yurij_JilovAsked:
Who is Participating?
 
DarthModConnect With a Mentor Commented:
PAQed with points (100) refunded

DarthMod
Community Support Moderator
0
 
qwaleteeCommented:
This is using LotusScript?

You would probably want to extra the full message content as a single on-disk file, and run the MS API against it.  You will need to use the DEFINE statement in LotusScript (Definitions) section to create a header for calling the MS functions, and you will have to fiddle with getting the parameters to match variables that you can pass and retrieve properly.

The way to extract the MIME is to use either Notes API calls in a similar way to calling the MS API.  Or, you can use the Notes LotusScript API to extract MIME sections as text variables, and write them to disk.  How you do that will depend on whether your code runs in R6 or R5.
0
 
Yurij_JilovAuthor Commented:
OK! My problem is not to extract MIME content from document ( i am using NSF_HOOKS to intercept  notes client actions to open/update document). I need know what message part was signed by sending mail agent to verify sign. I have whole MIME content and attached smime.p7s file (sign+certificate), on Windows i can use CryptoAPI to verify sign, in particular CryptVerifyDetachedMessageSignature to carry out this service. To use one i need know signed block of MIME. On sending message contained "test" word, but attempting to verify "test" only get result "Invalid signature", apparently signed block contains more info than just "test". I am not assured my question for this forum, just S/MIME word more meets on this forum :-)))))
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
qwaleteeCommented:
That's a tough one.  I don't know how a Domino-stored S/MIME message woudl look different than i any other system.  I guess you could send the signed message to an INternet account and a Notes account, and see if there is any difference between your extracted MIEM and the Internet mailbox message source.  If there is no difference, tnen you are oding something wrong.  If there is a difference, and you can see how to reconcile that diofference, you will have solved your problem.
0
 
Yurij_JilovAuthor Commented:
Problem was solved.In my case was signed this block:
//-----------------------------------
Content-Type: text/plain; charset=Windows-1251
Content-Transfer-Encoding: 8bit

test
//------------------------------------------

if must to sign multyple/mixed type block then signed block look like:
//---------------------------------------
Content-Type: multyple/mixed;boundary = "xyz"
...........block content...........................
----xyz--
//---------------------------------------

How I can close question?
0
 
pavankvnaiduCommented:
I am having problems in verifying the signed mail, I am not what parameter need to send to the method 'CryptVerifyDetachedMessageSignature' can you please explain?
I have one more doubt, if there is an attachment which content we need to send?

do we need to send both message and attachment content as the parameter?
do we need to encode it?

From the mime content, I have smime.p7s file, and I am sending just message with out mime content and I am getting the error 'Hash value not correct'

please explain it.

Thank you.
0
 
marilyngCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    PAQ with points refunded

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

marilyng
EE Cleanup Volunteer
0
All Courses

From novice to tech pro — start learning today.