mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Hide crypto_digest_t again and use an accessor for tests.
This commit is contained in:
committed by
Nick Mathewson
parent
70d08f764d
commit
f35f52e869
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user