You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Ec...@softwareag.com on 2004/11/05 09:53:20 UTC

FW: Find a Certificate

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:berin@wingsofhermes.org] 
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 security-dev@xml.apache.org 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

Eckehard.Hermann@softwareag.com 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
> 
>