nntplib and ssl
Steve Holden
steve at holdenweb.com
Mon Oct 25 11:12:25 EDT 2010
On 10/25/2010 7:26 AM, Andrew wrote:
> On Fri, 22 Oct 2010 23:23:31 +0200, Antoine Pitrou wrote:
>
>> On Fri, 22 Oct 2010 17:02:07 -0400
>> Andrew <none at none.com> wrote:
>>>
>>> Python's nntplib seems ideal for my purposes, but as far as I can see it
>>> doesn't support nntps connections. If I understand nntp correctly (I may
>>> not) that means, among other things, it sends passwords in cleartext.
>>>
>>> That won't do. I note that python has a separate ssl module but I must
>>> admit I'm at a loss as to how to fit the two together. I'm working from the
>>> Python 3.1.2 documentation, page noted here:
>>
>> There's an issue open for this:
>> http://bugs.python.org/issue1926
>
> I found that but noted it was dated for a few years ago. Of course like an
> idiot I didn't scroll down the page and see that it was still active as of
> last month.
>
>> A patch is there, but it's totally outdated. If you're interested, you
>> could provide a new patch against py3k SVN (that is, the next 3.2,
>> although the deadline for new features is in a couple of weeks).
>
> I'd say I'm interested...but despite not being too terrible a programmer,
> I've never written and submitted a patch for anything in my life and have
> no idea how to go about it. ;-) I suppose google could solve that problem.
>
>> It's probably not very difficult to write such a patch. You mostly need
>> to wrap the connection in an SSL socket, then give that socket to the
>> NNTP connection class. Details will be found out by studying the
>> nntplib code.
>
> I might take a crack at it if I can figure out how. Thanks for the help.
>
You might find helpful information at
http://python.org/dev/
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list