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

readCertificates() — spring-boot Function Reference

Architecture documentation for the readCertificates() function in PemCertificateParser.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  53791da8_48e6_2943_ac92_851da56cfe9d["readCertificates()"]
  00915f87_7e46_4b73_13ac_6cf7c0b4dc33["parse()"]
  00915f87_7e46_4b73_13ac_6cf7c0b4dc33 -->|calls| 53791da8_48e6_2943_ac92_851da56cfe9d
  70e6cce3_326f_1dea_5470_9fe34f117ce3["decodeBase64()"]
  53791da8_48e6_2943_ac92_851da56cfe9d -->|calls| 70e6cce3_326f_1dea_5470_9fe34f117ce3
  style 53791da8_48e6_2943_ac92_851da56cfe9d 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/PemCertificateParser.java lines 81–96

	private static void readCertificates(String text, CertificateFactory factory, Consumer<X509Certificate> consumer) {
		try {
			Matcher matcher = PATTERN.matcher(text);
			while (matcher.find()) {
				String encodedText = matcher.group(1);
				byte[] decodedBytes = decodeBase64(encodedText);
				ByteArrayInputStream inputStream = new ByteArrayInputStream(decodedBytes);
				while (inputStream.available() > 0) {
					consumer.accept((X509Certificate) factory.generateCertificate(inputStream));
				}
			}
		}
		catch (CertificateException ex) {
			throw new IllegalStateException("Error reading certificate: " + ex.getMessage(), ex);
		}
	}

Subdomains

Calls

  • decodeBase64()

Called By

Frequently Asked Questions

What does readCertificates() do?
readCertificates() is a function in the spring-boot codebase.
What does readCertificates() call?
readCertificates() calls 1 function(s): decodeBase64.
What calls readCertificates()?
readCertificates() is called by 1 function(s): parse.

Analyze Your Own Codebase

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

Try Supermodel Free