What's the format of the result of CryptEncryptMessage?

What's the format of the result of CryptEncryptMessage?

Post by WS5K » Fri, 18 Sep 2009 19:45:01


Hi,

I need to use CryptoAPI to write the client app, and use OpenSSL to write
the server side.
When I use CryptSignMessage to sign a message, I can use PKCS#7 API to
parse it, so I think the result of CryptSignMessage is PKCS#7 format.
But, if I use CryptEncryptMessage or CryptSignAndEncryptMessage, the
result can NOT be parsed by PKCS#7 API.
So I want to know, what's the format of the result of CryptEncryptMessage
or CryptSignAndEncryptMessage?

Thanks in advance.
 
 
 

What's the format of the result of CryptEncryptMessage?

Post by RGFuIEdyaW » Thu, 15 Oct 2009 04:50:01

I guarantee it's a P#7 in both cases. In the encrypted case, it may be
enveloped. If so, would you need to use the API differently to parse it?