Question

This might sound a little stupid, but I am trying to test out IOS device enrollment and I want to use a trusted CA(eg Verisign,Comodo) signed certificate to add to my localhost rails webrick server. I do not want to add a self signed certificate because I need to test a very particular scenario. Is there a way to do this? I know domain controller validation will fail if I try to create the CA signed certificate on a website like Comodo and I cant use a certificate I already have for my production server since its bound to that domain. Is there a way to workaround this and create a production level SSL certificate and use it for development server?

Was it helpful?

Solution

You can use your existing production certificates for your local setup, and use a local DNS server (such as BIND) to resolve the domain name to your local ip address instead of your production servers ip address.

Update:

  1. Install BIND (or whatever DNS server software you like) on some computer on your network, let us say 192.168.100.10.
  2. Add www.myprodserver.com to resolve to 192.168.100.100.
  3. Now on your local machine (assume its a MacBook), go to your network settings and add 192.168.100.10 as the only DNS server.
  4. Now run ping www.myprodserver.com and make sure it is resolving to 192.168.100.100.

This is almost equivalent (but not exactly) to using /etc/hosts file to resolve domain names to ip addresses .

(all ip addresses and domain names used above are just for example)

Also, I think you will need something better than WEBRick to handle SSL certificates. You can use nginx to offload SSL and proxy to WEBRick

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top