1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-29 18:50:08 +03:00

M #-: Fix monitoring encryption (#2855)

(cherry picked from commit ce062faf759941eb5e8486a310ed82872a2fb75f)
This commit is contained in:
Pavel Czerný 2023-12-04 11:21:37 +01:00 committed by Ruben S. Montero
parent 2fb9b889da
commit 26ee7c50e5
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -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 = ''