PyPy 2.5.1 missing some SSL constants

Issue #2013 resolved
Cory Benfield created an issue

Per this gist:

Python 2.7.9 (9c4588d731b7, Mar 23 2015, 20:00:36)
[PyPy 2.5.1 with MSC v.1500 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>> import ssl
'OpenSSL 1.0.1i 6 Aug 2014'
>>>> ssl.PROTOCOL_TLSv1_2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_2'

This is probably caused by the backport of the 2.7.9 SSL module, which newly exposed this constant (along with some others). I recommend checking all the constants in this document that were added in 2.7.9 to see if they got left out.

Comments (8)

  1. mattip

    This probably is not the last bug with 2.5.1, can we wait a few weeks and see what else pops up or is there a use case this blocks?

  2. Armin Rigo

    It's also missing HAVE_ALPN, and support for "selected_alpn_protocol" & co in the cases where HAVE_ALPN would be True (I don't know which cases this is; on Ubuntu 12.04 it seems to be False).

  3. Armin Rigo

    Sorry! I was testing with CPython "2.7.trunk". It seems they're continuing to make important changes to 2.7. Indeed, this is not in 2.7.9, so let's ignore it for now.

  4. Alex Gaynor

    I think it'd be good to do a release for this -- http/2 is going to become an increasingly important use case.

  5. Log in to comment