Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6776111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:59:18+00:00 2026-05-26T15:59:18+00:00

I have a tornado server that provide an https connection with a self signed

  • 0

I have a tornado server that provide an https connection with a self signed certificate that I generated this way:

openssl genrsa -out privatekey.pem 1024                                         
openssl req -new -key privatekey.pem -out certrequest.csr 
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem

The code of the server is the following:

import tornado.ioloop
import tornado.web
import tornado.httpserver
import os

class MainHandler(tornado.web.RequestHandler):
    def get(self):
        print "new client "+str(self)
        self.write("Hello, world")

application = tornado.web.Application([
    (r"/", MainHandler),
])


http_server = tornado.httpserver.HTTPServer(application,
                                            ssl_options={
        "certfile": os.path.join("./", "certificate.pem"),
        "keyfile": os.path.join("./", "privatekey.pem"),

})

if __name__ == "__main__":
    http_server.listen(443)
    tornado.ioloop.IOLoop.instance().start()

I want to have a python client that connect to the server and check that the server is the right server (I guess through its certificate).
For the moment I did a simple client like this:

import httplib
HOSTNAME='localhost'
conn = httplib.HTTPSConnection(HOSTNAME)
conn.putrequest('GET','/')
conn.endheaders()
response = conn.getresponse()
print response.read()

What would you suggest me to do (The client will later on be a mobile app I only use python for prototyping)?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:59:19+00:00Added an answer on May 26, 2026 at 3:59 pm

    If you control the client side too (like in an android or iphone app) you can add your self-signed certificate to your trusted certificate store.

    It is well explained here for an Android app

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple tornado server running like this: import json import suds from
I have a Python Tornado server sitting behind a nginx frontend. Every now and
For operations in my Tornado server that are expected to block (and can't be
I have Django web-site working on tornado and nginx. I took this tornado launcher
I finally have a hardware guy that is insterested in controlling the firmware. This
I have an asynchronous queue worker running as a Tornado script on my server
i want to know tornado's internal workflow, and have seen this article , it's
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you managed to get Aptana Studio debugging to work? I tried following this,
I'm using the Tornado framework (Python). I have the sluggable URLs working. But I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.