TLS certificate for the mock server to use when serving HTTPS pages.
If this is non-null, the server will always use HTTPS. If it is null , the server will always use HTTP. The TLS certificate may be changed after constructing the Server, but changes to the property will not take effect until the next call to run .
A certificate and private key may be generated by executing: <code>openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -nodes</code>. These files may then be used to construct a TlsCertificate by calling TlsCertificate.from_files.
Alternatively, a default TlsCertificate which wraps a dummy certificate ( not signed by any certificate authority) may be set by calling set_default_tls_certificate. This may be used as the tls_certificate if the code under test has no specific requirements of the certificate used by the mock server it's tested against.