inejge/ldap3

Compilation error (rustls)

tumbl3w33d opened this issue · 3 comments

I'm running the master version because I'm still waiting for #70 to be included in a release:

ldap3 = { git = "https://github.com/inejge/ldap3.git", branch = "master", default-features = false, features = ["sync", "tls-rustls"] }

Your latest version does not compile for me:

   Compiling ldap3 v0.10.0 (https://github.com/inejge/ldap3.git?branch=master#8d0c36c6)
error[E0405]: cannot find trait `ServerCertVerifier` in crate `rustls`
  --> /usr/local/cargo/git/checkouts/ldap3-3b291c3a502bdb2a/8d0c36c/src/conn.rs:61:14
   |
61 | impl rustls::ServerCertVerifier for NoCertVerification {
   |              ^^^^^^^^^^^^^^^^^^ not found in `rustls`
   |
help: consider importing this trait
   |
1  | use rustls::client::ServerCertVerifier;
   |

error[E0412]: cannot find type `ServerCertVerified` in crate `rustls`
  --> /usr/local/cargo/git/checkouts/ldap3-3b291c3a502bdb2a/8d0c36c/src/conn.rs:68:39
   |
68 |     ) -> core::result::Result<rustls::ServerCertVerified, rustls::TLSError> {
   |                                       ^^^^^^^^^^^^^^^^^^ not found in `rustls`
   |
help: consider importing this struct
   |
1  | use rustls::client::ServerCertVerified;
   |

error[E0433]: failed to resolve: could not find `ServerCertVerified` in `rustls`
  --> /usr/local/cargo/git/checkouts/ldap3-3b291c3a502bdb2a/8d0c36c/src/conn.rs:69:20
   |
69 |         Ok(rustls::ServerCertVerified::assertion())
   |                    ^^^^^^^^^^^^^^^^^^ not found in `rustls`
   |
help: consider importing this struct
   |
1  | use rustls::client::ServerCertVerified;
   |

error[E0412]: cannot find type `InvalidDNSNameError` in crate `tokio_rustls::webpki`
   --> /usr/local/cargo/git/checkouts/ldap3-3b291c3a502bdb2a/8d0c36c/src/result.rs:119:39
    |
119 |         source: tokio_rustls::webpki::InvalidDNSNameError,
    |                                       ^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `InvalidDnsNameError`
    |
   ::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/webpki-0.22.0/src/name/dns_name.rs:92:1
    |
92  | pub struct InvalidDnsNameError;
    | ------------------------------- similarly named struct `InvalidDnsNameError` defined here

Some errors have detailed explanations: E0405, E0412, E0433.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `ldap3` due to 4 previous errors

When I pin my version to 0ce698117a7aab04b18e4b34fef295b9ea8de51f I can compile. Unfortunately, I cannot even pin to the last tag (v0.9.3) because that's before #70

Uh, yanked. I'll release 0.10.1 a bit later.

I have attempted to fix this in #78 .

Uploaded 0.10.1. Let's hope it's better than the .0 fiasco. Re #70, I suppose I'll publish 0.9.4 with the fix.