Browse files

Merge pull request #16 from neutrino15/patch-1

SSL cookbook example did not work for me.
  • Loading branch information...
2 parents f9592ff + 6502143 commit 91a23ef91ef7e223a237987a3ffb5115e61afd3b @aaronsw aaronsw committed Jan 12, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 cookbook/ssl.md
View
9 cookbook/ssl.md
@@ -14,11 +14,14 @@ How to set SSL support in built-in cherrypy server web.py
## Solution
import web
-
from web.wsgiserver import CherryPyWSGIServer
+ from web.wsgiserver.ssl_builtin import BuiltinSSLAdapter
+
+ ssl_cert = "path/to/ssl_certificate"
+ ssl_key = "path/to/ssl_private_key"
+
+ CherryPyWSGIServer.ssl_adapter = BuiltinSSLAdapter(ssl_cert,ssl_key,None)
- CherryPyWSGIServer.ssl_certificate = "path/to/ssl_certificate"
- CherryPyWSGIServer.ssl_private_key = "path/to/ssl_private_key"
urls = ("/.*", "hello")
app = web.application(urls, globals())

0 comments on commit 91a23ef

Please sign in to comment.