Re: How to get Certificates used on a message

From: Carlos (hobbit_ayla_at_hotmail.com)
Date: 10/29/03


Date: 29 Oct 2003 04:50:57 -0800

Hi Michel:

Thanks for your support.

But Michel, if I want to know to whom is the recipient and who signed
the message and I don't have that information? I can't possibly have
the certificates in My Store

The main purpose of this is that we have a exchange process of
commercial documents and we want to have the certificates used to
crypt and sign the document because some of the senders could be using
the wrong certificates and we wants to know that and what certificates
they are using.

But I will try to see what I can do with CryptMsgGetParam in VB or C,
I hope I can make a DLL

With my best thanks

Carlos Gustavo

"Michel Gallant" <neutron@nspxistar.ca> wrote in message news:<OlCuD6YnDHA.3316@tk2msftngp13.phx.gbl>...
> This is not really an issued with SignedData, since you simply
> verify signature and then can get the signers info (assuming the
> sig verification succeeds). You can't access that info without
> SignedData.Verify().
>
> CAPICOM.EnvelopedData is trickier :-) Again, you must explicitly
> Decrypt() to have valid information for EnvelopedData.Recipients collection,
> and by default at least one valid recipient cert/pvk must be in MY store.
>
> With CryptoAPI, you can more directly get recipients with:
> CryptMsgGetParam()
> with dwParamType = CMSG_RECIPIENT_INFO_PARAM
> and enumerate with value from CMSG_CMS_RECIPIENT_COUNT_PARAM and
> get basic CERT_INFO struct props to identify the recipients.
>
> - Michel Gallant
> Visual Security MVP
>
> "Carlos" <hobbit_ayla@hotmail.com> wrote in message
> news:705905b1.0310280806.7bf135e4@posting.google.com...
> > Hi:
> >
> > I am using CAPICOM to protect and sign messages with certificates.
> > It's all working except that I can't find a way do get the destination
> > recipient that should decrypt the message and who signed that. The
> > idea is, can I get that information from a encrypted document before I
> > decrypt it? The same applies to signed messages. I need to have
> > information but the only thing I know with CAPICOM (I am using VB6) is
> > I can decrypt or not and verify the signature but before that I can't
> > know and in same ways also the same after.
> > I am using certificates in the storage and because of that it's
> > everything automatic
> >
> > I already searched all the CAPICOM documentation and the news groups
> > and I didn't find nothing about that
> >
> > With my best thanks for your help
> >
> > Carlos Gustavo



Relevant Pages

  • Re: How to get Certificates used on a message
    ... This is not really an issued with SignedData, ... verify signature and then can get the signers info (assuming the ... Decrypt() to have valid information for EnvelopedData.Recipients collection, ... and by default at least one valid recipient cert/pvk must be in MY store. ...
    (microsoft.public.platformsdk.security)
  • RE: Creating CMS (version 3) Signed Cryptographic Message
    ... The fields of type SignedData have the following meanings: ... depends on certificates, eContentType, and SignerInfo. ... I can create a CMS signed message - but I can see no way to control the ... CMSG_VERSION_PARAM which can be passed into CryptMsgGetParam to ...
    (microsoft.public.platformsdk.security)
  • Re: Need digital signatures for signing documents sent to clients
    ... >How are these certificates different from SSL certificates? ... complex password on for read and for update. ... communicate the read password "out of band" to the recipient then they ...
    (comp.security.misc)
  • MailOptions.Security.EncryptContents
    ... certificates for both sender and recipient and can do it successfully ... because I need to encrypt for some recipients and not for others. ... searched the object model for "encrypt" without any success. ... it pops up a dialog for each recipient who does not have a certificate ...
    (microsoft.public.office.developer.outlook.vba)
  • MessageOptions.Security.EncryptContents
    ... certificates for both sender and recipient and can do it successfully ... because I need to encrypt for some recipients and not for others. ... searched the object model for "encrypt" without any success. ... it pops up a dialog for each recipient who does not have a certificate ...
    (microsoft.public.outlook.program_vba)