🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.webservices.soap
Article #52

Client certificates in web service connection

#52
From: Sean Klingler
Date: Thu, 07 Aug 2008 14:46
27 lines
2425 bytes
I have a client that needs me to connect to a service they have that uses a 
client certificate. They gave me a .cer certificate file, but I'm not sure 
how to make use of it. I did use MMS to install it on my system, but how to 
reference it in my code when the connection is attempted.

I'm using code I generated using the WSDL Importer.

I found this example in the Delphi world using CAPICOM.
http://groups.google.com/group/borland.public.delphi.webservices.soap/browse_thread/thread/11aa16819d89f2e1/86d553718d2fc5c2?q=martijn+brinkers+soap+certificates

First, is this still the best way to do it? Is there another way? I would 
have thought that some Indy interaction would be possible since that would 
supposedly already do this, but I don't see any way to make it work with 
THTTPRIO.

I'm having problems making this work in the C++ world. I created the _tlb 
and _ocx files from importing the CAPICOM DLL, but I can't make all the code 
compile. For instance, after opening the store, finding the certificates is 
problematic. Tlibimp did generate a TCertificates class that has the Find 
method on it, but TStore->Certificates returns an ICertificatesPtr, not a 
TCertificates. I don't know how to take that and access the methods such as 
Find that are part of TCertificates.

Is there a C++ example like the one above for Delphi somewhere? Or can 
somebody help me get going a little further?

I'm running RAD Studio 2007 using C++.
Technical Details
Message-ID: <489b0ae3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11096a,d23819ad9637f1bb,start
X-Google-Attributes: gid11096a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Sean Klingler" <sean.klingler@atex.com>
Newsgroups: borland.public.cppbuilder.webservices.soap
Subject: Client certificates in web service connection
Date: Thu, 7 Aug 2008 10:46:56 -0400
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 65.207.178.254
Message-ID: <489b0ae3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1218120419 65.207.178.254 (7 Aug 2008 07:46:59 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 2268