fix remaining pointer-sign warnings in sc_set_peer_public_key callers
This commit is contained in:
1 parent
68f4ae12c8
commit
17e95cc2a3
3 files changed
+4
-4
No files matched your search
@@ -2046,7 +2046,7 @@ int init_connections(struct UTUN_INSTANCE* instance) {
|
||||
|
||||
DEBUG_INFO(DEBUG_CATEGORY_CRYPTO, "init_connections: setting peer public key for client %s", client->name);
|
||||
// Set peer public key (assuming hex format)
|
||||
if (sc_set_peer_public_key(&etcp_conn->crypto_ctx, client->peer_public_key_hex, 1) != SC_OK) {
|
||||
if (sc_set_peer_public_key(&etcp_conn->crypto_ctx, (const uint8_t*)client->peer_public_key_hex, 1) != SC_OK) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "init_connections: failed to set peer public key for client %s", client->name);
|
||||
} else {
|
||||
DEBUG_INFO(DEBUG_CATEGORY_CRYPTO, "init_connections: successfully set peer public key for client %s", client->name);
|
||||
|
||||
+1
-1
@@ -633,7 +633,7 @@ struct UTUN_INSTANCE *utun_instance_reload(struct UTUN_INSTANCE *instance, struc
|
||||
if (!conn) {
|
||||
conn = etcp_connection_create(instance, nc->name);
|
||||
if (conn) {
|
||||
sc_set_peer_public_key(&conn->crypto_ctx, nc->peer_public_key_hex, 1);
|
||||
sc_set_peer_public_key(&conn->crypto_ctx, (const uint8_t*)nc->peer_public_key_hex, 1);
|
||||
if (random_bytes((uint8_t*)&conn->session_id, sizeof(conn->session_id)) != 0) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "Failed to generate session_id for client %s", nc->name);
|
||||
conn->session_id = 0;
|
||||
|
||||
Reference in new issue
Block a user