When importing PEM certificates, ignore leading/trailing whitespace
Yesterday, Dave and me were installing the LetsEncrypt intermediate CA certificates in Openfire, which failed because of a trailing whitespae in the PEM representation. The parser that we use is very strict, and disallows the PEM.
We should pre-process the input, and remove leading and trailing spaces from each line of the PEM certificate. That'll allow people to copy/paste with ease.