Fix a crash in tls_construct_client_certificate.