Added support for defining a custom keystore