I recommend this bug be passed upstream. The problem described is due to hardcoded "MIN_LEN=4" in source file crypto/pem/pem_lib.c Fixing this almost certainly raises series of issues, and requires mods in # of places.