Bug 250384 - ftp/curl 7.73.0 build failure without TLS_SRP
Summary: ftp/curl 7.73.0 build failure without TLS_SRP
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-16 01:33 UTC by dewayne
Modified: 2020-10-18 15:38 UTC (History)
7 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Fix building with OpenSSL (and TLS_SRP disabled) (2.45 KB, patch)
2020-10-16 08:33 UTC, Ralf van der Enden
tremere: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2020-10-16 01:33:47 UTC
When TLS_SRP is deselected, the following errors occur:

--- vtls/libcurl_la-openssl.lo ---
vtls/openssl.c:2475:57: error: no member named 'authtype' in 'struct ssl_config_data'
  const enum CURL_TLSAUTH ssl_authtype = SSL_SET_OPTION(authtype);
                                         ~~~~~~~~~~~~~~~^~~~~~~~~
vtls/vtls.h:133:41: note: expanded from macro 'SSL_SET_OPTION'
  (SSL_IS_PROXY() ? data->set.proxy_ssl.var : data->set.ssl.var)

Similarly for username and password.

This is due to the the new ifdef in work/curl-7.73.0/lib/urldata.h
#ifdef USE_TLS_SRP
  char *username; /* TLS username (for, e.g., SRP) */
  char *password; /* TLS password (for, e.g., SRP) */
  enum CURL_TLSAUTH authtype; /* TLS authentication type (default SRP) */
#endif

This is a new feature (wasn't a problem with 7.72) ;)

Commenting out the ifdef/endif enables 7.73 to build and function correctly.  

uname extract
FreeBSD 12.2-STABLE #0 r366190M: Mon Sep 28 03:58:09 AEST 2020  i386 1202502 1202502
Comment 1 Ralf van der Enden 2020-10-16 06:57:48 UTC
(In reply to dewayne from comment #0)
Upstream has a patch to fix this. I'm testing it right now and if curl builds (and runs) without any issues I'll supply a patch.
Comment 2 Ralf van der Enden 2020-10-16 08:33:47 UTC
Created attachment 218791 [details]
Fix building with OpenSSL (and TLS_SRP disabled)

Pulled in from upstream (PR 6094)

Builds and runs fine here now.
Comment 3 Michael Osipov 2020-10-16 21:47:39 UTC
Patch works for me:
# curl --version
curl 7.73.0 (amd64-portbld-freebsd12.2) libcurl/7.73.0 OpenSSL/1.1.1g zlib/1.2.11 zstd/1.4.5 nghttp2/1.41.0
Release-Date: 2020-10-14
Protocols: file http https mqtt smtp smtps
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz SPNEGO SSL UnixSockets zstd
root@bsd1srv:/usr/ports/ftp/curl
# uname -a
FreeBSD bsd1srv.fritz.box 12.2-STABLE FreeBSD 12.2-STABLE r365640 GENERIC  amd64
Comment 4 dewayne 2020-10-16 23:05:55 UTC
Concur.  Thank-you.
Comment 5 Ralf van der Enden 2020-10-16 23:09:51 UTC
(In reply to dewayne from comment #4)

The PR now has the status FIXED and CLOSED, but usually a port committer sets this once the patch has been comitted to the ports tree.
Comment 6 Danilo G. Baio freebsd_committer freebsd_triage 2020-10-17 00:58:34 UTC
still pending...
Comment 7 Dave Cottlehuber freebsd_committer freebsd_triage 2020-10-18 13:40:29 UTC
LGTM - poudriere OK on 12.2-RC3 amd64 & 13.0-CURRENT amd64
Comment 8 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-10-18 15:38:28 UTC
Committed. Thanks!
Comment 9 commit-hook freebsd_committer freebsd_triage 2020-10-18 15:38:29 UTC
A commit references this bug:

Author: sunpoet
Date: Sun Oct 18 15:37:30 UTC 2020
New revision: 552670
URL: https://svnweb.freebsd.org/changeset/ports/552670

Log:
  Fix build when TLS_SRP is disabled

  PR:		250384
  Reported by:	Dewayne Geraghty <dewayne@heuristicsystems.com.au>
  Obtained from:	https://github.com/curl/curl/commit/a3d5b199f96a108f38bd1f6adaf3a7585f721d02

Changes:
  head/ftp/curl/files/patch-lib-vtls-openssl.c