forDirectory() — spring-boot Function Reference
Architecture documentation for the forDirectory() function in SslContextFactory.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 558e2ad1_2b13_cad1_5b7d_2c012bc620c9["forDirectory()"] b09d348c_c0fa_aa08_2f38_cccd4e5372b7["getTlsSocketStrategy()"] b09d348c_c0fa_aa08_2f38_cccd4e5372b7 -->|calls| 558e2ad1_2b13_cad1_5b7d_2c012bc620c9 781aab54_e630_1aac_e233_a040d4723d6f["createIfPossibleWhenTlsVerifyUsesHttps()"] 781aab54_e630_1aac_e233_a040d4723d6f -->|calls| 558e2ad1_2b13_cad1_5b7d_2c012bc620c9 95caec02_132b_4e71_aa19_50dcdfb0d8ef["verifyCertificateFiles()"] 558e2ad1_2b13_cad1_5b7d_2c012bc620c9 -->|calls| 95caec02_132b_4e71_aa19_50dcdfb0d8ef 3e1ee16b_8344_9ba0_fcec_c1a79046c30d["getKeyManagerFactory()"] 558e2ad1_2b13_cad1_5b7d_2c012bc620c9 -->|calls| 3e1ee16b_8344_9ba0_fcec_c1a79046c30d ed8b57dd_0641_d6f0_d3b8_f69fa401ce93["getTrustManagerFactory()"] 558e2ad1_2b13_cad1_5b7d_2c012bc620c9 -->|calls| ed8b57dd_0641_d6f0_d3b8_f69fa401ce93 style 558e2ad1_2b13_cad1_5b7d_2c012bc620c9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ssl/SslContextFactory.java lines 54–73
public SSLContext forDirectory(String directory) {
try {
Path keyPath = Paths.get(directory, "key.pem");
Path certPath = Paths.get(directory, "cert.pem");
Path caPath = Paths.get(directory, "ca.pem");
Path caKeyPath = Paths.get(directory, "ca-key.pem");
verifyCertificateFiles(keyPath, certPath, caPath);
KeyManagerFactory keyManagerFactory = getKeyManagerFactory(keyPath, certPath);
TrustManagerFactory trustManagerFactory = getTrustManagerFactory(caPath, caKeyPath);
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
return sslContext;
}
catch (RuntimeException ex) {
throw ex;
}
catch (Exception ex) {
throw new RuntimeException(ex.getMessage(), ex);
}
}
Domain
Subdomains
Calls
- getKeyManagerFactory()
- getTrustManagerFactory()
- verifyCertificateFiles()
Source
Frequently Asked Questions
What does forDirectory() do?
forDirectory() is a function in the spring-boot codebase.
What does forDirectory() call?
forDirectory() calls 3 function(s): getKeyManagerFactory, getTrustManagerFactory, verifyCertificateFiles.
What calls forDirectory()?
forDirectory() is called by 2 function(s): createIfPossibleWhenTlsVerifyUsesHttps, getTlsSocketStrategy.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free