Add additional error checking
Add additional error checking

Initialise client and server secret buffers and check their
lengths.

Signed-off-by: Thomas Daubney <5b910c8e7c225fd62319de5b44eecef1f6356fe1@arm.com>

ARMmbed/mbedtls,Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls,ARMmbed/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls