Hi all,

does somebody have some experiences with creating XML signatures by
using the CAPI and an RSA key and can help us to slove the below
explained problem?

thanks, Eckehard

 

-----Original Message-----
From: Berin Lautenbach [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 28. Oktober 2004 12:43
To: Hermann, Eckehard
Subject: Re: Find a Certificate


Eckehard,

Never tried to do this myself - but I think there might be one or two 
people on the [EMAIL PROTECTED] list who have.  Do you want to

try there first?  If not - it's something I've actually been meaning to 
try to work out, so I can have a look at the weekend.

Cheers,
        Berin

[EMAIL PROTECTED] wrote:

> Hi Berin,
> 
> we have the following question. We currently try to sign an XML 
> Document
> with the C API of XML Security. Our Conditions are to use the Win CAPI

> and keys and certificate from an USB stick. My problem is now that I 
> need to add the X509 certificate into the keyInfo part of the XML 
> Signature. We first aqctivate the proper CSP provider from the USB
stick 
> via CryptAcquireContext. Then we call
> 
> WinCAPICryptoKeyRSA * winKeyRSA = new WinCAPICryptoKeyRSA(hProv,
> AT_SIGNATURE, true);
> 
> Do you know how we can get from the winKeyRSA  object the associated
> certificate?
> 
> I have looked into the CryptGetUserKey but could not find any link to
> the corresponding certificate. Do you have any idea how we can aquire 
> the certificate? I have noticed, that in templatesign.cpp you could 
> easily extract the certificate using the OpenSSL API. But using Win
CAPI 
> you only created the RSA exponent and modules in the KeyInfo.
> 
> thanks in advance,
> Eckehard Hermann
> 
> 

Reply via email to