reformatted crypto_test output
This commit is contained in:
@@ -136,25 +136,23 @@ static bool test_crypter(private_crypto_tester_t *this,
|
|||||||
crypter->destroy(crypter);
|
crypter->destroy(crypter);
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
DBG1("test vector %d failed, %N disabled",
|
DBG1("disabled %N: test vector %d failed",
|
||||||
tested, encryption_algorithm_names, alg);
|
encryption_algorithm_names, alg, tested);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DBG2("%N test vector %d successful",
|
|
||||||
encryption_algorithm_names, alg, tested);
|
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
if (!tested)
|
if (!tested)
|
||||||
{
|
{
|
||||||
DBG1("no test vectors found for %N%s",
|
DBG1("%s %N: no test vectors found",
|
||||||
encryption_algorithm_names, alg,
|
this->required ? "disabled" : "enabled ",
|
||||||
this->required ? ", disabled" : "");
|
encryption_algorithm_names, alg);
|
||||||
return !this->required;
|
return !this->required;
|
||||||
}
|
}
|
||||||
if (!failed)
|
if (!failed)
|
||||||
{
|
{
|
||||||
DBG1("successfully tested %d test vectors for %N",
|
DBG1("enabled %N: successfully passed %d test vectors",
|
||||||
tested, encryption_algorithm_names, alg);
|
encryption_algorithm_names, alg, tested);
|
||||||
}
|
}
|
||||||
return !failed;
|
return !failed;
|
||||||
}
|
}
|
||||||
@@ -185,7 +183,7 @@ static bool test_signer(private_crypto_tester_t *this,
|
|||||||
signer = create(alg);
|
signer = create(alg);
|
||||||
if (!signer)
|
if (!signer)
|
||||||
{
|
{
|
||||||
DBG1("creating instance failed, %N disabled",
|
DBG1("disabled %N: creating instance failed",
|
||||||
integrity_algorithm_names, alg);
|
integrity_algorithm_names, alg);
|
||||||
failed = TRUE;
|
failed = TRUE;
|
||||||
break;
|
break;
|
||||||
@@ -242,25 +240,23 @@ static bool test_signer(private_crypto_tester_t *this,
|
|||||||
signer->destroy(signer);
|
signer->destroy(signer);
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
DBG1("test vector %d failed, %N disabled",
|
DBG1("disabled %N: test vector %d failed",
|
||||||
tested, integrity_algorithm_names, alg);
|
integrity_algorithm_names, alg, tested);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DBG2(" %N test vector %d successful",
|
|
||||||
integrity_algorithm_names, alg, tested);
|
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
if (!tested)
|
if (!tested)
|
||||||
{
|
{
|
||||||
DBG1("no test vectors found for %N%s",
|
DBG1("%s %N: no test vectors found%s",
|
||||||
integrity_algorithm_names, alg,
|
this->required ? "disabled" : "enabled ",
|
||||||
this->required ? ", disabled" : "");
|
integrity_algorithm_names, alg);
|
||||||
return !this->required;
|
return !this->required;
|
||||||
}
|
}
|
||||||
if (!failed)
|
if (!failed)
|
||||||
{
|
{
|
||||||
DBG1("successfully tested %d test vectors for %N",
|
DBG1("enabled %N: successfully passed %d test vectors",
|
||||||
tested, integrity_algorithm_names, alg);
|
integrity_algorithm_names, alg, tested);
|
||||||
}
|
}
|
||||||
return !failed;
|
return !failed;
|
||||||
}
|
}
|
||||||
@@ -291,7 +287,7 @@ static bool test_hasher(private_crypto_tester_t *this, hash_algorithm_t alg,
|
|||||||
hasher = create(alg);
|
hasher = create(alg);
|
||||||
if (!hasher)
|
if (!hasher)
|
||||||
{
|
{
|
||||||
DBG1("creating instance failed, %N disabled",
|
DBG1("disabled %N: creating instance failed",
|
||||||
hash_algorithm_names, alg);
|
hash_algorithm_names, alg);
|
||||||
failed = TRUE;
|
failed = TRUE;
|
||||||
break;
|
break;
|
||||||
@@ -334,25 +330,23 @@ static bool test_hasher(private_crypto_tester_t *this, hash_algorithm_t alg,
|
|||||||
hasher->destroy(hasher);
|
hasher->destroy(hasher);
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
DBG1("test vector %d failed, %N disabled",
|
DBG1("disabled %N: test vector %d failed",
|
||||||
tested, hash_algorithm_names, alg);
|
hash_algorithm_names, alg), tested;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DBG2("%N test vector %d successful",
|
|
||||||
hash_algorithm_names, alg, tested);
|
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
if (!tested)
|
if (!tested)
|
||||||
{
|
{
|
||||||
DBG1("no test vectors found for %N%s",
|
DBG1("%s %N: no test vectors found",
|
||||||
hash_algorithm_names, alg,
|
this->required ? "disabled" : "enabled ",
|
||||||
this->required ? ", disabled" : "");
|
hash_algorithm_names, alg);
|
||||||
return !this->required;
|
return !this->required;
|
||||||
}
|
}
|
||||||
if (!failed)
|
if (!failed)
|
||||||
{
|
{
|
||||||
DBG1("successfully tested %d test vectors for %N",
|
DBG1("enabled %N: successfully passed %d test vectors",
|
||||||
tested, hash_algorithm_names, alg);
|
hash_algorithm_names, alg, tested);
|
||||||
}
|
}
|
||||||
return !failed;
|
return !failed;
|
||||||
}
|
}
|
||||||
@@ -383,7 +377,7 @@ static bool test_prf(private_crypto_tester_t *this,
|
|||||||
prf = create(alg);
|
prf = create(alg);
|
||||||
if (!prf)
|
if (!prf)
|
||||||
{
|
{
|
||||||
DBG1("creating instance failed, %N disabled",
|
DBG1("disabled %N: creating instance failed",
|
||||||
pseudo_random_function_names, alg);
|
pseudo_random_function_names, alg);
|
||||||
failed = TRUE;
|
failed = TRUE;
|
||||||
break;
|
break;
|
||||||
@@ -437,25 +431,23 @@ static bool test_prf(private_crypto_tester_t *this,
|
|||||||
prf->destroy(prf);
|
prf->destroy(prf);
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
DBG1("test vector %d failed, %N disabled",
|
DBG1("disabled %N: test vector %d failed",
|
||||||
tested, pseudo_random_function_names, alg);
|
pseudo_random_function_names, alg, tested);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DBG2("%N test vector %d successful",
|
|
||||||
pseudo_random_function_names, alg, tested);
|
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
if (!tested)
|
if (!tested)
|
||||||
{
|
{
|
||||||
DBG1("no test vectors found for %N%s",
|
DBG1("%s %N: no test vectors found",
|
||||||
pseudo_random_function_names, alg,
|
this->required ? "disabled" : "enabled ",
|
||||||
this->required ? ", disabled" : "");
|
pseudo_random_function_names, alg);
|
||||||
return !this->required;
|
return !this->required;
|
||||||
}
|
}
|
||||||
if (!failed)
|
if (!failed)
|
||||||
{
|
{
|
||||||
DBG1("successfully tested %d testvectors for %N",
|
DBG1("enabled %N: successfully passed %d test vectors",
|
||||||
tested, pseudo_random_function_names, alg);
|
pseudo_random_function_names, alg, tested);
|
||||||
}
|
}
|
||||||
return !failed;
|
return !failed;
|
||||||
}
|
}
|
||||||
@@ -473,7 +465,8 @@ static bool test_rng(private_crypto_tester_t *this, rng_quality_t quality,
|
|||||||
|
|
||||||
if (!this->rng_true && quality == RNG_TRUE)
|
if (!this->rng_true && quality == RNG_TRUE)
|
||||||
{
|
{
|
||||||
DBG1("skipping %N test, disabled by config", rng_quality_names, quality);
|
DBG1("enabled %N: skipping test (disabled by config)",
|
||||||
|
rng_quality_names, quality);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,7 +485,7 @@ static bool test_rng(private_crypto_tester_t *this, rng_quality_t quality,
|
|||||||
rng = create(quality);
|
rng = create(quality);
|
||||||
if (!rng)
|
if (!rng)
|
||||||
{
|
{
|
||||||
DBG1("creating instance failed, %N disabled",
|
DBG1("disabled %N: creating instance failed",
|
||||||
rng_quality_names, quality);
|
rng_quality_names, quality);
|
||||||
failed = TRUE;
|
failed = TRUE;
|
||||||
break;
|
break;
|
||||||
@@ -522,23 +515,23 @@ static bool test_rng(private_crypto_tester_t *this, rng_quality_t quality,
|
|||||||
rng->destroy(rng);
|
rng->destroy(rng);
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
DBG1("test vector %d failed, %N disabled",
|
DBG1("disabled %N: test vector %d failed",
|
||||||
tested, rng_quality_names, quality);
|
rng_quality_names, quality, tested);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DBG2("%N test vector %d successful", rng_quality_names, quality, tested);
|
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
if (!tested)
|
if (!tested)
|
||||||
{
|
{
|
||||||
DBG1("no test vectors found for %N%s",
|
DBG1("%s %N: no test vectors found",
|
||||||
rng_quality_names, quality, this->required ? ", disabled" : "");
|
this->required ? ", disabled" : "enabled ",
|
||||||
|
rng_quality_names, quality);
|
||||||
return !this->required;
|
return !this->required;
|
||||||
}
|
}
|
||||||
if (!failed)
|
if (!failed)
|
||||||
{
|
{
|
||||||
DBG1("successfully tested %d testvectors for %N",
|
DBG1("enabled %N: successfully passed %d test vectors",
|
||||||
tested, rng_quality_names, quality);
|
rng_quality_names, quality, tested);
|
||||||
}
|
}
|
||||||
return !failed;
|
return !failed;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user