Fatal error 'ProtocolVersion'

0 votes
asked Mar 14 by ageinfo (120 points)

Hello

I get this error on connect to pop3

I need to recover mails, is not the same as: http://forum.rebex.net/3358/tlsexception-fatal-error-protocolversion

       Dim m_pop3RemoteServerAddress = "pop3.example.org"
       Dim tlsParameters As TlsParameters = New TlsParameters
        tlsParameters.Version = TlsVersion.Any
        tlsParameters.AllowedSuites = TlsCipherSuite.All
        tlsParameters.CertificateVerifier = CertificateVerifier.AcceptAll
        tlsParameters.CommonName = m_pop3RemoteServerAddress

        client = New Pop3
        client.Settings.SslAllowedVersions = TlsVersion.Any
        client.Settings.SslAllowedSuites = TlsCipherSuite.All
        client.Settings.SslAcceptAllCertificates = True

        'client.Connect(m_pop3RemoteServerAddress, CInt(m_pop3Port), m_pop3SecurityMode)
        client.Connect(m_pop3RemoteServerAddress, CInt(m_pop3Port), tlsParameters, m_pop3SecurityMode)

The error: System.Exception: An error occurred: Fatal error 'ProtocolVersion' has been encountered on the local connection end.

Some help?
Thanks

commented Mar 14 by Lukas Pokorny (98,050 points)
Please create a communication log using Pop3 object's LogWriter property (as described at https://rebex.net/kb/logging/) and either post it here or mail it to support@rebex.net for analysis. Thanks!
commented 5 days ago by ageinfo (120 points)
Hello
I put complete log of Rebex:

2019-03-18 13:06:33.367 Opening log file.
2019-03-18 13:06:33.367 INFO FileLogWriter(1)[1] Info: Assembly: Rebex.Common 2018 R4 for .NET 4.0-4.7
2019-03-18 13:06:33.382 INFO FileLogWriter(1)[1] Info: Platform: Windows 6.2.9200 32-bit; CLR: 4.0.30319.42000
2019-03-18 13:06:33.382 DEBUG FileLogWriter(1)[1] Info: Culture: es; Windows-1252
2019-03-18 13:06:33.429 DEBUG Pop3(1)[1] Info: State changed from 'Disconnected' to 'Connecting'.
2019-03-18 13:06:33.429 INFO Pop3(1)[1] Info: Connecting to popserver:995 using Pop3.
2019-03-18 13:06:33.429 INFO Pop3(1)[1] Info: Assembly: Rebex.Pop3 2018 R4 for .NET 4.0-4.7 (Trial)
2019-03-18 13:06:33.429 INFO Pop3(1)[1] Info: Platform: Windows 6.2.9200 32-bit; CLR: 4.0.30319.42000
2019-03-18 13:06:33.429 DEBUG Pop3(1)[1] Info: Culture: es; Windows-1252
2019-03-18 13:06:33.429 INFO Pop3(1)[1] Info: Connecting to popserver.
2019-03-18 13:06:33.445 DEBUG Pop3(1)[1] Proxy: Resolving 'popserver'.
2019-03-18 13:06:33.461 DEBUG Pop3(1)[1] Proxy: Connecting to 10.123.6.103:995 (no proxy).
2019-03-18 13:06:33.507 DEBUG Pop3(1)[1] Info: Connection succeeded.
2019-03-18 13:06:33.507 DEBUG Pop3(1)[1] Info: Upgrading connection to TLS/SSL.
2019-03-18 13:06:33.523 INFO Pop3(1)[1] TLS: Warning: SSL 3.0 has been deprecated. According to RFC 7568, it must no longer be used.
2019-03-18 13:06:33.570 DEBUG Pop3(1)[1] TLS: Enabled cipher suites: 0x000FFFFFFFF4F666.
2019-03-18 13:06:33.648 DEBUG Pop3(1)[1] TLS: Applicable cipher suites: 0x000FFFFFFFF4F666.
2019-03-18 13:06:33.695 INFO Pop3(1)[1] TLS: State StateChange:Negotiating
2019-03-18 13:06:33.695 DEBUG Pop3(1)[1] TLS: HandshakeMessage:ClientHello was sent.
2019-03-18 13:06:33.695 DEBUG Pop3(1)[1] TLS: Invalid TLS packet received:
 0000 |2D-45-52-52-20-43-6F-6E 6E-65-63-74-69-6F-6E-20| -ERR Connection
 0010 |69-73-20-63-6C-6F-73-65 64-2E-20-31-33-0D-0A   | is closed. 13..
2019-03-18 13:06:33.742 DEBUG Pop3(1)[1] TLS: Error while processing TLS packet: Rebex.Net.TlsException: Fatal error 'ProtocolVersion' has been encountered on the local connection end.
   at jcry.recf()
   at jcry.recg()
2019-03-18 13:06:33.757 INFO Pop3(1)[1] TLS: Alert Alert:Alert was sent.
2019-03-18 13:06:33.757 INFO Pop3(1)[1] TLS: State StateChange:Closed
2019-03-18 13:06:33.757 DEBUG Pop3(1)[1] TLS: Closing TLS socket.
2019-03-18 13:06:33.757 DEBUG Pop3(1)[1] Info: State changed from 'Connecting' to 'Disconnected'.
2019-03-18 13:06:33.757 ERROR Pop3(1)[1] Info: Rebex.Net.TlsException: Fatal error 'ProtocolVersion' has been encountered on the local connection end. ---> Rebex.Net.TlsException: Fatal error 'ProtocolVersion' has been encountered on the local connection end. ---> Rebex.Net.TlsException: Fatal error 'ProtocolVersion' has been encountered on the local connection end.
   at jcry.recf()
   at jcry.recg()
   --- End of inner exception stack trace ---
   at jcry.recg()
   at jcry.recn()
   at Rebex.Net.TlsSocket.Negotiate()
   at lahu.ytil(TlsParameters jz)
   at Rebex.Net.Pop3.ynch(TlsParameters bm, Boolean bn)
   --- End of inner exception stack trace ---
   at Rebex.Net.Pop3.ynch(TlsParameters bm, Boolean bn)
   at Rebex.Net.Pop3.yncf(String bf, Int32 bg, TlsParameters bh, SslMode bi)

1 Answer

0 votes
answered 5 days ago by Lukas Pokorny (98,050 points)
edited 5 days ago by Lukas Pokorny

According to the log, the POP3 server sends the following unencrypted error message when the client connects to it and attempts to negotiate a TLS session: "ERR Connection is closed. 13" This triggered a protocol error because POP3 at port 995 is supposed to be sending TLS/SSL packets, not plaintext data.

This is a server-side issue - the POP3 server is simply not willing to negotiate a TLS/SSL session and rejects POP3 clients immediately. The server log should contain more information about this. The issue seems to be similar to this one, which was caused by Microsoft Exchange server with improperly configured certificates.

...