-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Maybe) SSL-Bug with certificates? #6929
Comments
Please copy/paste the error as you see it. (and any stacktraces too if presented). |
there is no "error" in the log. All browser are showing only the certificate for the host (in my example 3. entry) and therefore the chain of trust cannot be validated because only the root-certifcated is deployed on the windows-machines. |
To have it work on Edge / Chrome / Firefox you have to ensure that you are using a root CA that exists and is trusted by those browsers. Speaking of Windows behaviors with Browsers ...
Most organizations that deal with private CAs often have to enforce specific configurations on the browsers to handle things correctly (which includes locking down browser versions, and not allowing automatic upgrades as those can break the delicate configurations of preferences in the browsers to support this private CA) Jetty uses the Java SSL layer, so Java is basically the one in charge of sending the contents of your keystore and truststore. You mention that Jetty is running on SLES. Have you added your custom CA root to either the truststore that Jetty sees? or the JVM's cacerts? (IIRC, SLES cannot use Windows Certificate Store) The SSL/TLS layer has been rapidly evolving / changing over the past 5 years (at least). |
I don't think the On our website, which has a proper, non-failing, certificate signed by LetsEncrypt, we have:
So the issuer is not itself, but the first CA in the chain. |
I know - on other cuetomer-systems we also have a chain where the issuer != owner for the PrivateKeyEntry. But according to the entry type even my failing pfx seems to be correct (maybe). but this is only how I would read the output of keytool -list - how others would handle that file. |
@AlBundy33 I think this is just a KeyStore issue. Either you properly sign and import the CSR, or you trust a self-signed certificate. Jetty will use the KeyStore as a TrustStore if you don't explicitly specify a TrustStore, so having a trusted certificate entry in the KeyStore will also act as a trusted certificate as if it was in a TrustStore. |
Maybe this was really due to a wrongly converted file. It seems that the customer has created the pfx manually from p7b and the private-key file. Today I've extracted the private key and the certifactes from the from pfx and p7b and created a new pfx - it seems that this is working now because I can see the complete chain if I display the certificate in chrome. |
Jetty 9.4.41
java: AdoptOpenJDK 11.0.12+7
OS: SLES (server), Windows 10 (client)
Usually we're using PKCS12-Keystores (*.pfx) for SSL and this works mostly as expected.
But now I have a pfx-File that does not work as expected.
keytool -list -v -keystore test.customer.com.pfx
shows 4 entries.
entry
Alias name: customer issuing
Entry type: trustedCertEntry
Owner: CN=Customer Issuing CA, ...
Issuer: CN=Customer Root CA, ...
entry
Alias name: customer root
Entry type: trustedCertEntry
Owner: CN=Customer Root CA, ...
Issuer: CN=Customer Root CA, ...
entry
Alias name: customer test.customer.com
Entry type: PrivateKeyEntry
Owner: CN=test.customer.com, ...
Issuer: CN=test.customer.com, ...
Alias name: customer test.customer.com issuing
Entry type: trustedCertEntry
Owner: CN=test.customer.com, ...
Issuer: CN=Customer Issuing CA, ...
As you can see the PrivateKey (3. entry) has the same Issuer and Owner and the chain of trust is defined with the trustedCertEntries (1, 2 and 4)
Now if I start jetty and open the page I'll get an error that the certficated is not trusted (the root-certificate is in the windows-trust-store of course)
And if I display the certficate I don't see the chain - I see only test.customer.com
I've checked another customer-system where we also used a pfx-file and which is working as expected.
I've found out that on this system we have only one entry in the keystore and all other certficates "inside" this entry.
Does this mean that my "problem-pfx-file" is simply wrong or is this maybe a bug or unsupported configuration in jetty or maybe java?
I hope the description was clear enough, if not feel free to ask questions. :-)
The text was updated successfully, but these errors were encountered: