Question
How to configure SSL certificate programmatically
Hi,
I have a config.json (it works fine) like
{
"certificates": {
"validate": true,
"allow_self_signed": false,
"cert_chain": [
"/path2cert/entrust_l1k.pem",
"/path2cert/entrust_g2.pem"
]
}
...
}
How could i write it in programming? Because ServerCertFileInfo property only allow me to specify one cert file
var client = new ConnectedThingClient(new ClientConfigurator
{
AllowSelfSignedCertificates = false,
DisableCertValidation = false,
ServerCertFileInfo = new CertFileInfo { CertType = 0 /* TLS */, FilePath = @"/path2cert/entrust_g2.pem" },
...
});
Any help would be greatly appreciated
Regards,
Hung Tran

