How to add a timestamp to a signed message?

From: Karin (
Date: 05/19/03

Date: 19 May 2003 01:23:06 -0700

I am using Microsoft CryptoAPI for signing messages with detached
contents (using the function CryptSignMessage). I need to be able to
add a timestamp to the resulting message BLOB (and of course be able
to retrieve it when decoding the message).
Any one knows how that can be done ? I suspect it might be necessary
to use CryptMsgControl, but I m not quite sure how exactly. Any help
will be appreciated.
Thank you