Merge pull request #2931 from piotr-now/memory-info

Avoid allocating 0-length buffers for PSK. Add memory debug information to ssl_client2.