format file and class documentation to psr-2 standard

refactored ssl cert and passphrase handling to be more configurable