Set key and cert for the temp identity manually

Normally these are synced, but in this case they need to be set manually
for hasChanged to work.

Fixes #1032