Merge pull request #6215 from daverodgman/pr6185-backport

Backprort: ssl_tls12_server: fix potential NULL-dereferencing