473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Using digital certificates when calling web services

I'm having some difficulty finding the information I need. Maybe someone can
point me in the right direction.

I need to call methods on a web service defined by one of our vendors. They
require, when I make these calls, that I identify myself with a digital
certificate. All of their coding examples are for Java, and they have no
immediate plans to support .NET folks, alas.

I've successfully added a web reference to their web service and am able to
browse all of the classes/methods in Class View. What I'm having trouble
with is finding information regarding how to identify myself with this
digital certificate they've provided me.

Here's what I have from them:

VerisignRoot.cer - (binary) root certificate for verisign-issued
certificates
SBCRootAuthority.cer - (binary) root certificate for my vendor
VgeDev.csr - (text) Certificate request I made (using Java tools,
unfortunately) to request a key from them
VgeDev.p7b - (binary) Certificate they sent back to me, which I'm supposed
to use to make all my calls to their web service.

Can I get some pointers on what exactly to do with these 4 files, and how to
make sure when I invoke a web method that I'm identifying myself?

Oh, and one final thing: is there a .NET equivalent of the Java "keytool"
utility? I had to use that to generate my certificate request because I
couldn't find anything comparable for .NET.

thanks
Nov 21 '05 #1
2 6569
If you want to load the certificate from the file, look at the
X509Certificate class in .Net:
System.Securtiy.Cryptograpy.X509Certificates.X509C ertificate

You can load the cert from the file provided:

// The path to the certificate.
string Certificate = "filepath\VgeDev.p7b";

// Load the certificate into an X509Certificate object.
X509Certificate cert =
X509Certificate.CreateFromCertFile(Certificate);

once you have the cert, you can add it to the web service

if (cert != null)
{
webService.ClientCertificates.Add(cert);
}
You can also look at Microsoft's Web Service Enhancements (WSE) 2.0 for
additional information about security.

Rob Vretenar [imason inc.]

Nov 21 '05 #2
Rob,

Thanks for your response. I eventually figured out what my problem was: all
this stuff was originally stored in a Java keystore. When I extracted the
cert into the VgeDev.p7b file, it only extracted the public key. As a
result, I never could use it. I finally found a tool from IBM called
"KeyMan" that extracts the entire key pair and now I'm good to go.

"Rob Vretenar" <ro**********@imason.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
If you want to load the certificate from the file, look at the
X509Certificate class in .Net:
System.Securtiy.Cryptograpy.X509Certificates.X509C ertificate

You can load the cert from the file provided:

// The path to the certificate.
string Certificate = "filepath\VgeDev.p7b";

// Load the certificate into an X509Certificate object.
X509Certificate cert =
X509Certificate.CreateFromCertFile(Certificate);

once you have the cert, you can add it to the web service

if (cert != null)
{
webService.ClientCertificates.Add(cert);
}
You can also look at Microsoft's Web Service Enhancements (WSE) 2.0 for
additional information about security.

Rob Vretenar [imason inc.]

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Guangxi Wu | last post by:
Hi all, Happy New Year. I am using SignedXML and an X509 certificate to digitally sign a SOAP message body and put the signature in the SOAP header for a B2B business application. Can you...
0
by: bs | last post by:
Hi, I am currently having a problem calling a web service that is secured using a digital certificate. I set up a Windows application to make a call to the service and it works fine. However...
5
by: S.Vidya | last post by:
when accessing the URL using Https,the security alert box pop up everytime. how to block that security alert box showing 1.Certificate issued by a company you have not choosen to trust.view the...
0
by: Bryan Slatner | last post by:
I'm having some difficulty finding the information I need. Maybe someone can point me in the right direction. I need to call methods on a web service defined by one of our vendors. They require,...
1
by: Eddie J | last post by:
I have a web service (#1) that contacts another web service (#2) that requires a digital certificate for access. When#1 calls #2, I'm getting a HTTP 403 error: Access Forbidden. There are a few...
5
by: | last post by:
Hi all, HttpWebRequest, and SoapHttpClientProtocol both expose a ClientCertificates property, which can hold multiple client certificates, but on the service side, it can only receive one client...
1
by: shabbir.bharmal | last post by:
Hello everyone i am developing one site related to etendering in this i want to use digital certificates for validation. I am using PHP & MySql. I am not having any idea of using this digital...
0
by: tsalikivenu | last post by:
Hi i have problem with loading digital certificates.i am currently using asp.net 2003.i have installed wse2.0 here is my code..i want it to load digital certficates to list box..it is...
2
by: b.fokke | last post by:
I'd like to connect to a webservice using TLS/SSL. I have two separate client certificates: 1. A certificate for digital verification 2. A certificate for encryption. When I use the first one...
1
by: bahamas | last post by:
We have a requirement where we need to enforce digital certificates on client machines. In abstract, the requirement is to have digital certificates installed in a limited set of machines in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.