Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False Negatives reported by CogniCrypt_TESTGEN #295

Open
rakshitkr opened this issue Sep 19, 2020 · 0 comments
Open

False Negatives reported by CogniCrypt_TESTGEN #295

rakshitkr opened this issue Sep 19, 2020 · 0 comments

Comments

@rakshitkr
Copy link
Contributor

rakshitkr commented Sep 19, 2020

Refer issue 404 in CogniCrypt

ORDER
	Gets, Loads, ((GetEntry?, GetKey) | (SetEntry, Stores))*
@Test
	public void keyStoreInvalidTest7() throws NoSuchAlgorithmException, UnrecoverableKeyException, IOException,
			KeyStoreException, CertificateException, UnrecoverableEntryException {

		char[] passwordKey = null;
		String aliasGet = null;
		String alias = null;
		Entry entry = null;
		String keyStoreAlgorithm = null;
		String aliasSet = null;
		ProtectionParameter protParamSet = null;
		LoadStoreParameter paramStore = null;
		ProtectionParameter protParamGet = null;

		KeyStore keyStore0 = KeyStore.getInstance(keyStoreAlgorithm);
                // loads skipped
		keyStore0.getEntry(aliasGet, protParamGet);
		Key key = keyStore0.getKey(alias, passwordKey);
		keyStore0.setEntry(aliasSet, entry, protParamSet);
		keyStore0.store(paramStore);
		Assertions.notHasEnsuredPredicate(key);
		Assertions.mustNotBeInAcceptingState(keyStore0); // FAILS

	}

	@Test
	public void keyStoreInvalidTest8() throws NoSuchAlgorithmException, UnrecoverableKeyException, IOException,
			KeyStoreException, CertificateException, NoSuchProviderException, UnrecoverableEntryException {

		char[] passwordKey = null;
		String aliasGet = null;
		String alias = null;
		Entry entry = null;
		String keyStoreAlgorithm = null;
		String aliasSet = null;
		ProtectionParameter protParamSet = null;
		LoadStoreParameter paramStore = null;
		ProtectionParameter protParamGet = null;

		KeyStore keyStore0 = KeyStore.getInstance(keyStoreAlgorithm, (Provider) null);
                // loads skipped
		keyStore0.getEntry(aliasGet, protParamGet);
		Key key = keyStore0.getKey(alias, passwordKey);
		keyStore0.setEntry(aliasSet, entry, protParamSet);
		keyStore0.store(paramStore);
		Assertions.notHasEnsuredPredicate(key);
		Assertions.mustNotBeInAcceptingState(keyStore0); // FAILS

	}

	@Test
	public void keyStoreInvalidTest9() throws NoSuchAlgorithmException, UnrecoverableKeyException, IOException,
			KeyStoreException, CertificateException, UnrecoverableEntryException {

		char[] passwordKey = null;
		String aliasGet = null;
		String alias = null;
		Entry entry = null;
		String keyStoreAlgorithm = null;
		String aliasSet = null;
		ProtectionParameter protParamSet = null;
		OutputStream fileoutput = null;
		char[] passwordOut = null;
		ProtectionParameter protParamGet = null;

		KeyStore keyStore0 = KeyStore.getInstance(keyStoreAlgorithm);
                // loads skipped
		keyStore0.getEntry(aliasGet, protParamGet);
		Key key = keyStore0.getKey(alias, passwordKey);
		keyStore0.setEntry(aliasSet, entry, protParamSet);
		keyStore0.store(fileoutput, passwordOut);
		Assertions.notHasEnsuredPredicate(key);
		Assertions.mustNotBeInAcceptingState(keyStore0); // FAILS

	}
@rakshitkr rakshitkr changed the title False Positives reported by CogniCrypt_TESTGEN False Negatives reported by CogniCrypt_TESTGEN Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants