Hide crypto_digest_t again and use an accessor for tests.

This commit is contained in:
George Kadianakis
2017-07-06 16:39:48 +03:00
committed by Nick Mathewson
parent 70d08f764d
commit f35f52e869
4 changed files with 40 additions and 21 deletions
+8 -4
View File
@@ -188,8 +188,10 @@ test_e2e_rend_circuit_setup_legacy(void *arg)
tt_int_op(retval, OP_EQ, 1);
/* Check the digest algo */
tt_int_op(or_circ->cpath->f_digest->algorithm, OP_EQ, DIGEST_SHA1);
tt_int_op(or_circ->cpath->b_digest->algorithm, OP_EQ, DIGEST_SHA1);
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->f_digest),
OP_EQ, DIGEST_SHA1);
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->b_digest),
OP_EQ, DIGEST_SHA1);
tt_assert(or_circ->cpath->f_crypto);
tt_assert(or_circ->cpath->b_crypto);
@@ -255,8 +257,10 @@ test_e2e_rend_circuit_setup(void *arg)
tt_int_op(retval, OP_EQ, 1);
/* Check that the crypt path has prop224 algorithm parameters */
tt_int_op(or_circ->cpath->f_digest->algorithm, OP_EQ, DIGEST_SHA3_256);
tt_int_op(or_circ->cpath->b_digest->algorithm, OP_EQ, DIGEST_SHA3_256);
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->f_digest),
OP_EQ, DIGEST_SHA3_256);
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->b_digest),
OP_EQ, DIGEST_SHA3_256);
tt_assert(or_circ->cpath->f_crypto);
tt_assert(or_circ->cpath->b_crypto);
+4 -2
View File
@@ -301,8 +301,10 @@ test_e2e_rend_circuit_setup(void *arg)
tt_int_op(retval, OP_EQ, 1);
/* Check the digest algo */
tt_int_op(or_circ->cpath->f_digest->algorithm, OP_EQ, DIGEST_SHA3_256);
tt_int_op(or_circ->cpath->b_digest->algorithm, OP_EQ, DIGEST_SHA3_256);
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->f_digest),
OP_EQ, DIGEST_SHA3_256);
tt_int_op(crypto_digest_get_algorithm(or_circ->cpath->b_digest),
OP_EQ, DIGEST_SHA3_256);
tt_assert(or_circ->cpath->f_crypto);
tt_assert(or_circ->cpath->b_crypto);