In working with a new site, I was installing a new certificate into the system and everything appeared fine until I tried to install the actual certificate. I received the error:
keytool error: java.security.cert.CertificateException: java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.
As it turned out, I had an extra blank line at the end of the import file. These extra characters at the end of the certificate file causes the “parser” to interpret as the start of another certificate. So make sure that there is nothing after the “—–END” line.