MT#6695 separate api/server certfile
MT#6695 error checks on generating certificates