fix valid() in cloudkeychain format