summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ecp/src/ecp/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ecp/src/ecp/core.c b/ecp/src/ecp/core.c
index 2088e32..be70614 100644
--- a/ecp/src/ecp/core.c
+++ b/ecp/src/ecp/core.c
@@ -306,7 +306,7 @@ static ECPConnection *conn_table_search_pub(ECPSocket *sock, unsigned char c_idx
if (ecp_conn_is_outb(conn)) {
if (c_idx >= ECP_MAX_CONN_KEY) continue;
- if (conn->key[c_idx].valid && ecp_ecdh_pub_eq(c_public, &conn->key[c_idx].public)) {
+ if (conn->key[c_idx].valid && (memcmp(c_public, &conn->key[c_idx].public, sizeof(conn->key[c_idx].public)) == 0)) {
return conn;
}
} else {
@@ -315,7 +315,7 @@ static ECPConnection *conn_table_search_pub(ECPSocket *sock, unsigned char c_idx
if (c_idx & ~ECP_ECDH_IDX_MASK) continue;
_c_idx = c_idx % ECP_MAX_NODE_KEY;
- if (conn->rkey[_c_idx].valid && ecp_ecdh_pub_eq(c_public, &conn->rkey[_c_idx].public)) {
+ if (conn->rkey[_c_idx].valid && (memcmp(c_public, &conn->rkey[_c_idx].public, sizeof(conn->key[c_idx].public) == 0)) {
return conn;
}
}