/// <summary>
        /// Create a new IdentityManager to use the given identity and private key
        /// storage.
        /// </summary>
        ///
        /// <param name="identityStorage">An object of a subclass of IdentityStorage.</param>
        /// <param name="privateKeyStorage">An object of a subclass of PrivateKeyStorage.</param>
        public IdentityManager(IdentityStorage identityStorage,
				PrivateKeyStorage privateKeyStorage)
        {
            identityStorage_ = identityStorage;
            privateKeyStorage_ = privateKeyStorage;
            // Don't call checkTpm() when using a custom PrivateKeyStorage.
        }
        /// <summary>
        /// Create a new IdentityManager to use the given IdentityStorage and
        /// the default PrivateKeyStorage for your system, which is
        /// OSXPrivateKeyStorage for OS X, otherwise FilePrivateKeyStorage.
        /// </summary>
        ///
        /// <param name="identityStorage">An object of a subclass of IdentityStorage.</param>
        public IdentityManager(IdentityStorage identityStorage)
        {
            ConfigFile config;
            try {
                config = new ConfigFile();
            } catch (IOException ex) {
                throw new SecurityException("IOException " + ex.Message);
            }

            String[] canonicalTpmLocator = new String[] { null };
            identityStorage_ = identityStorage;
            privateKeyStorage_ = getDefaultPrivateKeyStorage(config,
                    canonicalTpmLocator);

            checkTpm(canonicalTpmLocator[0]);
        }
        public void setUp()
        {
            // Don't show INFO log messages.
            ILOG.J2CsMapping.Util.Logging.Logger.getLogger("").setLevel(ILOG.J2CsMapping.Util.Logging.Level.WARNING);

            FileInfo policyConfigDirectory = net.named_data.jndn.tests.integration_tests.IntegrationTestsCommon
                    .getPolicyConfigDirectory();

            databaseFilePath = new FileInfo(System.IO.Path.Combine(policyConfigDirectory.FullName,"test-public-info.db"));
            databaseFilePath.delete();

            identityStorage = new BasicIdentityStorage(System.IO.Path.GetFullPath(databaseFilePath.Name));
            identityManager = new IdentityManager(identityStorage,
                    new FilePrivateKeyStorage());
            policyManager = new SelfVerifyPolicyManager(identityStorage);
            keyChain = new KeyChain(identityManager, policyManager);
        }
 /// <summary>
 /// Create a new SelfVerifyPolicyManager which will look up the public key in
 /// the given identityStorage.
 /// Since there is no IdentotyStorage, don't look for a public key with the
 /// name in the KeyLocator and rely on the KeyLocator having the full public
 /// key DER.
 /// </summary>
 ///
 public SelfVerifyPolicyManager()
 {
     identityStorage_ = null;
 }
 /// <summary>
 /// Create a new SelfVerifyPolicyManager which will look up the public key in
 /// the given identityStorage.
 /// </summary>
 ///
 /// <param name="identityStorage">life of this SelfVerifyPolicyManager.</param>
 public SelfVerifyPolicyManager(IdentityStorage identityStorage)
 {
     identityStorage_ = identityStorage;
 }