Bug 223388 - security/openssl: Fails to build without SSL3: implicit declaration of function 'SSLv3_client_method' in s23_clnt.c
Summary: security/openssl: Fails to build without SSL3: implicit declaration of functi...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-02 23:02 UTC by Laurence 'GreenReaper' Parry
Modified: 2017-12-07 19:59 UTC (History)
2 users (show)

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


Attachments
patch (603 bytes, patch)
2017-11-03 10:09 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laurence 'GreenReaper' Parry 2017-11-02 23:02:35 UTC
I'm trying to compile openssl-1.0.2m from ports on 10.3-RELEASE-p20.

The following options are enabled:
DOCS EC SHARED THREADS ASM SSE2 SCTP

The following options are disabled:
MAN3 PADLOCK RFC3779 EXPCIPHERS ZLIB RC5 MD2 SSL2 SSL3

Things go fine, until s23_clnt.c
----
cc -I../crypto -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -O3 -Wall -O2 -pipe -O2 -march=native  -Werror -Qunused-arguments -fstack-protector -fno-strict-aliasing -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -c s23_clnt.c -o s23_clnt.o
s23_clnt.c:762:29: error: implicit declaration of function 'SSLv3_client_method' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                s->method = SSLv3_client_method();
                            ^
s23_clnt.c:762:27: error: incompatible integer to pointer conversion assigning to 'const SSL_METHOD *' (aka 'const struct ssl_method_st *') from 'int'
      [-Werror,-Wint-conversion]
                s->method = SSLv3_client_method();
                          ^ ~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
*** Error code 1
----

SSL3 disabling seems to be broken. Enabling SSE3 causes the build to work.
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2017-11-03 10:09:03 UTC
Created attachment 187687 [details]
patch

Patch you can put in /usr/ports/security/openssl/files/.
Comment 2 Laurence 'GreenReaper' Parry 2017-11-03 15:01:37 UTC
(In reply to Tijl Coosemans from comment #1)

Thanksl I've given this a go and it builds and installs without the SSL3 option.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-11-03 15:51:40 UTC
A commit references this bug:

Author: brnrd
Date: Fri Nov  3 15:51:11 UTC 2017
New revision: 453409
URL: https://svnweb.freebsd.org/changeset/ports/453409

Log:
  security/openssl: Unbreak build with No-SSLv3

   - Importing patch from upstream

  PR:		223388
  Submitted by:	tijl
  Reported by:	Laurence Parry <greenreaper@hotmail.com>

Changes:
  head/security/openssl/files/patch-ssl_s23__clnt.c
Comment 4 Bernard Spil freebsd_committer freebsd_triage 2017-11-03 15:52:22 UTC
Thanks for reporting and patching. Upstream figured it out as well so I included their patch.
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-12-07 19:59:56 UTC
A commit references this bug:

Author: brnrd
Date: Thu Dec  7 19:59:11 UTC 2017
New revision: 455752
URL: https://svnweb.freebsd.org/changeset/ports/455752

Log:
  MFH: r453409 r455706

  security/openssl: Unbreak build with No-SSLv3

   - Importing patch from upstream

  PR:		223388
  Submitted by:	tijl
  Reported by:	Laurence Parry <greenreaper@hotmail.com>

  security/openssl: Update to 1.0.2n

   - Remove patch now included upstream
   - Include post-release patch for clang build error

  Security:	3bb451fc-db64-11e7-ac58-b499baebfeaf

  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2017Q4/
  branches/2017Q4/security/openssl/Makefile
  branches/2017Q4/security/openssl/distinfo
  branches/2017Q4/security/openssl/files/patch-ssl_fatalerrtest.c