Sinisterly
[help] https server & using wrapped sockets - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Python (https://sinister.ly/Forum-Python)
+--- Thread: [help] https server & using wrapped sockets (/Thread-help-https-server-using-wrapped-sockets)



[help] https server & using wrapped sockets - 3SidedSquare - 04-03-2013

Attempting to create a service in python that will function over https, I tried the example code off of
http://docs.python.org/3.2/library/ssl.html
and got the following:
Code:
This webpage is not available The webpage at https://localhost/ might be temporarily down or it may have moved permanently to a new web address.
(Using chrome, https://127.0.0.1)
I'm serving on port 443 (default)
Using ssl.PROTOCOL_SSLv23
and get the following from chrome when it tires to connect:
Code:
b'' b'' b'G'
Where every line is a new connection.

Server does need to use raw sockets; no, I won't use the http server library.

Any help at all is appreciated :blackhat:

EDIT:
Goodness, I totally forgot to provide my code!
http://pastebin.com/QeAxintT


RE: [help] https server & using wrapped sockets - Complibur - 04-03-2013

*Please note i am no expert on this but can find helpful things easy enough *

This is directly from http://docs.python.org/3.2/library/ssl.html
Have you tried this?!
Code:
SSL version 2 is considered insecure and is therefore dangerous to use. If you want maximum compatibility between clients and servers, it is recommended to use PROTOCOL_SSLv23 as the protocol version and then disable SSLv2 explicitly using the SSLContext.options attribute: context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) context.options |= ssl.OP_NO_SSLv2 The SSL context created above will allow SSLv3 and TLSv1 connections, but not SSLv2.

If this doesn't help please reply back and i'm sure i can help further


RE: [help] https server & using wrapped sockets - 3SidedSquare - 04-04-2013

ssl.PROTOCOLv23 should be compatable with v2, and v3, also, updated with short source.


RE: [help] https server & using wrapped sockets - Complibur - 04-04-2013

(04-04-2013, 12:08 AM)3SidedSquare Wrote: ssl.PROTOCOLv23 should be compatable with v2, and v3, also, updated with short source.

Ya but v2 is very unstable !


RE: [help] https server & using wrapped sockets - 3SidedSquare - 04-05-2013

Solved, I'll post a tutorial shortly
It had to do with never creating an input byte file, and then reading it.