Skip to content

Cannot use Openssl 1.1.1f with netty-tcnative, we get UnsatisfiedLinkError: .. libssl.so.1.0.0 #551

Open
@keshava88

Description

@keshava88

We have an application that uses netty to build a SSL context with Openssl as the SSL provider.
We are planning to upgrade from Openssl 1.1.0 to Openssl 1.1.1 to get the TLS 1.3 support.

So we tried setting up a server SSL context using OpenSSL 1.1.1 in a ubuntu 20.04 linux release and we are getting the below errors

Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libnetty_tcnative6745395350932048529.so: libssl.so.1.0.0: cannot open shared object file: No such file or directory

The full stacktrace is here https://github.com/keshava88/netty-tcnative-with-openssl1.1.1f/blob/master/tls1.3/src/test/resources/stacktrace
also attached here
stacktrace.txt

The TLS server code is here (it is based on netty's secure chat example) https://github.com/keshava88/netty-tcnative-with-openssl1.1.1f/blob/master/tls1.3/src/main/java/tls/securechat/SecureChatServer.java
also attached here SecureChatServer.java.txt

The installed libraries in the ubuntu machine are below

$ openssl version
OpenSSL 1.1.1f  31 Mar 2020
$ sudo apt list --installed  | grep -i libssl

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libssl-dev/focal,now 1.1.1f-1ubuntu2 amd64 [installed]
libssl1.1/focal,now 1.1.1f-1ubuntu2 amd64 [installed]
$ sudo apt list --installed  | grep -i apr

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libapr1-dev/focal,now 1.6.5-1ubuntu1 amd64 [installed]
libapr1/focal,now 1.6.5-1ubuntu1 amd64 [installed]
libaprutil1/focal,now 1.6.1-4ubuntu2 amd64 [installed]

Following are the netty dependencies i am using

<dependency>
	<groupId>io.netty</groupId>
	<artifactId>netty-tcnative</artifactId>
	<classifier>linux-x86_64</classifier>
	<version>2.0.30.Final</version>
</dependency>
<dependency>
	<groupId>io.netty</groupId>
	<artifactId>netty-handler</artifactId>
	<version>4.1.50.Final</version>
</dependency>
<dependency>
	<groupId>io.netty</groupId>
	<artifactId>netty-transport</artifactId>
	<version>4.1.50.Final</version>
</dependency>

What is that I am missing here? why is tcnative looking for libssl.so.1.0.0 , it should look for libssl1.1.so , right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions