Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Simple SSL example using just the standard library?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Amy  
View profile  
 More options Oct 19 2012, 6:06 pm
From: Amy <amydurran...@hotmail.com>
Date: Fri, 19 Oct 2012 15:06:40 -0700 (PDT)
Local: Fri, Oct 19 2012 6:06 pm
Subject: Simple SSL example using just the standard library?

Hi!

Does anyone have a simple 'Hello World' demo that they could share of a
cherrypy app with both http and https (using python's native SSL instead of
pyopenssl)?

I'm a little confused with how this documentation:

<http://docs.cherrypy.org/dev/refman/wsgiserver/ssl_builtin.html>

should be applied to the multiple http server example on this page:

<http://tools.cherrypy.org/wiki/MultipleHttpServers>

I've been trying to get this to work for a few days now with no luck. I
must be missing something obvious.. :(


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sylvain Hellegouarch  
View profile  
 More options Oct 20 2012, 2:50 am
From: Sylvain Hellegouarch <s...@defuze.org>
Date: Sat, 20 Oct 2012 08:50:45 +0200
Local: Sat, Oct 20 2012 2:50 am
Subject: Re: [cherrypy-users] Simple SSL example using just the standard library?

Hi Amy,

Could you have a look at
https://bitbucket.org/Lawouach/cherrypy-recipes/src/c899e1b914171d3c3...
let us know if it helps?

--
- Sylvain
http://www.defuze.org
http://twitter.com/lawouach


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Amy  
View profile  
 More options Oct 20 2012, 7:19 am
From: Amy <amydurran...@hotmail.com>
Date: Sat, 20 Oct 2012 04:19:41 -0700 (PDT)
Local: Sat, Oct 20 2012 7:19 am
Subject: Re: [cherrypy-users] Simple SSL example using just the standard library?

Wow! Great link - I'll have to check out some of the other recipes after I
get this one working.

- ssl_and_plain_servers.py
- single_ssl_server.py

both exited prematurely with the same error:

"File "c:\python27\lib\site-packages\cherrypy\wsgiserver\ssl_pyopenssl.py",
line 173, in __init__
raise ImportError("You must install pyOpenSSL to use HTTPS.")
ImportError: You must install pyOpenSSL to use HTTPS."

(This is very similar to the error that I get when tried various examples
on the web..)

The last one (wsgi_ssl_server.py) does work but it looks like something's
not right; I didn't get any logging information (like the others) and when
I sent the quit command it displayed:

"File "c:\python27\lib\site-packages\cherrypy\wsgiserver\wsgiserver2.py",
line 1887, in tick
s, addr = self.socket.accept()
KeyboardInterrupt"

..and didn't return me to the command prompt (it looks like the window hung
as it had to be forcibly closed)

I'll try to merge wsgi_ssl_server.py and ssl_and_plain_servers.py but it
looks like they are accomplishing the same task very differently.

Question - why does Cherrypy default to pyOpenSSL (which people may not
have installed) instead of the ssl module in the python standard library
(which they almost certainly have installed)? Is the native ssl module
lacking something that pyOpenSSL has? (Is it not a best practice to use the
native ssl module?)

Thanks again for the link! I will try to get it working in the meantime.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Roberts  
View profile  
 More options Oct 22 2012, 12:57 pm
From: Tim Roberts <t...@probo.com>
Date: Mon, 22 Oct 2012 09:57:30 -0700
Local: Mon, Oct 22 2012 12:57 pm
Subject: Re: [cherrypy-users] Simple SSL example using just the standard library?

Amy wrote:

> Question - why does Cherrypy default to pyOpenSSL (which people may
> not have installed) instead of the ssl module in the python standard
> library (which they almost certainly have installed)? Is the native
> ssl module lacking something that pyOpenSSL has? (Is it not a best
> practice to use the native ssl module?)

CherryPy has been around for a very long time -- long before the ssl
module was added to the standard library.  Inertia explains the rest.
If it ain't broke, don't fix it.

If you are so inclined, I am sure patches would be welcomed.

--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »