/**
  * @test
  */
 public function shutdownDoesNotSavesKeysToKeystoreFileIfKeysWereNotModified()
 {
     $this->assertFalse(file_exists('vfs://Foo/EncryptionKey'));
     $keyPairUuid = $this->rsaWalletService->generateNewKeypair(TRUE);
     $this->rsaWalletService->shutdownObject();
     $this->assertTrue(file_exists('vfs://Foo/EncryptionKey'));
     $this->rsaWalletService->initializeObject();
     $this->rsaWalletService->getPublicKey($keyPairUuid);
     // Hack: remove the file so we can actually detect if shutdown() would write it:
     unlink('vfs://Foo/EncryptionKey');
     $this->rsaWalletService->shutdownObject();
     $this->assertFalse(file_exists('vfs://Foo/EncryptionKey'));
 }
 /**
  * Generate a public/private key pair and add it to the RSAWalletService
  *
  * @param boolean $usedForPasswords If the private key should be used for passwords
  * @return void
  * @see typo3.flow:security:importprivatekey
  */
 public function generateKeyPairCommand($usedForPasswords = false)
 {
     $fingerprint = $this->rsaWalletService->generateNewKeypair($usedForPasswords);
     $this->outputLine('The key pair has been successfully generated. Use the following fingerprint to refer to it in the RSAWalletService: ' . PHP_EOL . PHP_EOL . $fingerprint . PHP_EOL);
 }