1

I'm working on a product that would connect to a LAN and provide a web server for user/application control, think something like a Hue or Sonos hub. I would like for the web server to be HTTPS only, but that doesn't seem totally feasible as the device won't have a "hostname" and will just that can be validated in the HTTPS requests, it will just obtain an IP address via DHCP.

Is there anyway to create a valid TLS connection or will I always have to disable verification to make a connection?

** Edit**

I have tried using a self-signed certificate on the hub, but requests still fail with

http --verify ./testca.crt https://localhost:1338 
http: error: SSLError: hostname '192.168.1.100' doesn't match u'Test-Hub'

1 Answer 1

1

Generate a self signed certificate and install it on all devices you want using this service.

If you disable verification then there is no reason to have it be over HTTPS in the first place.

7
  • I tried that, but I still get hostname verification failures
    – kyork
    Feb 26, 2016 at 19:05
  • Did you generate it with the exact hostname you are using?
    – d1str0
    Feb 26, 2016 at 19:07
  • It doesn't have a hostname. Its on a LAN with a DHCP address. I'll update the question to clarify.
    – kyork
    Feb 26, 2016 at 19:09
  • Shouldn't the machine itself at least have a hostname? Did you use that when generating the cert? hostname/computer name
    – d1str0
    Feb 26, 2016 at 19:10
  • 1
    I was able to get it to work by generating the certificate for the hubs "<hostname>.local". How reliable is the ".local" DNS mechanism across platforms and networks?
    – kyork
    Feb 26, 2016 at 19:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .