test that keyfile can be None
merge 3.4