Okay, solved this in the 'right' way.
The class seems to be working without any modifications.
I had slightly miss-configured the Directadmin.
SO I restored old line: $socket = @fsockopen( $this->remote_host, $this->remote_port, $sock_errno, $sock_errstr, 10 );
I copied certificate ROOT BUNDLE (5.58 KB) file from here: https://support.comodo.com/index.ph.../Article/View/979/108/domain-validation-sha-2 (since I have comodo certificate).
to /usr/local/directadmin/conf/carootcert.pem
and added : carootcert=/usr/local/directadmin/conf/carootcert.pem to directadmin.conf and restart.
The class seems to be working without any modifications.
I had slightly miss-configured the Directadmin.
SO I restored old line: $socket = @fsockopen( $this->remote_host, $this->remote_port, $sock_errno, $sock_errstr, 10 );
I copied certificate ROOT BUNDLE (5.58 KB) file from here: https://support.comodo.com/index.ph.../Article/View/979/108/domain-validation-sha-2 (since I have comodo certificate).
to /usr/local/directadmin/conf/carootcert.pem
and added : carootcert=/usr/local/directadmin/conf/carootcert.pem to directadmin.conf and restart.