metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
210 stars 153 forks source link

Keep Getting Packet Size To Big's #312

Closed swartjie closed 2 years ago

swartjie commented 3 years ago

Hey Guys,

I have been using the module for quite a while with great success... But I keep running into 1 problerm.

The ZACR OT&e server keeps rejecting my sessions... With the normal servers if we use ssl://hostname then it works. but with the OT&e server, if I use ssl://regphase3.dnservices.co.za it just plainly refuses to work. It gives me a connection error.

If I do remove the ssl:// then it opens the stream but I get a packet size to big error, even though I am using the certificate the registry provided for the connection...

My code below:

$this->conn = new Metaregistrar\EPP\cozaEppConnection(TRUE); $this->conn->setHostname($this->host); // Hostname may vary depending on the registry selected $this->conn->setPort($this->port); // Port may vary depending on the registry selected $this->conn->setUsername($this->username); $this->conn->setPassword($this->password); $this->conn->setVerifyPeerName(false); $this->conn->setVerifyPeer(false); $this->conn->enableCertification($this->certificate['path'], $this->certificate['password'], true); $this->conn->login();

The stream does open but then when the login command is sent I get "Packet size is too big: 352518396. Closing connection"

Any idea why i would be hitting this wall constantly?

swartjie commented 3 years ago

I have just received feedback that the ssl needs to be fully disabled. But even removing the 2nd last line, Still does not return anything other than the packet size error? I'm a bit hopeless... Unless I'm not disabling ssl correctly?

swartjie commented 3 years ago

Just to clarify, I also miss-spoke. It's not the OT&e server that's the issue, it's the regphase3.dnservices.co.za server. The one that you need to verify with when you start the technical accreditation process...

swartjie commented 3 years ago

Hey guys, Ok so i've chatted with the registry. And SSL is definitely disabled for the regphase3. server. And they've checked, even though I add $this->conn->disableCertification(); to the metaregistrar instance it still tries to use ssl? Why would that be happening?

swartjie commented 3 years ago

Registry debug log:

03 Jun 2021 12:07:49,619 SID: ID: RAR: DEBUG Connection accepted from da2.thathost.co.za/129.232.157.100 on port 53762 03 Jun 2021 12:07:49,621 SID:32B7D ID: RAR: DEBUG Sending Greeting to 'EPP-#55--32B7D-da2.thathost.co.za/129.232.157.100:3121' 03 Jun 2021 12:07:49,622 SID:32B7D ID: RAR: WARN SSLException occurred while listening to 'da2.thathost.co.za/129.232.157.100': Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

metaregistrar commented 3 years ago

If the registry does not use SSL for its OTE servers, you only have to set Hostname, Port, Username and Password. That should be enough to make connection.

The message "packet size too big" is mostly due to using SSL when the server does not, or using no SSL when the server needs it.

But in this case I would remove the $conn->EnableCertification line, because this will enable an SSL connection.

swartjie commented 3 years ago

I

If the registry does not use SSL for its OTE servers, you only have to set Hostname, Port, Username and Password. That should be enough to make connection.

The message "packet size too big" is mostly due to using SSL when the server does not, or using no SSL when the server needs it.

But in this case I would remove the $conn->EnableCertification line, because this will enable an SSL connection.

I have removed that line. but I am still getting the packet size errors though? How can we go about getting past this? The above shows there's still some form of ssl passed?

swartjie commented 3 years ago

According to the logs the connection is made. But when reading/writing the login, I am getting these errors...

metaregistrar commented 3 years ago

Can you enable logging and paste (a part) of the log from the php-epp-client?

swartjie commented 3 years ago

Do you mean the logging in the metaregistrar class? Cause that only shows the connected to server, the attempt to write, and teh disconnect. Or is there an advanced debugging I can enable to show more?

metaregistrar commented 3 years ago

If you have the latest version, it shows with which settings, protocol and encryption it connects to the server - all valuable information.

swartjie commented 3 years ago

This is all I can see, I hope it helps?

-----Connection made-----2021-06-03 16:59:45----- Stream opened to regphase3.dnservices.co.za port 3121 -----END-----2021-06-03 16:59:45-----

-----WRITE-----2021-06-03 16:59:55----- <?xml version="1.0" encoding="UTF-8"?>

XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 1.0 en urn:ietf:params:xml:ns:domain-1.0 urn:ietf:params:xml:ns:contact-1.0 urn:ietf:params:xml:ns:host-1.0 60b8ee6b09693

-----END-----2021-06-03 16:59:55-----

-----DISCONNECT-----2021-06-03 16:59:55----- Disconnected -----END-----2021-06-03 16:59:55-----