|
@@ -12,6 +12,7 @@
|
|
|
#include "core/or/or.h"
|
|
#include "core/or/or.h"
|
|
|
|
|
|
|
|
#include "app/config/config.h"
|
|
#include "app/config/config.h"
|
|
|
|
|
+#include "core/crypto/relay_crypto.h"
|
|
|
#include "core/mainloop/connection.h"
|
|
#include "core/mainloop/connection.h"
|
|
|
#include "core/or/cell_st.h"
|
|
#include "core/or/cell_st.h"
|
|
|
#include "core/or/circuitlist.h"
|
|
#include "core/or/circuitlist.h"
|
|
@@ -286,15 +287,6 @@ send_circuit_level_sendme(circuit_t *circ, crypt_path_t *layer_hint,
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/* Put the crypto.b_digest in the sendme_digest. */
|
|
|
|
|
-static void
|
|
|
|
|
-note_cell_digest(const relay_crypto_t *crypto)
|
|
|
|
|
-{
|
|
|
|
|
- tor_assert(crypto);
|
|
|
|
|
- crypto_digest_get_digest(crypto->b_digest, (char *) crypto->sendme_digest,
|
|
|
|
|
- sizeof(crypto->sendme_digest));
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/*
|
|
/*
|
|
|
* Public API
|
|
* Public API
|
|
|
*/
|
|
*/
|
|
@@ -305,7 +297,7 @@ void
|
|
|
sendme_circuit_note_outbound_cell(or_circuit_t *or_circ)
|
|
sendme_circuit_note_outbound_cell(or_circuit_t *or_circ)
|
|
|
{
|
|
{
|
|
|
tor_assert(or_circ);
|
|
tor_assert(or_circ);
|
|
|
- note_cell_digest(&or_circ->crypto);
|
|
|
|
|
|
|
+ relay_crypto_record_sendme_digest(&or_circ->crypto);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** Keep the current inbound cell digest for the next SENDME digest. This part
|
|
/** Keep the current inbound cell digest for the next SENDME digest. This part
|
|
@@ -314,7 +306,7 @@ void
|
|
|
sendme_circuit_note_inbound_cell(crypt_path_t *cpath)
|
|
sendme_circuit_note_inbound_cell(crypt_path_t *cpath)
|
|
|
{
|
|
{
|
|
|
tor_assert(cpath);
|
|
tor_assert(cpath);
|
|
|
- note_cell_digest(&cpath->crypto);
|
|
|
|
|
|
|
+ relay_crypto_record_sendme_digest(&cpath->crypto);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** Return true iff the next cell for the given cell window is expected to be
|
|
/** Return true iff the next cell for the given cell window is expected to be
|