tls_get_common_name
return tls_get_common_name(ctx, ctx->ssl_peer_cert, NULL, common_name);
int tls_get_common_name(struct tls *_ctx, X509 *_cert, const char *_in_name,
if (tls_get_common_name(ctx, cert, name, &common_name) == -1)