Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / Developers / Windows Mobile / September 2009

Tip: Looking for answers? Try searching our database.

X.509 Structure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kyzer - 18 Sep 2009 03:46 GMT
Hi,

I am currently in the process of implementing SSL connections on my
WM5 client.  I am in the process of validating the certificate, using
the callback function SslValidate(), however am unsure of the
structure definition used in pCertChain.  Below is an extract from the
MSDN website (http://msdn.microsoft.com/en-us/library/ms880984.aspx):

int SslValidate (
   DWORD  dwType
   LPVOID pvArg
   DWORD  dwChainLen
   LPBLOB pCertChain
   DWORD  dwFlags
);

The pCertChain parameter is a pointer to the root certificate. The
BLOB struct is defined in Sslsock.h in the SDK. The pBlobData field
points to a X.509 certificate (ISO standard). The certificate is not
the root certificate but the server certificate. The caller must parse
the certificate to extract the pertinent data like the subject and
issuer names.

From debugging through the code, I can see that pCertChain->pBlobData
appears to contain the certificate details (by looking at the memory
referred to by pBlobData), however I require the details on how this
is typecasted so that I can obtain the appropriate information to
validate the certificate.

Any assistance on this would be greatly appreciated.

Thanks.
Kyzer - 22 Sep 2009 01:21 GMT
Here is some more information which may be of assistance.  The
structure (from what I can see) is as follows:

[Unknown](14 bytes)  **I think the version may be within here**
[Serial Number Length](1 byte)
[Serial Number](Serial Number Length bytes)
[Unknown](28 bytes)
[Country Length](1 byte)
[Country](Country Length bytes)
[Unknown](10 bytes)
[State Length](1 byte)
[State](State Length bytes)
[Unknown](10 bytes)
[Location Length](1 byte)
[Location](Location Length bytes)
[Unknown](10 bytes)
[Issuer Name Length](1 byte)
[Issuer Name](Issuer Name Length bytes)
[Unknown](10 bytes)
...

What I need to find out is the complete structure of this so that I
can parse the certificate to obtain key information (eg. validity
dates, issuer names, etc)

Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.