X509Certificate on Compact Framework.

  • Thread starter Kay-Christian Wessel
  • Start date
K

Kay-Christian Wessel

I'm trying to use a certificate on my pocket PC device to access a
WebService using VS2003/VS2005.

I've been able to read the certificate of my Certificate Store, but I don't
know how to use it since the WebService does not have a AddCertificate
method.

Seems to be the same in both the Compact Framework 1.0 and 2.0

Any ideas how to do this ?

Kay
 
K

Kay-Christian Wessel

Thanks,

The WebService is made using Visual Studio 2005, but not by me. It is
external to me. Any way I can check this ?

Kay
 
K

Kay-Christian Wessel

Here is my sample code from Visual Studio 2005 with the full Framework which
is working fine. My problem is to port this code to my Device-project.

Dim x As New TestWebService

Dim store As X509Certificates.X509Store = New
X509Certificates.X509Store(X509Certificates.StoreName.My)
store.Open(X509Certificates.OpenFlags.MaxAllowed)
Dim mycollection As X509Certificates.X509CertificateCollection =
store.Certificates

Dim cert As Security.Cryptography.X509Certificates.X509Certificate

For Each cert In mycollection
If cert.Subject.Substring(0, 7) = "CN=Test" Then
x.ClientCertificates.Add(cert)
Exit For
End If
Next

mycollection.Clear()
mycollection = Nothing

store.Close()
store = Nothing

x.Url = "https://PDA.Test.com"




Here is my new code for my Device-project :


Dim x As New TestWebService

Dim store As
InTheHand.Security.Cryptography.X509Certificates.X509Store = New
InTheHand.Security.Cryptography.X509Certificates.X509Store(InTheHand.Securit
y.Cryptography.X509Certificates.StoreName.My)


store.Open(InTheHand.Security.Cryptography.X509Certificates.OpenFlags.MaxAll
owed)

Dim mycollection As
InTheHand.Security.Cryptography.X509Certificates.X509CertificateCollection =
store.Certificates

Dim cert As Security.Cryptography.X509Certificates.X509Certificate

For Each cert In mycollection
If cert.GetName.Substring(0, 7) = "CN=Test" Then
x.ClientCertificates.Add(cert)
'This is not working in the Compact Framework 1.0/2.0
Exit For
End If
Next

mycollection = Nothing

store.Close()
store = Nothing

x.Url = "https://PDA.Test.com"




How to make this work on my Device ?


Best regards
Kay
 
G

Guest

I am in the same situation. Did you managed do get there?
I would appreciate to hear from you, please.
 
K

Kay-Christian Wessel

No, I have no solution to this. I tried to contact some companies to see if
there are som third party products available, but I get no response at all.

I will continue my search in August.

Kay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top