Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JENKINS-49668 - Root CAs component is fixed.
Links below provide some explanation example as to how to get the actual trust store for inspection. They were used to replace the current broken code which simply tries to enumerate empty KeyStore. https://github.com/jenkinsci/jenkins-scripts/pull/82/files https://stackoverflow.com/questions/8884831/listing-certificates-in-jvm-trust-store
- Loading branch information
Showing
2 changed files
with
51 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/java/com/cloudbees/jenkins/support/impl/RootCAsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.cloudbees.jenkins.support.impl; | ||
|
||
import org.junit.Test; | ||
|
||
import java.io.StringWriter; | ||
|
||
import static org.hamcrest.Matchers.startsWith; | ||
import static org.junit.Assert.assertThat; | ||
|
||
public class RootCAsTest { | ||
|
||
@Test | ||
public void getRootCAList() { | ||
final StringWriter certsWriter = new StringWriter(); | ||
RootCAs.getRootCAList(certsWriter); | ||
final String rootCAs = certsWriter.toString(); | ||
|
||
assertThat("output doesn't start with the Exception", | ||
rootCAs, startsWith("===== Trust Manager 0 =====\n")); | ||
} | ||
} |