encrypted-keys: fix error return code