getpinga / whmcs-epp-rfc

EPP Registrar Module for WHMCS (Generic RFC EPP)
MIT License
12 stars 4 forks source link

Cannot connect to server "epp.server.tld" #1

Closed cenourinha closed 1 year ago

cenourinha commented 1 year ago

Hi there! First of all, thank you for creating this module.

I'm trying to use it to connect to "registry.nic.mz" (port 700) but i'm getting this error:

image

I already have added the exceptions for the connection in the Firewall and it's connecting correctly:

# nc -zv registry.nic.mz 700
Ncat: Version 7.70 ( https://nmap.org/ncat )
Ncat: Connected to 196.3.103.50:700.
Ncat: 0 bytes sent, 0 bytes received in 0.21 seconds.

In the Registrar module configuration, i've set the fields "EPP Server", "Server Port", "Client ID" and "Password" with the correct information. The other fields are empty.

cenourinha commented 1 year ago

Ok, i fixed by changing:

$this->socket = stream_socket_client("tlsv1.3://{$host}:{$port}", $errno, $errmsg, $timeout, STREAM_CLIENT_CONNECT, $context);

to

$this->socket = stream_socket_client("tlsv1.2://{$host}:{$port}", $errno, $errmsg, $timeout, STREAM_CLIENT_CONNECT, $context);

getpinga commented 1 year ago

Thanks for noticing that, I'll add in the next version the ability to select the TLS version in settings. I was testing it only with EPP servers that have mandatory TLS 1.3

getpinga commented 1 year ago

I've applied the fix.