Fix crt/key check