Skip to content

Improve self-generated certificate #556

Closed
Closed

Description

@grgrzybek

Currently if https is enabled, but there's no certificate, Jolokia generates one:

In addition to a bug I made (not multiplying by 1000, so the certificate is valid for 4 days instead of 10 years), there are few more problems:

  1. no SAN headers (cn is Jolokia Agent 1.7.1)
javax.net.ssl.SSLPeerUnverifiedException: Certificate for <localhost> doesn't match any of the subject alternative names: []
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:507)
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:437)
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
...
  1. using SHA1 digest which is disabled on newer JDKs (jdk.certpath.disabledAlgorithms in /etc/crypto-policies/back-ends/java.config)
  2. using PKCS12 in the first place, which is unsupported in FIPS mode

Activity

  1. self-assigned this
    on Jul 10, 2023
  2. added this to the milestone on Jul 10, 2023
  3. tadayosi commented on Jul 12, 2023

    @tadayosi
    Member

    Maybe it's good time to release 1.7.3 after fixing this issue.

  4. modified the milestones: , 2.1.2 on Sep 12, 2024
  5. modified the milestones: 2.1.2, 2.1.3 on Nov 13, 2024
  6. modified the milestones: 2.2.0, 2.2.1 on Jan 23, 2025
  7. modified the milestones: 2.2.2, 2.2.3 on Feb 5, 2025
  8. removed this from the 2.2.3 milestone on Feb 14, 2025
  9. added this to the 2.3.1 milestone on Sep 4, 2025
  10. added theissue type on Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions