• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Not able to accept the certificate sent by FTPS server in a FTPS client

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am trying to connect to FTPS server as follows:



The below is the message I received when I ran the code:

220 Service ready for new user.
AUTH TLS
234 Command AUTH okay; starting TLS connection.
Connection closed without indication.

I think I am not able to connect to the FTPS server because I am not able to accept the server certificate sent by the server during the handshake.
Is it possible to develop a client for a FTPS server that accepts all the certificates ?

Thanks in advance.

 
Sheriff
Posts: 7113
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this is too hard for Beginning Java. Moving.
 
Sheriff
Posts: 3914
542
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not used FTPSClient before, but I have had a similar problem with HttpClient where I need to connect to servers with a self-signed certificates. I was able to replace the default TLS TrustManger with my own, which did not complain about any certificate. Maybe you could try something similar using the setTrustManager() method.

Here are some code fragments which shows what I did:
 
Saurabh Agrahari
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ron,

Thanks for the reply !!

I already tried this but with non X509 format certificates it doesn't work.In my case certificate sent by the FTPS server is p7b format.

So my question is can we write a custom TrustManager to accept non X509 certificate sent by the FTPS server?

Thanks
Saurabh
 
Good night. Drive safely. Here's a tiny ad for the road:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic