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

Windows binary missing SSL #36841

Closed
parameter mannequin opened this issue Jul 3, 2002 · 10 comments
Closed

Windows binary missing SSL #36841

parameter mannequin opened this issue Jul 3, 2002 · 10 comments
Assignees

Comments

@parameter
Copy link
Mannequin

parameter mannequin commented Jul 3, 2002

BPO 576711
Nosy @tim-one, @mhammond
Files
  • build_ssl.zip: zip file with 3 new files, as described
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/mhammond'
    closed_at = <Date 2003-01-29.02:39:36.000>
    created_at = <Date 2002-07-03.02:10:46.000>
    labels = ['OS-windows']
    title = 'Windows binary missing SSL'
    updated_at = <Date 2003-01-29.02:39:36.000>
    user = 'https://bugs.python.org/parameter'

    bugs.python.org fields:

    activity = <Date 2003-01-29.02:39:36.000>
    actor = 'mhammond'
    assignee = 'mhammond'
    closed = True
    closed_date = None
    closer = None
    components = ['Windows']
    creation = <Date 2002-07-03.02:10:46.000>
    creator = 'parameter'
    dependencies = []
    files = ['544']
    hgrepos = []
    issue_num = 576711
    keywords = []
    message_count = 10.0
    messages = ['11439', '11440', '11441', '11442', '11443', '11444', '11445', '11446', '11447', '11448']
    nosy_count = 5.0
    nosy_names = ['tim.peters', 'mhammond', 'nnorwitz', 'ghaering', 'parameter']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue576711'
    versions = []

    @parameter
    Copy link
    Mannequin Author

    parameter mannequin commented Jul 3, 2002

    The Windows binary build from www.python.org appears to
    be missing SSL support (-DUSE_SSL ?). Please consider
    including SSL/HTTPS support "out of the box" for Windows
    users.

    Here's an example of what I tried (although I changed the
    server name):

    Python 2.2.1 (#34, Apr  9 2002, 19:34:33) [MSC 32 bit 
    (Intel)] on win32
    Type "copyright", "credits" or "license" for more information.
    IDLE 0.8 -- press F1 for help
    >>> import httplib
    >>> conn=httplib.HTTPSConnection
    ("some.secure.server.com")
    >>> conn.request("GET", "/index.php")
    Traceback (most recent call last):
      File "<pyshell#2>", line 1, in ?
        conn.request("GET", "/index.php")
      File "C:\Python22\lib\httplib.py", line 537, in request
        self._send_request(method, url, body, headers)
      File "C:\Python22\lib\httplib.py", line 553, in _send_request
        self.putrequest(method, url)
      File "C:\Python22\lib\httplib.py", line 453, in putrequest
        self.send(str)
      File "C:\Python22\lib\httplib.py", line 395, in send
        self.connect()
      File "C:\Python22\lib\httplib.py", line 688, in connect
        ssl = socket.ssl(realsock, self.key_file, self.cert_file)
    AttributeError: 'module' object has no attribute 'ssl'

    @parameter parameter mannequin closed this as completed Jul 3, 2002
    @parameter parameter mannequin assigned mhammond Jul 3, 2002
    @parameter parameter mannequin added the OS-windows label Jul 3, 2002
    @parameter parameter mannequin closed this as completed Jul 3, 2002
    @parameter parameter mannequin assigned mhammond Jul 3, 2002
    @parameter parameter mannequin added the OS-windows label Jul 3, 2002
    @tim-one
    Copy link
    Member

    tim-one commented Jul 3, 2002

    Logged In: YES
    user_id=31435

    Mark, does this interest you?

    @ghaering
    Copy link
    Mannequin

    ghaering mannequin commented Jul 4, 2002

    Logged In: YES
    user_id=163326

    I've successfully built socket.pyd against OpenSSL on win32:

    Build OpenSSL: read the README that's included. You
    basically need Perl and I also use NASM to build the highly
    optimized version of it.

    Add the OpenSSL include path (inc32, IIRC) for the socket
    module.
    Add the OpenSSL library path (lib32, IIRC) for the socket
    module.
    Add the two .lib files that can be found in lib32 to the
    libraries to link against.

    I think this is all that's involved.

    @mhammond
    Copy link
    Contributor

    mhammond commented Jul 9, 2002

    Logged In: YES
    user_id=14198

    OK - here we go :)

    Attaching a hack to try and get SSL working without too much
    pain!

    There is a .py file that attempts to locate an OpenSSL
    installation to use. As these seem to be released often,
    the script looks for the latest non-beta OpenSSL directory.

    If the OpenSSL directory does not have makefiles, it
    attempts to generate these makefiles (which uses Perl).
    Unfortunately, you need ActivePerl for this to work, and I
    try and make some effort towards ensuring a working perl is
    found and is used.

    Once done, this script then simply invokes a makefile to
    build the SSL module itself.

    An integrated patch will come after feedback. But for now,
    to test this you can:

    • Download and install OpenSSL, and install this in the same
      place other libs used by Python are installed, such as zlib.
      This should be in the "..\.." directory relative to the
      "PCBuild" directory.

    • Ensure ActivePerl is installed on your box, and is either
      on your path, or in "\perl\bin" or "c:\perl\bin"

    • Install the 3 files in this patch (_ssl.mak, build_ssl.py
      and _ssl.dsp) in the "PCBuild" directory.

    • In your Python MSVC workspace, add this new "_ssl.dsp" as
      a project, and make it depend on the "pythoncore" project.

    • Build the new project.

    If all goes well, OpenSSL will be configured and have
    makefiles generated, be built, and then have the _ssl.pyd
    module built.

    Lemme know how it goes!

    @mhammond
    Copy link
    Contributor

    Logged In: YES
    user_id=14198

    Sorry Tim, but you are the Windows build god <wink>. I
    assume this wont be looked at until closer to an RC, which
    is fine by me.

    @tim-one
    Copy link
    Member

    tim-one commented Dec 3, 2002

    Logged In: YES
    user_id=31435

    Check it in -- that's a good way to force the issue. I
    certainly approve of the concept <wink>.

    @mhammond
    Copy link
    Contributor

    mhammond commented Dec 3, 2002

    Logged In: YES
    user_id=14198

    OK - all checked in and ready to close once the dust settles.

    @tim-one
    Copy link
    Member

    tim-one commented Dec 4, 2002

    Logged In: YES
    user_id=31435

    Great work, Mark! I hit some snags doing this stuff on
    Win98SE, but got it all working and checked in. There's no
    reason I can see to keep this report open anymore.

    BTW, is test_socket_ssl.py the only test we've got for
    this? It passes here, so if that's all there is, I can't think of
    anything else remaining to do.

    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Jan 29, 2003

    Logged In: YES
    user_id=33168

    Tim/Mark, should this be closed?

    @mhammond
    Copy link
    Contributor

    Logged In: YES
    user_id=14198

    yep :)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants