Framework EDI Reference. Methods and Properties
mailMessage. ProcessStep

Removes a single secure layer of the secured message.

Syntax:

Returns:

Returns 1 if the operation is successful; otherwise returns 0 if the operation fails.

Remarks:

Multiple layers of security can be applied to a message.  This method can be called multiple times in order to strip a single secured layer at a time.

Example:

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oMessage As Fredi.mailMessage
Dim oSecurities As Fredi.ediSecurities

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get securities.
Set oSecurities = oEdiDoc.GetSecurities

' Set the default certificate store
oSecurities.DefaultCertSystemStoreName = ksCertStoreName ' Case sensitive

' Set the default certificate store location
oSecurities.DefaultCertSystemStoreLocation = ksCertStoreLocation

' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument

' Disable auto-processing so that message can be read as is.
oMailDocument.Option(MailDocOpt_Auto) = 0

' Load the secured MIME document
oMailDocument.Load App.Path & "\SignedDataOutput.TXT"

' Get the message.
Set oMessage = oMailDocument.GetMessage

' First layer removed is the encoded message.
oMessage.ProcessStep

' Save first result. oMessage.Save App.Path & "\MyResultOutput1.TXT"

' Second layer removed is the signed message.
oMessage.ProcessStep

' Save final result.
oMessage.Save App.Path & "\MyResultOutput2.TXT"

MsgBox "Done"

Sample

M_ProcessStep.zip - Sample program to demonstrate use of ProcessStep method.
As2Unwrap.zip - Utility program to remove layers of security step-by-step in an AS2 message.