Fix error handling in tls_check_common_name()
authortb <tb@openbsd.org>
Fri, 5 May 2023 14:05:33 +0000 (14:05 +0000)
committertb <tb@openbsd.org>
Fri, 5 May 2023 14:05:33 +0000 (14:05 +0000)
commitd78b98e7780efc1674fcf626063aeeb081ad821d
treed1cb192c2a8403bea1434df54bac2494ef7105df
parent7a8b831eff176a928c8c673d79dd35e0c03e2610
Fix error handling in tls_check_common_name()

A calloc failure should be a fatal error, so make it return -1.
Also switch the default rv to -1 and distinguish error cases with
acceptable situations with goto err/goto done.

ok jsing
lib/libtls/tls_verify.c