From e4c299b0f274fdfbc62f47ec01ca346da4182e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Czern=C3=BD?= Date: Mon, 4 Dec 2023 11:21:37 +0100 Subject: [PATCH] M #-: Fix monitoring encryption (#2855) --- src/im_mad/remotes/lib/monitord_client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/im_mad/remotes/lib/monitord_client.rb b/src/im_mad/remotes/lib/monitord_client.rb index 0483de8076..ea12b1595c 100644 --- a/src/im_mad/remotes/lib/monitord_client.rb +++ b/src/im_mad/remotes/lib/monitord_client.rb @@ -57,7 +57,7 @@ class MonitorClient # :pubkey [:String] public key to encrypt messages def initialize(server, port, id, opt = {}) @opts = { - :pubkey => '' + :pubkey => nil }.merge opt addr = Socket.getaddrinfo(server, port)[0] @@ -77,7 +77,7 @@ class MonitorClient # Formats message payload to send over the wire def pack(data) - if @pubkey && !@pubkey.empty? + if @pubkey block_size = @pubkey.n.num_bytes - 11 edata = ''