spring-projects/spring-boot · error · IllegalStateException
Missing private key or unrecognized format
Error message
Missing private key or unrecognized format
What it means
Error "Missing private key or unrecognized format" thrown in spring-projects/spring-boot.
Source
Thrown at buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ssl/PemPrivateKeyParser.java:220
* @param password the password used to decrypt an encrypted private key
* @return the parsed private key
*/
static @Nullable PrivateKey parse(@Nullable String text, @Nullable String password) {
if (text == null) {
return null;
}
try {
for (PemParser pemParser : PEM_PARSERS) {
PrivateKey privateKey = pemParser.parse(text, password);
if (privateKey != null) {
return privateKey;
}
}
}
catch (Exception ex) {
throw new IllegalStateException("Error loading private key file: " + ex.getMessage(), ex);
}
throw new IllegalStateException("Missing private key or unrecognized format");
}
/**
* Parser for a specific PEM format.
*/
private static class PemParser {
private final Pattern pattern;
private final BiFunction<byte[], @Nullable String, PKCS8EncodedKeySpec> keySpecFactory;
private final String[] algorithms;
PemParser(String header, String footer,
BiFunction<byte[], @Nullable String, PKCS8EncodedKeySpec> keySpecFactory, String... algorithms) {
this.pattern = Pattern.compile(header + BASE64_TEXT + footer, Pattern.CASE_INSENSITIVE);
this.keySpecFactory = keySpecFactory;
this.algorithms = algorithms;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/PemPrivateKeyParser.java:220 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/d7063da8c3963baf.json.
Report an issue: GitHub.