apache / opendal

Apache OpenDAL: One Layer, All Storage.
https://opendal.apache.org
Apache License 2.0
3.44k stars 481 forks source link

suppaftp enforce to use native-tls #3625

Closed Xuanwo closed 11 months ago

Xuanwo commented 12 months ago

We should make it work with rustls by default.

sd44 commented 11 months ago

I tried to finish the work, but failed.

I hope there is still something useful in my failed attempt, which can help other contributors.

bad pr : https://github.com/sd44/incubator-opendal/commit/3fc1673434c07036d7e68ffd6b21363c3162eb4c error log:

error[E0277]: the trait bound `AsyncRustlsConnector: From<TlsConnector>` is not satisfied
   --> core/src/services/ftp/backend.rs:244:21
    |
244 |                     AsyncRustlsConnector::from(TlsConnector::from(confi...
    |                     ^^^^^^^^^^^^^^^^^^^^ the trait `From<TlsConnector>` is not implemented for `AsyncRustlsConnector`
    |
    = help: the trait `From<async_tls::connector::TlsConnector>` is implemented for `AsyncRustlsConnector`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `opendal` (lib) due to previous error

And tls auth may have some specific and necessary configurations. How and where to construct these configurations may also be a problem.