Skip to content

Commit

Permalink
fix: update cert regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryAnansky committed Feb 18, 2025
1 parent d7eacd5 commit e76493a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function resolveCertificate(cert: string | undefined): string | undefined {
function formatCertificate(cert: string): string {
// Split the content into header, body, and footer
const matches = cert.match(
/^(-----BEGIN[^-]+-----)\s*([A-Za-z0-9+/=\s]+)\s*(-----END[^-]+-----)/
/^(-----BEGIN[^-]+-----)\r?\n([A-Za-z0-9+/=\r\n\t ]+)\r?\n(-----END[^-]+-----)/
);
if (!matches) {
throw new Error('Invalid certificate format');
Expand Down

0 comments on commit e76493a

Please sign in to comment.