Troubleshooting
Problem
You are running the CLI store certificate keystore command. You paste the certificate, hit ctrl-D, and get an error similar to: unable to load certificate error:0906D064:PEM routines:PEM_read_bio:bad base64 decode:pem_lib.c:812: keytool error (likely untranslated): java.io.FileNotFoundException: /var/tmp/server.cer.clean (No such file or directory) Can't store new certificate.. err
Cause
The PEM file has line breaks. Opening or saving the certificate in Notepad or Word can cause this.
Environment
v10
Diagnosing The Problem
Examine the pasted data in WordPad or vi. If you see line breaks in odd places, this is the problem. Proper PEM format appears as 64 characters per line, except the last line which can be smaller.
Resolving The Problem
To fix it, try one of the following:
- Execute the UNIX program dos2unix on the file and fold the lines using "fold -w 64 <file>.pem"
- Try fixing it in an ASCII text editor that won't add any formatting.
- Obtain a new copy ensuring it is copied as ASCII.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg22009211