- /* Convert the encrypted random data to a hexadecimal formatted string */
-
- bin2hex(buffer, buffer, len);
- buffer[len * 2] = '\0';
-
- /* Send the meta key */
-
- x = send_request(c, "%d %d %d %d %d %s", METAKEY,
- c->outcipher ? c->outcipher->nid : 0,
- c->outdigest ? c->outdigest->type : 0, c->outmaclength,
- c->outcompression, buffer);
-
- /* Further outgoing requests are encrypted with the key we just generated */
-
- if(c->outcipher) {
- if(!EVP_EncryptInit(c->outctx, c->outcipher,
- (unsigned char *)c->outkey + len - c->outcipher->key_len,
- (unsigned char *)c->outkey + len - c->outcipher->key_len -
- c->outcipher->iv_len)) {
- logger(LOG_ERR, "Error during initialisation of cipher for %s (%s): %s",
- c->name, c->hostname, ERR_error_string(ERR_get_error(), NULL));
+bool send_id(meshlink_handle_t *mesh, connection_t *c) {
+ if(mesh->proxytype && c->outgoing)
+ if(!send_proxyrequest(mesh, c)) {