Programmatically Working with Digital Signatures

  • Thread starter Thread starter Matt Frame
  • Start date Start date
M

Matt Frame

I have a client that has asked us to get a digital signature certificate and
start digitally signing all files we pass between each other. I have heard
of the subject and know about the certs but I have no idea how to do
something like this with VB.Net. Has anyone done something like this or
know where I can find out information how to perform the process of signing
a document when sending it then checking one on receipt?

Your help is greatly appreciated.

Thanks,

Matt
 
Hi Matt,

Here is link, you may have a check.
Cryptography in Microsoft.NET Part III: Digital Certificates
http://www.c-sharpcorner.com/Code/2003/Jan/DigitalCertIII.asp

Here is a sample about Signature inVB.NET.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemsecuritycryptographyrsapkcs1signaturedeformatterclassverifysignat
uretopic.asp

If you have any related question, please feel free to let me know.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
 
Peter,

Thanks so much for the links, they look like they will get me going. The
customer has now also requested I perform secure channel communications as
well with them. I am using the HttpWebRequest object to perform a POST to
them but again this security thing is unfamiliar ground. What would I look
for to use a certificate to perform secure channel communications to POST
and validate a POST from the client?

I really appreciate your help.

Thanks,

Matt
 
Hi Matt,

To implement the SSL, I think you may try to configure the IIS to use the
SSL. Here are some KB links.
324069 HOW TO: Set Up an HTTPS Service in IIS
http://support.microsoft.com/?id=324069

315588 HOW TO: Secure an ASP.NET Application Using Client-Side Certificates
http://support.microsoft.com/?id=315588

816794 HOW TO: Install Imported Certificates on a Web Server in Windows
Server
http://support.microsoft.com/?id=816794

299875 HOW TO: Implement SSL on a Windows 2000 IIS 5.0 Computer
http://support.microsoft.com/?id=299875

313071 HOW TO: Configure Certificate Trust Lists in Internet Information
http://support.microsoft.com/?id=313071

Here is a sample about how to post data to a SSL enabled web site.
303436 SAMPLE: Visual C# .NET Networking Classes HTTP Internet Client
http://support.microsoft.com/?id=303436

Did I misunderstand your meaning?
If you have any related question, please feel free to let me know.


Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
From: "Matt Frame" <[email protected]>
References: <[email protected]>
 
Peter,

I am sure I didn't explain myself correctly.

I need to programmatically verify a client certificate when my customer
performs a POST to a listener I have developed.

When I post to the client I am using the X509Certificates object with the
HttpWebRequest object to set my certificate on the send. I believe I have
this working as my client says they received data but I have not confirmed
this with them as I was told by someone else after a conference call.

When I receive from them I am trying to use the HttpClientCertificate object
and setting it with Request.ClientCertificate but I have only received a
blank object so far. If I use a web browser with a client certificate
attached to the session I do receive that so I am wondering if these objects
are really available with what I am doing when I receive a POST. This is
the area that is causing the biggest headache at the moment so if you could
shed some light here I would really appreciate it.

If you need additional information about what I am trying to accomplish
please ask.

Thanks,

Matt
 
Hi Matt,

Here is a free software about the Certificate.
Certificate Services Library
The Certificate Services library is an implementation of much of the
Windows Certificate API; some of its key features are:
support of all methods found in the X509Certificate class and the WSE
X509Certificate class.
loading and saving DER encoded certificates (optionally Base64 encoded),
PKCS#7 signed messages, serialized certificate stores, PEM files and
Private Information Exchange (PFX or PKCS#12) files.
loading Private Key (PVK) files
building a certificate chain from a given certificate and verifying that
chain
loading certificates from certificate stores.
encrypting and decrypting data with the public and private key of a
certificate
converting back and forth between the Mentalis.org Certificate class and
the Microsoft X509Certificate class.

You may download it via the link below
http://www.mentalis.org/soft/projects/certificates/

Is that what you want?
If you have any related question,please feel free to let me know.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
From: "Matt Frame" <[email protected]>
References: <[email protected]>
<[email protected]>
 
Pete,

Thanks for the library I am sure it will come to some use once I have time
to look through it. It kind of doesn't help in my current situation though
as I already have a system running and I just need to add the client
validation. I posted additional information about what I am trying to do in
the microsoft.public.dotnet.security group in hopes someone can come up with
a solution. I felt that group was more appropriate for what I am trying to
accomplish. I really appreciate your help in this and if you get a minute I
would like for you to look at the posting in the other group so maybe it can
give you a better feel for what my situation is.

Again thanks for all your help.

Matt
 
Hi Matt,

I am sorry that my suggestions didn't assist in resolving this issue.
I think the framework.security group is more appropriate for this issue.
I am glad to see that you have posted the question there.
Also, you may try to post the question in framework group directly since it
is a MSDN managed newsgroup and under monitor.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
From: "Matt Frame" <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
 
Back
Top