Richard Hart

Head of Something @ Somewhere
Kent, UK

My Music
My Photos

LinkedIn
Mastodon

nginx SSL PEM_read_bio:bad end line

Installing the intermediate certificates on our server gave me the following error while trying to start up nginx again:

  (SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line)

The end of the file looked fine, but the problem was half way through it. Somehow the concatenation had joined two lines together:

  -----END CERTIFICATE----------BEGIN CERTIFICATE-----

This just needed a line break to fix:

  -----END CERTIFICATE-----
  -----BEGIN CERTIFICATE-----