Can I use a self-signed certificate on a live Azure cloud?
I need to test whether HTTPS works right in my Azure web role deployed on the cloud. I followed all steps to create a self-signed certificate and associate it with my role. Now my开发者_开发技巧 role works okay via HTTP, but requests HTTPS port just time out.
I suspect the problem is that the certificate is self-signed. Can I use self-signed certificates on a cloud?
If there is a problem with a certificate I would not expect the connection to "time out", that shoulds more like a firewall or comms issue.
As Phil suggests, your timeout isn't caused by your use of a self-signed certificate. You just get a security warning from your browser if the certificate isn't installed locally as a trusted Cert.
I'm using self-signed certs quite successfully.
More likely that you don't have a HTTPS Endpoint defined on port 443 (or a connectivity issue, again, as Phil suggests).
The real problem was I hadn't added the endpoint into the <Bindings>
section in <Sites>
:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="RoleName" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<WebRole name="Role" vmsize="Medium">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="HttpIn" endpointName="HttpIn" />
<Binding name="HttpsIn" endpointName="HttpsIn" /> <<<<<<!!!!!!!
</Bindings>
</Site>
</Sites>
<ConfigurationSettings>
blahblahblah
</ConfigurationSettings>
and looks like MSDN doesn't mention this explicitly at this moment of time.
So the bottom line is: self-signed certificates can be used, the browser will complain as it usually does with self-signed certificates, the new endpoint must be listed in both <Endpoints>
and <Bindings>
.
精彩评论