Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.039 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'subject:skip:s 10': 0.07; 'params': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'module?': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'module,': 0.24; 'ssl': 0.24; 'cc:2**0': 0.24; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'stuff': 0.32; 'option': 0.32; '(e.g.': 0.33; 'third': 0.33; 'actual': 0.34; 'received:google.com': 0.35; 'done': 0.36; "i'll": 0.36; 'being': 0.38; 'whatever': 0.38; 'skip:u 10': 0.60; 'back': 0.62; 'skip:n 10': 0.64; 'subject:Using': 0.84; 'edwards': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=MFDjbp4tc/X9bICAh/J2ClgpoPNvpVMqKA4WSroMxUk=; b=YgbBxNWro2+FSCksMndZEXYvOrtz9Rf8zKSIneutjAHA+uVoAjje3Y6HbOGO/MZ6Rg 1Q58A7bPSnmb6EWvYiMThiNBHfKgD+q0GJdvbUsMcZ+MalHdbB9l6vVfh015cN1G+isB FHh9Du3jZq/9YHaEx08hhgwPwcwuf9zafMNxol2rOmM0iymbyNTAxdbPkCvrLa48jVYZ sRExGsyJFNMlnE668EHquWn1EL93bCoy9qNfRjjJM9/WjmEIS8XDt/XaMCp6749wM3Ek TE2CwpngxH+I6IhziLdoczV2DytuQKPX6UbpBrbus/Ji9dIUAbEbTWARzYwbNJvKv/cp h/Bw== MIME-Version: 1.0 X-Received: by 10.58.171.229 with SMTP id ax5mr591933vec.24.1399515128758; Wed, 07 May 2014 19:12:08 -0700 (PDT) In-Reply-To: References: Date: Thu, 8 May 2014 12:12:08 +1000 Subject: Re: Using ssl.wrap_socket() in chroot jail From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1399515136 news.xs4all.nl 2848 [2001:888:2000:d::a6]:49137 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71071 On Thu, May 8, 2014 at 4:51 AM, Grant Edwards wrote: > Unfortunately, the actual SSL wrapping stuff isn't being done in my > code. It's being done by the secure-smtpd module, which will pass > whatever cert/key params I give it to ssl.wrap_socket(). That still > leaves the third option (e.g. stunnel). I'll go back to the naughty-crazy idea of monkey-patching, then: can you create an SSLContext prior to chrooting, then stuff its wrap_socket back into the ssl module? ChrisA