One of the services I needed to call from my Fez Spider required an HTTPS connection. The HTTP client sample located at
C:\Users\…\Documents\Microsoft .NET Micro Framework 4.2\Samples\HttpClient
shows how to load a certificate and use it when making a request.
There wasn’t a lot of information about getting the required certificate so I decided to document how I did it. On my Windows Server 2k8 box I use either a web browser or the Certificate Manager for exporting certificates. The easiest way is to use your preferred browser to access the service endpoint (To enable the export functionality you need to “Run as administrator”).
View the certificate
Select the root certificate
View the root certificate information
View the root certificate details
Export the certificate
Save CER file in the resources directory of your NetMF Project and then add it to the application resources.
If you know the Root Certification Authority you can export the certificate using Certificate Manager
Don’t forget to Update the SSL Seed using MF Deploy and ensure that the device clock is correct.
Depending on the application and device you might need to set the device clock every so often.