The object containing the certificates to trust when making a secure client connection, and the certificate chain and private key to serve from a secure server.
The SecureSocket and SecureServerSocket classes take a SecurityContext as an argument to their connect and bind methods.
Certificates and keys can be added to a SecurityContext from either PEM or PKCS12 containers.
iOS note: Some methods to add, remove, and inspect certificates are not yet implemented. However, the platform's built-in trusted certificates can be used, by way of SecurityContext.defaultContext.
context
parameter
use the defaultContext object if the parameter is omitted.
This object can also be accessed, and modified, directly.
Each isolate has a different defaultContext object.
The defaultContext object uses a list of well-known trusted
certificate authorities as its trusted roots. On Linux and Windows, this
list is taken from Mozilla, who maintains it as part of Firefox. On,
MacOS, iOS, and Android, this list comes from the trusted certificates
stores built in to the platforms.