[xmlsec] Using Root Certificate from MS certificate store

Aleksey Sanin aleksey at aleksey.com
Fri Apr 11 08:31:02 PDT 2003

Arda Tekin wrote:

> Hi Aleksey,
> When I verify xml document, I use xmlSecSimpleKeysMngrLoadPemCert() 
> function to load cert. from a file. But this function reads cert 
> information from a file. I need to get cert. information from 
> database. So is there a way to use a cert. inf. which is a string in 
> memory?

You need to copy/paste the code from this function and replace reading 
cert from a file
to reading it from memory. Unfortunately, there is no other way to do it 
on 0.0.x version.

> Aleksey I have a second question, all certificates are stored in ms 
> certificate store in windows. I can obtain a certificate handle from 
> this store:
>                                         0,
>                                         NULL,
>                                         CERT_SYSTEM_STORE_SERVICES,
>                                         strStoreName.c_str());
> ...
> ..
> PCCERT_CONTEXT pCertContext = CertFindCertificateInStore(m_hStore,
>                                                                  0, 
> Can I use this handle or any other information which is obtain from a 
> win32 system in xmlsec library?

The 0.0.x version knows nothing about Microsoft. You probably need to 
dump cert to
a der file (or memory buffer in der format) and read/parse it later with 
OpenSSL functions.
Someone is working on adding MSCrypto API support to 1.0.0 and it should 
be much simpler


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20030411/048056bc/attachment.htm

More information about the xmlsec mailing list