Specifying Fields for X.509 Validation (.NET SDK)
For the most secure connection, define the fields of an X.509 certificate that should be validated. In particular, set the X509FieldsInfo properties before starting the connection by using this property and its fields. These settings mean that the SDK will attempt to validate certificates and reject self-signed certificates.
* 
Only non-null values are used to validate the certificate’s fields.
The fields that need to be specified for X.509 certificates follow:
Subject.cn — The common name of the subject in the certificate.
Subject.o — The organization of the subject in the certificate.
Subject.ou — The organizational unit of the subject in the certificate.
Here is an example of using the X509FieldsInfo property:
ClientConfigurator config = new ClientConfigurator();

X509FieldsInfo x509FieldsInfo = new X509FieldsInfo();
x509FieldsInfo.Subject_cn = "*.thingworx.com";
x509FieldsInfo.Subject_o = "Parametric Technology Corporation";
x509FieldsInfo.Subject_ou = "IT";
config.X509FieldsInfo = x509FieldsInfo;
Was this helpful?