Don't print out errors in cases where errors are expected: testing
DSA parameter validity and EC public key validity.
This commit is contained in:
parent
d57cc97f24
commit
456d883a25
@ -314,6 +314,7 @@ static void pqgver(FILE *in, FILE *out)
|
|||||||
dsa->p = BN_dup(p);
|
dsa->p = BN_dup(p);
|
||||||
dsa->q = BN_dup(q);
|
dsa->q = BN_dup(q);
|
||||||
}
|
}
|
||||||
|
no_err = 1;
|
||||||
if (!dsa2 && !dsa_builtin_paramgen(dsa, L, N, md,
|
if (!dsa2 && !dsa_builtin_paramgen(dsa, L, N, md,
|
||||||
seed, seedlen, NULL,
|
seed, seedlen, NULL,
|
||||||
&counter2, &h2, NULL))
|
&counter2, &h2, NULL))
|
||||||
@ -328,6 +329,7 @@ static void pqgver(FILE *in, FILE *out)
|
|||||||
fprintf(stderr, "Parameter Generation error\n");
|
fprintf(stderr, "Parameter Generation error\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
no_err = 0;
|
||||||
if (idx >= 0)
|
if (idx >= 0)
|
||||||
{
|
{
|
||||||
if (BN_cmp(dsa->g, g))
|
if (BN_cmp(dsa->g, g))
|
||||||
|
@ -284,7 +284,9 @@ static int PKV(FILE *in, FILE *out)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
key = EC_KEY_new_by_curve_name(curve_nid);
|
key = EC_KEY_new_by_curve_name(curve_nid);
|
||||||
|
no_err = 1;
|
||||||
rv = EC_KEY_set_public_key_affine_coordinates(key, Qx, Qy);
|
rv = EC_KEY_set_public_key_affine_coordinates(key, Qx, Qy);
|
||||||
|
no_err = 0;
|
||||||
fprintf(out, "Result = %s\n", rv ? "P":"F");
|
fprintf(out, "Result = %s\n", rv ? "P":"F");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user