• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Fully Supported] SSL support in webserver?
#11
Code:
libpilight.a(mongoose.c.o): In function `ns_destroy_conn':
/home/pi/pilight/libs/pilight/core/mongoose.c:532: undefined reference to `SSL_free'
/home/pi/pilight/libs/pilight/core/mongoose.c:535: undefined reference to `SSL_CTX_free'
libpilight.a(mongoose.c.o): In function `ns_use_ca_cert':
/home/pi/pilight/libs/pilight/core/mongoose.c:746: undefined reference to `SSL_CTX_set_verify'
/home/pi/pilight/libs/pilight/core/mongoose.c:747: undefined reference to `SSL_CTX_load_verify_locations'
libpilight.a(mongoose.c.o): In function `ns_use_cert':
/home/pi/pilight/libs/pilight/core/mongoose.c:755: undefined reference to `SSL_CTX_use_certificate_file'
/home/pi/pilight/libs/pilight/core/mongoose.c:756: undefined reference to `SSL_CTX_use_PrivateKey_file'
/home/pi/pilight/libs/pilight/core/mongoose.c:759: undefined reference to `SSL_CTX_ctrl'
/home/pi/pilight/libs/pilight/core/mongoose.c:760: undefined reference to `SSL_CTX_use_certificate_chain_file'

If you add -lssl and -lcrypto to the compile it will be fine.
 
Reply
#12
thanks for your hint. I think, i have to add it in the setup.sh. In which line?
 
Reply
#13
(05-29-2015, 02:48 PM)shelby_cobra Wrote: thanks for your hint. I think, i have to add it in the setup.sh. In which line?

I changed the -Wall parameter to -Wall -O2 -lssl -lcrypto in the CMakeLists.txt file.

try this before setup.sh, it works fine for me:
Quote:sed -i -e 's,-Wall,-Wall -O2 -lssl -lcrypto,g' CMakeLists.txt
 
Reply
#14
I see there is a mistake in the CMakeConfig. If you rename WEBSERVER_HTTPS to WEBSERVER_SSL and set it to On, the setup will take care of the rest.
 
Reply
#15
@Warter: it works, many thanks again.
@Curlymo: after renaming WEBSERVER_HTTPS to WEBSERVER_SSL in CmakeConfig.txt i could compile the pilight master branch without errors but starting pilight failed:
Code:
pilight-daemon: ERROR: config setting "webserver-https-port" is invalid
in config.json i have:
Code:
"webserver-https-port": 5002,
 
Reply
#16
Aha, then you should do it the other way.
Instead of renaming WEBSERVER_HTTPS to WEBSERVER_SSL in the CMakeConfig.txt you should rename WEBSERVER_SSL to WEBSERVER_HTTPS in the CMakeList.txt



SSL is now fully supported in the latest development code without the need for external libraries!

Change the /etc/pilight/ssl.pem to /etc/pilight/pilight.pem
 
Reply
#17
after renaming WEBSERVER_SSL to WEBSERVER_HTTPS all is working. So pilight works very fine for my purpose. I am only waiting for the s*mfy-protocol Wink
 
Reply
#18
Something has been changed:
Quote:[ 97%] Building C object CMakeFiles/pilight-daemon.dir/daemon.c.o
/root/pilight/daemon.c: In function 'start_pilight':
/root/pilight/daemon.c:2508:48: error: 'COMTHREAD' undeclared (first use in this function)
} else if(tmp_confhw->hardware->comtype == COMTHREAD) {
^
/root/pilight/daemon.c:2508:48: note: each undeclared identifier is reported only once for each function it appears in
/root/pilight/daemon.c:2509:69: error: 'hardware_t' has no member named 'receiveThread'
threads_register(tmp_confhw->hardware->id, tmp_confhw->hardware->receiveThread, (void *)tmp_confhw->hardware, 0);
^
CMakeFiles/pilight-daemon.dir/build.make:53: recipe for target 'CMakeFiles/pilight-daemon.dir/daemon.c.o' failed
make[2]: *** [CMakeFiles/pilight-daemon.dir/daemon.c.o] Error 1
CMakeFiles/Makefile2:130: recipe for target 'CMakeFiles/pilight-daemon.dir/all' failed
make[1]: *** [CMakeFiles/pilight-daemon.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
 
Reply
#19
Fixed.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Already fixed in 8.1.2] Loss of webserver-connection Ulrich.Arnold 34 2,497 08-02-2019, 02:25 PM
Last Post: curlymo
  Support for shutters nerd123 0 331 10-06-2018, 01:48 PM
Last Post: nerd123
  [Supported] Alecto WS4500 / WS3500 | Ventus W177 Tommybear1979 229 55,411 06-01-2018, 10:06 AM
Last Post: DieterD62
  [Fully Supported] Conrad RSL Switch Hexcode 137 44,406 12-02-2017, 08:48 AM
Last Post: Micha_123
  Conrad RSL Support Druide85 1 1,165 11-03-2017, 10:34 AM
Last Post: MorfelPi
  Webserver (REST API) - POST TopdRob 7 1,689 10-25-2017, 11:17 PM
Last Post: curlymo
  Supported shutter belt winders. muecke 0 704 12-18-2016, 12:02 PM
Last Post: muecke
  webserver-authentication problem with some browsers MorfelPi 4 1,856 09-21-2016, 06:59 PM
Last Post: Emiks5
  OpenWRT Support Rossini 43 14,897 02-29-2016, 10:24 PM
Last Post: Tobias
  Using API webserver send page "message":"failed" fips 1 1,517 01-08-2016, 09:21 AM
Last Post: fips

Forum Jump:


Browsing: 1 Guest(s)