fix for https://github.com/zendframework/zf2/commit/b188985a2ee74561376463fb3c2d7ae17fff575f#commitcomment-2393215
see http://php.net/manual/en/function.openssl-error-string.php
Merge branch 'hotfix/3691'

Close #3691
Fixes #3469
Merge branch 'openssl_error_string' of git://github.com/CrisMKM/zf2 into hotfix/3698
[#3698] CS and logic fixes

- Use braces for all loops
- infinite loop condition, as $msg would be non-empty if any messages were
  found. Assigned results of openssl_error_message to temp variable, and did
  strict test against boolean false before concatenating
- trim the result
- use descriptive variable names
Merge branch 'hotfix/3698' into develop

Forward port #3698