add trusted key store

Might as well just use ioutil.WriteFile here since you have the contents in memory already.