inejge / ldap3

A pure-Rust LDAP library using the Tokio stack
Apache License 2.0
220 stars 38 forks source link

openssl reference issue while building in docker #123

Closed ashwinsekaran closed 4 months ago

ashwinsekaran commented 5 months ago

Do really need to refer native features while 'non-native' features are used? because openssl is causing issue only while building in docker.

In Local build

cargo tree  -p client -i native-tls
native-tls v0.2.11
├── ldap3 v0.11.3
│   └── client v0.1.0 (our application)
└── tokio-native-tls v0.3.1
    └── ldap3 v0.11.3 (*)

In Docker build

openssl-sys v0.9.102
├── native-tls v0.2.11
   ├── ldap3 v0.11.3
   │   └── client v0.1.0 (our application)
   └── tokio-native-tls v0.3.1
       └── ldap3 v0.11.3 (*)
 └── openssl v0.10.64
    └── native-tls v0.2.11 (*)
inejge commented 5 months ago

I don't understand the context. What's this "client" package you're specifying in the cargo tree invocation? What's getting built for Docker?

If it helps, "native" in native-tls refers to using the platform-specific TLS library for each supported platform: Schannel for Windows, Secure Transport for macOS, and OpenSSL for Linux.

ashwinsekaran commented 5 months ago

client is our native rust app, which refers ldap3 in and building docker image for our app.

inejge commented 5 months ago

I'm not sure what your exact problem is. Does the Docker build fail? If so, what's the error? Anyway, openssl is never mentioned explicitly in ldap3's dependencies, but included transitively through native-tls. If you're using native-tls and building on Linux, then openssl's presence is non-negotiable.

inejge commented 4 months ago

Closing for lack of feedback and clarity.