If this dependency is really optional, theKeyStore may be null.