Home / Function/ separateKeyStoreAndTrustStoreShouldProvideSslInfo() — spring-boot Function Reference

separateKeyStoreAndTrustStoreShouldProvideSslInfo() — spring-boot Function Reference

Architecture documentation for the separateKeyStoreAndTrustStoreShouldProvideSslInfo() function in SslInfoTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  d4618821_15b3_d3f2_a868_a60ba4ce9753["separateKeyStoreAndTrustStoreShouldProvideSslInfo()"]
  41cd76d7_48b9_fa25_7f50_c038acb01cb4["DefaultSslBundleRegistry()"]
  d4618821_15b3_d3f2_a868_a60ba4ce9753 -->|calls| 41cd76d7_48b9_fa25_7f50_c038acb01cb4
  5da1fb80_a713_efc5_2f30_14955e4a7d76["forLocation()"]
  d4618821_15b3_d3f2_a868_a60ba4ce9753 -->|calls| 5da1fb80_a713_efc5_2f30_14955e4a7d76
  ab324ff6_8808_1196_6192_d2674b03537f["withPassword()"]
  d4618821_15b3_d3f2_a868_a60ba4ce9753 -->|calls| ab324ff6_8808_1196_6192_d2674b03537f
  4e6af648_6688_a51b_9689_8570f317cf4b["JksSslStoreBundle()"]
  d4618821_15b3_d3f2_a868_a60ba4ce9753 -->|calls| 4e6af648_6688_a51b_9689_8570f317cf4b
  57be9bb5_de42_ee29_843b_d909abc58185["registerBundle()"]
  d4618821_15b3_d3f2_a868_a60ba4ce9753 -->|calls| 57be9bb5_de42_ee29_843b_d909abc58185
  style d4618821_15b3_d3f2_a868_a60ba4ce9753 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/info/SslInfoTests.java lines 228–254

	@Test
	@WithPackageResources({ "keystore.jks", "truststore.jks" })
	void separateKeyStoreAndTrustStoreShouldProvideSslInfo() {
		DefaultSslBundleRegistry sslBundleRegistry = new DefaultSslBundleRegistry();
		JksSslStoreDetails keyStoreDetails = JksSslStoreDetails.forLocation("classpath:keystore.jks")
			.withPassword("secret");
		JksSslStoreDetails trustStoreDetails = JksSslStoreDetails.forLocation("classpath:truststore.jks")
			.withPassword("secret");
		SslStoreBundle sslStoreBundle = new JksSslStoreBundle(keyStoreDetails, trustStoreDetails);
		sslBundleRegistry.registerBundle("test-separate", SslBundle.of(sslStoreBundle));
		SslInfo sslInfo = new SslInfo(sslBundleRegistry, CLOCK);
		assertThat(sslInfo.getBundles()).hasSize(1);
		BundleInfo bundle = sslInfo.getBundles().get(0);
		assertThat(bundle.getName()).isEqualTo("test-separate");
		// Keystore has 2 PrivateKeyEntry entries
		assertThat(bundle.getCertificateChains()).hasSize(2);
		assertThat(bundle.getCertificateChains()).allSatisfy((chain) -> {
			assertThat(chain.getCertificates()).hasSize(1);
			assertThat(chain.getCertificates().get(0).getSubject()).startsWith("CN=localhost");
		});
		// Truststore has 3 trustedCertEntry entries
		assertThat(bundle.getTrustStoreCertificateChains()).hasSize(3);
		assertThat(bundle.getTrustStoreCertificateChains()).allSatisfy((chain) -> {
			assertThat(chain.getCertificates()).hasSize(1);
			assertThat(chain.getCertificates().get(0).getSubject()).startsWith("CN=localhost");
		});
	}

Domain

Subdomains

Frequently Asked Questions

What does separateKeyStoreAndTrustStoreShouldProvideSslInfo() do?
separateKeyStoreAndTrustStoreShouldProvideSslInfo() is a function in the spring-boot codebase.
What does separateKeyStoreAndTrustStoreShouldProvideSslInfo() call?
separateKeyStoreAndTrustStoreShouldProvideSslInfo() calls 5 function(s): DefaultSslBundleRegistry, JksSslStoreBundle, forLocation, registerBundle, withPassword.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free