Hello,

I created the .crt and .key files using this command on a linux machine
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout certificate.key 
-out certificate.crt
from Niphlod in 
https://groups.google.com/forum/#!msg/web2py/uesX9TgA2Xk/V0qmPvfbQPUJ

Copied both files to c:\web2py.

Uncommented
request.requires_https()

and added secure=True to
auth = Auth(db, host_names=configuration.get('host.names'), secure=True)

in db.py.

Uncommented these 2 lines
ssl_certificate = 'certificate.crt'
ssl_private_key = 'certificate.key'

in my options.py.

I added this self-signed certificate to the Trusted CAs of Windows and 
checked that it also appears in the Firefox's Trusted CAs in the 
certificates store.

When I try to access https://my_hostname:8000 eveything works.
When I try to access http://my_hostname:8000 rocket crashes with this error:

Exception in thread Thread-2:
Traceback (most recent call last):
  File 
"C:\Users\JMatos\OneDrive\Python\winpython371-32\python-3.7.1\lib\threadi
ng.py", line 917, in _bootstrap_inner
    self.run()
  File "C:\web2py\gluon\rocket.py", line 1268, in run
    conn = Connection(*conn)
  File "C:\web2py\gluon\rocket.py", line 105, in __init__
    self.socket.settimeout(SOCKET_TIMEOUT)
OSError: [WinError 10038] Foi tentada uma operação em algum item que não é 
um so
cket

The translation of the WinError is "It was attempted an operation on some 
item which is not a socket".

I tried with and without secure=True in Auth.
And I tried with and without 
request.requires_https()

Every time HTTPS works and HTTP crashes rocket.py.

I'm using:
web2py 2.18.4
Python 3.7.1 x86
Windows 7 Pro x64 SP1+all updates
Firefox 66.0.1 x64

Any ideas?

Thanks,

JM

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to