Skip to content

Commit

Permalink
M #-: Fix monitoring encryption (#2855)
Browse files Browse the repository at this point in the history
  • Loading branch information
paczerny authored and xorel committed Sep 5, 2024
1 parent 92a6150 commit e4c299b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/im_mad/remotes/lib/monitord_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -77,7 +77,7 @@ def initialize(server, port, id, opt = {})

# 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 = ''
Expand Down

0 comments on commit e4c299b

Please sign in to comment.