Fix cert issue

Generate self-signed certificates if needed for broker and node.
Maybe this should be extracted to another class since it's duplicated in node?