Specifying Properties to Validate Client Certificates
The following properties are available on the ClientConfigurator class:
ClientCertFileInfo(String value) — Specifies the local PEM or DER formatted certificate file used to validate the client as well as the certificate type.
ClientKeyFileInfo(String value) — Specifies the full path to the key file, the passphrase for the key file (through a callback), and the key type.
Here is an example of using the client certificate file property:
ClientConfigurator config = new ClientConfigurator();
CertFileInfo clientCertFileInfo = new CertFileInfo();
clientCertFileInfo.FilePath = "C:\\path\\to\\certificate\\file";
clientCertFileInfo.CertType = 0; // '0' for axTLS
config.ClientCertFileInfo = serverCertFileInfo;
Here is an example of using the key file property:
...
KeyFileInfo keyFileInfo = new KeyFileInfo();
keyFileInfo.FilePath = "C:\\path\\to\\key\\file";
keyFileInfo.Claims = SecurityClaims.fromPasswordCallback(TwPasswordDelegate passwordCallback);
keyFileInfo.KeyType = 0;
Was this helpful?