VMware Cloud Community
prusacv
Contributor
Contributor

VMware HTML Console SDK - self signed certificate

I’m using VMware HTML Console SDK to send key press to the VM. From version 5.5 update 2 script doesn’t work anymore. The problem lies in the fact that from version 5.5 update 2 communication is switched to HTTPS protocol. Because we are using default VMware certificate which are self-signed script doesn’t work anymore. I found that is because Internet Explorer displaying certificate error warning page (when opening html file with wss URL).

My question, is there any way to jump this warning page and send key press to VM from Internet Explorer?

I found some solution like:

  1. process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

and

  1. wmks.connect(‘wss URL’, {rejectUnauthorized: false});

but this didn’t work.

Is this correct way to ignore warning page and proceed to VM. Also I don’t know where I should put this commands (.html or .js files).

If somebody have idea how to fix this problem, I would be grateful for help.

0 Kudos
1 Reply
jwswizzle
Enthusiast
Enthusiast

I am doing something similar with the HTML SDK and the Vmware self signed certificate. The secure websocket (wss) doesn't appear to work until you accept the SSL. Luckily, in my application I was able to automate the process by testing the url (http get and javascript), then extract the SSL info and import the key. 

0 Kudos