Metaswitch/homestead — pull request #78 by rkd-msw (2014-04-08 14:20:51+00:00)
Title: [Reviewer: Matt] Handle corrupt cert.pem or ca.pem files correctly

Mitigates https://github.com/Metaswitch/homestead/issues/73 - this fix means that just running the homestead script (or 'sudo service clearwater-infrastructure restart') will recover from invalid certificate files. However, I still don't know what corrupts them in the first place.

I've tested by:
* blanking both files
* blanking just cert.pem
* blanking just ca.pem
* removing both files

and ensuring that 'sudo service clearwater-infrastructure restart' regenerates both keys in each of the four cases.