473,804 Members | 2,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ce r - (binary) root certificate for verisign-issued
certificates
SBCRootAuthorit y.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 6609
If you want to load the certificate from the file, look at the
X509Certificate class in .Net:
System.Securtiy .Cryptograpy.X5 09Certificates. X509Certificate

You can load the cert from the file provided:

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

// Load the certificate into an X509Certificate object.
X509Certificate cert =
X509Certificate .CreateFromCert File(Certificat e);

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

if (cert != null)
{
webService.Clie ntCertificates. 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**********@i mason.com> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com...
If you want to load the certificate from the file, look at the
X509Certificate class in .Net:
System.Securtiy .Cryptograpy.X5 09Certificates. X509Certificate

You can load the cert from the file provided:

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

// Load the certificate into an X509Certificate object.
X509Certificate cert =
X509Certificate .CreateFromCert File(Certificat e);

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

if (cert != null)
{
webService.Clie ntCertificates. 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
7653
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 suggest which type of digital certificates from VeriSign is for this purpose? I checked VeriSign's web site but didn't find it obvious to decide.
0
1237
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 when I make a call from my ASP.NET page it fails with "System.Net.WebException: The request failed with HTTP status 403: Forbidden". The code that I am using to make the call in both instances is: MyWebService myService = new MyWebService();
5
2124
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 certificate to determine whether you want to trust the certificate authority. 2. the security date is valid. 3.the security certificate has a valid name matching the name of the page yuo are trying to view. do you want to proceed. Although i used...
0
513
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, 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...
1
2433
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 other posts on the subject in this newsgroup but none provide the information I need. When I use a console application that runs on the same server as #1 to contact #2, I don't have a problem. I've tried a few options that have not worked: 1)...
5
4454
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 certificate, since it derives System.Web.Services.WebService class, and it's Context.Request.ClientCertificate is a single HttpClientCertificate object, is there a way to receive all the client certificates that is sent in the request? or does IIS...
1
1926
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 certificates so please if anyone can help me out then mail me at shabbir.bharmal@gmail.com Thanks Shabbir Bharmal
0
1599
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 working in windows application..but the problem is i am unable to load in web form.. X509CertificateStore store = null; store = X509CertificateStore.CurrentUserStore(X509CertificateStore.MyStore); if(store.OpenRead())
2
2664
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 (i.e. add it to the ClientCertificates collection of the web request), I can establish a connection but I get a WebException: "Underlying connection closed: Could not establish trust relationship". When I use the second one I can't even establish a...
1
1334
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 client local network which certain users will need to use in order to gain login to the system. These users will hold different roles in the system. The idea is that we need to stop these users from login in to the system from any other machine except...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10578
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9152
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.