wip: some seriously broken key and cert loading stuff.