VMware {code} Community
itguybri
Contributor
Contributor

VI SDK using HTTPS:// - Setup instructions not 100%

I am having issues with using HTTPS against the Virtual Center (using C# and the VI SDK) API.

I try to import the certificate as outlined in the "Developer's Setup Guide" but I still receive an error from InterNet Explorer which prevents me from pening a secure connection.

The error is "The name on the Security Certificate is invalid or does not match the name of the site"

The certificate is the self-signed VMware certificate that is generated with Virtual Center installs itself. Therefore I am connecting to VC Server> and the certificate is for VMware (or ) Because the names don't match the site is not trusted - thus the connection does not work.

How has everyone gotten around this? (without generating internal self signed certificates)

Reply
0 Kudos
1 Reply
jrackliffe
Hot Shot
Hot Shot

I know that this has been discussed before, but in .NET you can short circuit the SSL auth.

For example in 2.0 it's in 1 line + your using:

using System.Security.Cryptography.X509Certificates;

{....

ServicePointManager.ServerCertificateValidationCallback = delegate(Object obj, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return true; };

}

Reply
0 Kudos