signed SSL certificates

i updated the certs to my purchased ssl, while the interface now works with no self-signed errors, the java applet doesnt work

also tried the instructions at http://pve.proxmox.com/wiki/HTTPSCertificateConfiguration for the /etc/pve certs not just /etc/pve/local

i'm getting the following error when trying to load the console java applet after both attempts:

Code:
Error: TLS handshake failed javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: cert path too long

This is the same problem I get. I'm guessing it's because I'd loaded the Intermediate Certificate into the .pem file and while that works for PVEProxy, Java doesn't like it. I had to give up and go back to the self signed certificates for now.
 
It does not work here. See screendump.

Selection_006.jpg

Java errors:

Code:
Initializing...
Connecting to esx1.datanom.net, port 5900...
Connected to server
RFB server supports protocol version 3.8
Using RFB protocol version 3.8
VeNCrypt chooser
X509Plain
Generating TLS context
Doing TLS handshake
Error: TLS handshake failed javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: certificate does not match
java.lang.Exception: TLS handshake failed javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: certificate does not match
    at com.tigervnc.vncviewer.TLSTunnelBase.setup(TLSTunnelBase.java:73)
    at com.tigervnc.vncviewer.RfbProto.authenticateX509(RfbProto.java:416)
    at com.tigervnc.vncviewer.VncViewer.doAuthentification(VncViewer.java:445)
    at com.tigervnc.vncviewer.VncViewer.doAuthentification(VncViewer.java:406)
    at com.tigervnc.vncviewer.VncViewer.connectAndAuthenticate(VncViewer.java:385)
    at com.tigervnc.vncviewer.VncViewer.run(VncViewer.java:202)
    at java.lang.Thread.run(Unknown Source)
RFB socket closed

I think tigervnc has problems with intermediate certificates.
 
Last edited:
Just a longshot. Is tigervnc making a literal comparison of the certificates disregarding the concept of *.foo.bar. In other words does tigervnc not understand star certificates?
 
Just a longshot. Is tigervnc making a literal comparison of the certificates disregarding the concept of *.foo.bar. In other words does tigervnc not understand star certificates?

interesting thoughts there however i used the wildcard SSL setup with the "old" apache setup and never had issues with the java applet its just since moving to the PVEProxy application, actually very tempted to just reinstall apache or nginx and try and just reverse proxy port 443 through to port 8006
 
I following the directions for setting up nginx as a proxy (http://forum.proxmox.com/threads/7983-nginx-proxy-in-front-of-PVE-2-0), ignoring the parts regarding apache. I added proxy_read_timeout; proxy_connect_timeout 120; after location to limit 502 gateway timeouts, and added my combined crt (http://www.westphahl.net/blog/2012/01/03/setting-up-https-with-nginx-and-startssl/) and unencrypted key. I tested the web interface, Java VNC and API and they all seem to work. Also, you get the benefit of not having to specify the port.
 
Maybe you forgot to restart 'pveproxy' and 'pvedaemon'?

no i followed your isntructions to the letter - i can either have the Java Applet working but the security chain broken through a lack of an intermediate cert in the PEM file or i can have the security chain working but the java applet not working with a cert too long error as described above
 
In your case the probleming is related to the patch mentioned above. Specifically this part:
Code:
 +	    if (certs == null || certs.length > 1) {
 +	      throw new CertificateException("cert path too long");
 +	    }
The above means that if there are returned more than one cert it bails with an error. Eg. chained certs are not allowed.
 
The above means that if there are returned more than one cert it bails with an error. Eg. chained certs are not allowed.

But that code is from 2011 - so the current code in 3.0 should behave exactly the same as in 2.X
 
Maybe you forgot to restart 'pveproxy' and 'pvedaemon'?
Now, this is weird. I have been able to make it work but working in a wrong way.

Before:
Following the instructions for creating a chained certificate when the server, like nginx, does not have an option to load a chained cert file like apache.
cat my.pem subclass2.pem subclass1.pem ca.pem > unified.pem 'input too long'
cat subclass2.pem ca.pem > unified.pem 'certificates does not match'
cat subclass1.pem ca.pem > unified.pem 'certificates does not match'
cat my.pem subclass2.pem ca.pem > unified.pem 'certificates does not match'
cat my.pem subclass1.pem ca.pem > unified.pem 'certificates does not match'

after:
cat my.pem ca.pem > ca-unified.pem this works

Conclusion:
The patch mentioned above is not able to handle all legitimate situations and therefore it is not complete.
 
Last edited:
The patch mentioned above is not able to handle all legitimate situations and therefore it is not complete.

The idea is that /etc/pve/pve-root-ca.pem is the CA (direct issuer) for all node certs. I am not sure why you want/need additional chain.
 
The idea is that /etc/pve/pve-root-ca.pem is the CA (direct issuer) for all node certs. I am not sure why you want/need additional chain.

the problem seems to be that pveproxy is not using this for https connections and thus the security trust chain is broken when checking the http interface with a tool like: http://www.sslshopper.com/ssl-checker.html as theres no intermediate certs presented
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!