Fix a segmentation fault if the private key file is corrupted
Merge pull request #1358 from lpefferkorn/privkey_check

Fix a segmentation fault if the private key file is corrupted