Skip to content

Conversation

@earlgrey02
Copy link
Contributor

RsaKeyConverters currently assumes that PEM-encoded RSA keys are provided in a multi-line format, where the PEM header, footer, and Base64-encoded content are separated across multiple lines.
However, in environment variable–based configurations (ex. .env files), PEM keys are commonly stored as single-line strings, with newline characters removed or escaped.

Examples:

  • -----BEGIN PUBLIC KEY-----MIIBIjANBgkq...IDAQAB-----END PUBLIC KEY-----
  • -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq...IDAQAB\n-----END PUBLIC KEY-----

While these representations are functionally equivalent to the traditional multi-line PEM format, they are currently not supported by RsaKeyConverters and result in conversion failures.
Therefore, this PR improves RsaKeyConverters to correctly handle single-line RSA keys while preserving the existing conversion structure.

Signed-off-by: earlgrey02 <san06036@naver.com>
@earlgrey02 earlgrey02 force-pushed the support-single-line-rsa-key branch from 2ab3976 to 93761f8 Compare January 27, 2026 08:54
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants