void usePrivateKeySync(String keyFile, {String password})

Sets the private key for a server certificate or client certificate.

A secure connection using this SecurityContext will use this key with the server or client certificate to sign and decrypt messages. keyFile is the path to a PEM or PKCS12 file containing an encrypted private key, encrypted with password. An unencrypted file can be used, but this is not usual.

Source

void usePrivateKeySync(String keyFile, {String password});