cfengine/core — pull request #1358 by lpefferkorn (2014-01-29 06:33:12+00:00)
Title: Fix a segmentation fault if the private key file is corrupted

When the private key file is corrupted, cf-promises and cf-agent generate a segmentation fault:
Without the patch:

$ cf-promises
2014-01-29T07:29:57+0100 error: Error reading private key. (PEM_read_RSAPrivateKey: too long)
Segmentation fault

With the patch:

$ cf-promises
2014-01-29T07:25:22+0100 error: Error reading private key. (PEM_read_RSAPrivateKey: too long)
2014-01-29T07:25:22+0100 error: Fatal CFEngine error: Couldn't read private key from file /home/loic/.cfagent/ppkeys/localhost.priv

Feedback is welcome :-)