[Home]

Summary:ASTERISK-11276: [patch] build error on main/tcptls.c when no ssl support is used
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2008-01-22 04:45:27.000-0600Date Closed:2008-01-23 11:33:15.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-tcptls.diff.txt
( 1) tcptls_no_dossl.diff
Description:When building trunk I get the following build error:

make[1]: Entering directory `/usr/src/asterisk-svn/main'
  [CC] tcptls.c -> tcptls.o
tcptls.c: In function ‘ast_make_file_from_fd’:
tcptls.c:359: error: ‘SSL_connect’ undeclared (first use in this function)
tcptls.c:359: error: (Each undeclared identifier is reported only once
tcptls.c:359: error: for each function it appears in.)
tcptls.c:359: error: ‘SSL_accept’ undeclared (first use in this function)
tcptls.c:361: warning: unused variable ‘err’
tcptls.c:360: warning: unused variable ‘ret’
tcptls.c:359: warning: unused variable ‘ssl_setup’
make[1]: *** [tcptls.o] Error 1
make[1]: Leaving directory `/usr/src/asterisk-svn/main'
make: *** [main] Error 2

$ svn info
Path: .
URL: http://svn.digium.com/svn/asterisk/trunk
Repository Root: http://svn.digium.com/svn/asterisk
Repository UUID: 614ede4d-c843-0410-af14-a771ab80d22e
Revision: 99483
Node Kind: directory
Schedule: normal
Last Changed Author: oej
Last Changed Rev: 99483
Last Changed Date: 2008-01-22 11:57:16 +0200 (Tue, 22 Jan 2008)

$ grep SSL include/asterisk/autoconfig.h
/* Define this to indicate the ${OPENSSL_DESCRIP} library */
/* #undef HAVE_OPENSSL */
/* Define to indicate the ${OPENSSL_DESCRIP} library version */
/* #undef HAVE_OPENSSL_VERSION */


There are two extra functions that have no "return" line in case DO_SSL is not defined. The patch adds a return line with a silly value, which is why it won't build as-is. This is because I was not sure what is a sane value to return in case those functions are no-ops.
Comments:By: James Golovich (jamesgolovich) 2008-01-23 00:34:07.000-0600

This patch should take care of the issue of the lack of a return without DO_SSL

By: Digium Subversion (svnbot) 2008-01-23 11:33:15.000-0600

Repository: asterisk
Revision: 99922

U   trunk/main/tcptls.c

------------------------------------------------------------------------
r99922 | russell | 2008-01-23 11:33:14 -0600 (Wed, 23 Jan 2008) | 7 lines

Fix tcptls build when openssl isn't installed

(closes issue ASTERISK-11276)
Reported by: tzafrir
Patches:
     asterisk-tcptls.diff.txt uploaded by jamesgolovich (license 176)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=99922