Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check SSL-Context for IMAP4_SSL connections #69

Merged
merged 4 commits into from
Jun 7, 2016

Commits on Jun 2, 2016

  1. According to martinrusev#68 the

    software was altered, in order to use the systems SSL-Context as
    default.
    
    It allows to toggle the use of the SSL-Default Context. It does not
    allow to use a custom context.
    
     Considerations:
     * If No SSL-Validation should be done, the ImboxClass should be adapted, in
       order to achieve configuration of the ssl-context. This commit does not
       contain this alteration.
    
     Other Changes:
     * Reformatted long lines
    Dustin Demuth committed Jun 2, 2016
    Configuration menu
    Copy the full SHA
    2a0117b View commit details
    Browse the repository at this point in the history
  2. Fixed a condition

    Dustin Demuth committed Jun 2, 2016
    Configuration menu
    Copy the full SHA
    61ca73e View commit details
    Browse the repository at this point in the history
  3. Fix IMAP transport instantiation

    This reverts the approach to IMAP transport instantiation back to how it
    was done prior to 2a0117b which introduced the usesslcontext parameter.
    This reduces code duplication and importantly make instantiation work
    again because self.IMAP4 and self.IMAP4_SSL do not exist.
    bernhard-herzog committed Jun 2, 2016
    Configuration menu
    Copy the full SHA
    adfbc2f View commit details
    Browse the repository at this point in the history
  4. Allow the user to supply a custom ssl context

    The new ImapTransport parameter ssl_context replaces the usesslcontext
    parameter and allows the user to supply their own ssl context object. If
    ssl_context is not given, but ssl is true, python's default ssl context
    is used. That default context is the one that actually does some
    certificate checks, such as whether the hostname matches the names given
    in the server's certificate and not the default context used by
    IMAP4_SSL when instantiated with ssl_context=None which does not
    certificate checks at all.
    
    The Imbox class is extended with the same ssl_context parameter which is
    simply passed through to ImapTransport.
    
    This commit together with the previous commits from Dustin Demuth
    changes Imbox in a slightly incompatible way: SSL-Certificates are now
    checked by default whereas before they were not checked at all. This
    improves security substantially but users need to be aware that working
    programs might start raising exceptions due to failing certificate
    checks.
    bernhard-herzog committed Jun 2, 2016
    Configuration menu
    Copy the full SHA
    ad085d9 View commit details
    Browse the repository at this point in the history