void usePrivateKey(
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 a PEM file containing an encrypted private key, encrypted with password. An unencrypted file can be used, but this is not usual.

Source

/**
 * 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 a PEM file containing an encrypted
 * private key, encrypted with [password].  An unencrypted file can be
 * used, but this is not usual.
 */
void usePrivateKey(String keyFile, {String password});