IdFtp and SSL : How to connect securely? - delphi

I'm on Delphi 10.3.3 and i'm trying to use TIdFTP to upload files to my own site. To avoid people stealing my username / password, i want to do it using SSL, as in the past i used without SSL and ended up having problems.
So i'm using TIdFTP and TIdSSLIOHandlerSocketOpenSSL, with the correct DLLs on the app folder.
Problem is, everytime i call TIdFTP.connect, i always get an error, except if i don't use SSL.
Here are the messages i get with different combinations of UseTLS property :
utNoTLSSupport - Works but exposes by traffic
utUseExplicitTLS - Socket Error # 10054 Connection reset by peer.
utUseImplicitTLS - Socket Error # 10061 Connection refused.
utUseRequireTLS - Socket Error # 10054 Connection reset by peer.
Please help !
Thanks

Related

Test connection failed because of an error in initializing provider . Prelogin failure Error

Trying to connect to an external datahub from a SSMS on a server. From desktop computer works.
Port 1433 allowed on server. Has anyone seen this or have a solution? Thank you.
Error:
Test connection failed because of an error in initializing provider. Client unable to establish connection due to prelogin failure
TCP Provider: The specified network name is no longer available.
Client unable to establish connection
Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server.

guacamole not able to connect neither VNC nor RDP

I setup a guacamole server on ubuntu 16.04 Tried to setup a connection to a vnc server on the same machine and always got errors. I tried with RealVNC Xvnc11 TIghtVNC, and even with RDP. no luck. The error messages on log files were:
Creation of WebSocket tunnel to guacd failed: Non-numeric character in element length.
Creation of WebSocket tunnel to guacd failed: java.net.ConnectException:
Connection refused (Connection refused)
An internal error has occurred within the Guacamole server
not a valid RFB client
webSocketsHandshake: invalid client header
Any idea what could be?
The problem was that I was saving the VNC connections settings on the GUACAMOLE PROXY PARAMETERS (GUACD). I set port 5901. Which is not the correct guacd port.
I left this empty and everything worked!
for RDP use RDP encryption select option
it worked for me.

Neo4j Enterprise 3.2 browser does not connect

I am trying to learn Neo4j by using the trial Enterprise version, however the browser is not able to connect. The service is running but when I try to log in via browser http://localhost:7474/browser/ the error is:
N/A: WebSocket connection failure. Due to security constraints in your
web browser, the reason for the failure is not available to this Neo4j
Driver. Please use your browsers development console to determine the
root cause of the failure. Common reasons include the database being
unavailable, using the wrong connection URL or temporary network
problems. If you have enabled encryption, ensure your browser is
configured to trust the certificate Neo4j is configured to use.
WebSocket readyState is: 3
In the console the error is:
WebSocket is already in CLOSING or CLOSED state.
I am using Chrome and the neo4j.conf is:
# Bolt connector
dbms.connector.bolt.enabled=true
#dbms.connector.bolt.tls_level=OPTIONAL
dbms.connector.bolt.listen_address=:7687
# HTTP Connector. There must be exactly one HTTP connector.
dbms.connector.http.enabled=true
#dbms.connector.http.listen_address=:7474
# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=true
#dbms.connector.https.listen_address=:7473
I understand from this issue the 3.2 version only allows bolt and I tried playing with the conf but so far no luck. Is there a way to get the local connection going with bolt?
Thank you in advance, Paola

SSL support for smtp.live.com and TIdSmtp (Indy, Delphi)

I am trying to connect to smtp.live.com to send emails (live.com supports free pop3/smtp since 2009 apparently but this is totally news for me).
Here is what happens when I try to connect to smtp.live.com port 587:
Method sslvSSLv2 - timeout (obviously the server does not support SSL2)
Method sslvSSLv3 - Error connecting with SSL. - error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
Method sslvSSLv23 - Error connecting with SSL. - error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Method sslvTLSv1 - Error connecting with SSL. - error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
I use the same code with sslvSSLv23 and sslvTLSv1 and it works normally with gmail smtp (smtp.gmail.com, port 465) server. Also, Outlook sends mails normally when SSL is checked and on port 587 so it may be something related to OpenSSL. Can anyone help me with this mystery? Did I missed to set something?
Like GMail, Live.com's port 587 requires the client to connect unencrypted and send a STARTTLS command before then initiating an SSL/TLS handshake. In Indy 10, you do that by setting the TIdSMTP.UseTLS property to utUseExplicitTLS before connecting. It sounds like you have the UseTLS property set to utUseImplicitTLS instead (which is what is needed for GMail port 465).

nusoap wsdl problem when moving to new server?

I am trying to move a file which calls a wsdl service with the nusoap class. On the new server i get the following error:
wsdl error: HTTP ERROR: Couldn't open socket connection to server http://ip...:xxxx/service.asmx?wsdl, Error (13): Permission denied
Is this an incorrect server setting? If so which setting would be the most common with this issue?
Could it be some kind of firewall? Should i ask my hosting company to enable something??
Any tips, suggestions??
fyi with $nusoapclient->debug_str i get
soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host xxx.xxx.xxx, port xxxx
soap_transport_http: calling fsockopen with host xxx.xxx.xxxx connection_timeout 0
soap_transport_http: Couldn't open socket connection to server
Ok for those running into the same issue, check if your php/apache config is permissive vs enforced. This might solve your problem

Resources