spring-projects/spring-boot · error · IllegalStateException
Error reading certificate: ${ex.getMessage()}
Error message
Error reading certificate: ${ex.getMessage()} What it means
Error "Error reading certificate: ${ex.getMessage()}" thrown in spring-projects/spring-boot.
Source
Thrown at buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ssl/PemCertificateParser.java:94
catch (CertificateException ex) {
throw new IllegalStateException("Unable to get X.509 certificate factory", ex);
}
}
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);
}
}
private static byte[] decodeBase64(String content) {
byte[] bytes = content.replace("\r", "").replace("\n", "").getBytes();
return Base64.getDecoder().decode(bytes);
}
}
View on GitHub (pinned to 5b2dbdbb8b)
When it happens
Trigger: Thrown at buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ssl/PemCertificateParser.java:94 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of spring-projects/spring-boot@5b2dbdbb8b (2026-08-04).
Data as JSON: /data/errors/38fd2decde9142ea.json.
Report an issue: GitHub.