Check for SSL encoding inconsistencies
Check for SSL encoding inconsistencies

This fixes bug 853, which was rather subtle: When adding
nodes with a different openssl library than the master
node, the SSL server certificate could be encoded
differently from the master node. This caused
'gnt-cluster verify' to complain about differing
'server.pem' files although all certificates would
work and private keys could be matched sucessfully
to the public part of the certificate.

This patch does two things:
- It checks if the encoded versions of the certificate
  differ and if yes, an error is logged.
- It writes exactly the file to disk that it receives
  from the master node so that file inconsistency
  is prevented.

Signed-off-by: Helga Velroyen <2d0126b1ec6f9ec5cbec4a7012aa14faeaef10f5@google.com>
Reviewed-by: Klaus Aehlig <4ce51de36d9068cd7db2eec1151e0f3f95419008@google.com>

ganeti/ganeti,onponomarev/ganeti,yiannist/ganeti,yiannist/ganeti,onponomarev/ganeti,andir/ganeti,bitemyapp/ganeti,ganeti/ganeti,ganeti-github-testing/ganeti-test-1,andir/ganeti,leshchevds/ganeti,grnet/snf-ganeti,mbakke/ganeti,mbakke/ganeti,ganeti/ganeti,mbakke/ganeti,bitemyapp/ganeti,andir/ganeti,apyrgio/ganeti,leshchevds/ganeti,apyrgio/ganeti,apyrgio/snf-ganeti,grnet/snf-ganeti,leshchevds/ganeti,ganeti-github-testing/ganeti-test-1,dimara/ganeti,yiannist/ganeti,apyrgio/snf-ganeti,dimara/ganeti