Add more type definitions for `SSL` module, check with mypy (#1313)

We want to ensure that from now on, any new public API comes with proper
type definitions.
2 files changed