Fix some pointer casting issues.

This also fixes the size of an empty vendor_cert or dbx_cert.

Signed-off-by: Peter Jones <shim-owner@fedoraproject.org>