Bug 257912

Summary: Please mark net-im/tg_owt broken with DEFAULT_VERSIONS+= ssl=libressl*
Product: Ports & Packages Reporter: Filipe da Silva Santos <contact>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Overcome By Events    
Severity: Affects Many People CC: henry.hu.sh, lwhsu
Priority: --- Flags: bugzilla: maintainer-feedback? (henry.hu.sh)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Adds libressl headers and ifdefs none

Description Filipe da Silva Santos 2021-08-17 12:54:44 UTC
During build phase:

```
In file included from /wrkdirs/usr/ports/net-im/tg_owt/work/tg_owt-91d836d/src/rtc_base/openssl_stream_adapter.cc:20:
/usr/local/include/openssl/dtls1.h:112:2: error: unknown type name 'SSL_SESSION'
        SSL_SESSION *session;
        ^
/usr/local/include/openssl/dtls1.h:175:2: error: unknown type name 'SSL3_BUFFER'
        SSL3_BUFFER    rbuf;
        ^
/usr/local/include/openssl/dtls1.h:176:2: error: unknown type name 'SSL3_RECORD'
        SSL3_RECORD    rrec;
        ^
3 errors generated.
```
Comment 1 Filipe da Silva Santos 2021-08-17 14:19:10 UTC
Created attachment 227283 [details]
Adds libressl headers and ifdefs

Solves the build.
Tested on amd64 14-CURRENT main-20d728b55 Poudriere jail.

Patch source:
https://github.com/vishwin/tg_owt/commit/3f2d8238846d4795f1292c05923b9f212dc4d022
Comment 2 Henry Hu 2021-08-18 01:58:22 UTC
So if I understand your patch correctly, you removes support for DTLS 1.2, if LIBRESSL is used.
Per https://en.wikipedia.org/wiki/Datagram_Transport_Layer_Security, it seems to be supported since version 3.3.2 (https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.3.2-relnotes.txt)
The ports version seems to be 3.3.3: https://www.freshports.org/security/libressl
What's your LIBRESSL_VERSION_NUMBER? Does the port build with newer libressl?
Comment 3 Filipe da Silva Santos 2021-08-18 03:59:46 UTC
Yes, it builds. I'm on security/libressl-devel 3.3.3

Although I've written a different patch with DTLS 1.2 in mind (thank you for the review), I couldn't get it to work with Telegram Desktop, since Open and LibreSSL are now API incompatible.

I'll close the bug, since the main target of the port won't work in any way.