Add ssl_cry() function to display error message plus any detailed error messages that OpenSSL might care to provide. This can help to debug SSL communication issues.
Add ssl_cry() function to display error message plus any detailed error messages that OpenSSL might care to provide.
This can help to debug SSL communication issues.

Example output with a couple of problematic SSL client sessions (new log messages start with "-->" to indicate that they are providing additional detail to a previous log message):

Mongoose "2.9, $Rev: 517 $" started on port(s) "80,443s", serving directory "."
[1274991792] [error] [client 10.50.50.50] worker_thread: SSL handshake error
[1274991792] [error] [client 10.50.50.50]   --> error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
[1274991882] [error] [client 10.50.50.50] worker_thread: SSL handshake error
[1274991882] [error] [client 10.50.50.50]   --> error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher

DayBreakZhang/mongoose,emeric636/mongoose,mah007/mongoose,GerHobbelt/civet-webserver,hanminhee/mongoose,sc0ttj/mongoose,Lofik/mongoose,bl4ckic3/mongoose,Lofik/mongoose,bl4ckic3/mongoose,martindonofrio/mongoose,chinab/mongoose,cloudtrends/mongoose,hugoprudente/mongoose,tedAir/mongoose,h2ooooooo/mongoose,evook/mongoose,tencrocs/mongoose,kyj4795/mongoose,chyland/Meerkat,shaobo8910/mongoose,Sinisteryu/mongoose,kiss9815/mongoose,joswa/mongoose,LikeLionKDH/mongoose,jiltednut/mongoose,chesterpolo/mongoose,agenwebtoto/mongoose,DayBreakZhang/mongoose,merona/mongoose,Archon-/mongoose,joswa/mongoose,fb39ca4/mongoose,lecion/mongoose,nrmmota/mongoose,nrmmota/mongoose,emeric636/mongoose,chyland/Meerkat,asd1355215911/mongoose,pfalcon-mirrors/mongoose-mit,pfalcon-mirrors/mongoose-mit,UCSD-PL/csolve-webserver,recycled-air/mongoose,yeomann/mongoose,Shaun-duplessis79/mongoose,Beirdo/gjhurlbu-custom-memory-mongoose,palaniyappanBala/mongoose,kyj4795/mongoose,lingjiancong/mongoose,funhatch/mongoose,ancruna/mongoose,anragab/mongoose,jiltednut/mongoose,beemoboy/mongoose,kelemenbalazs/mongoose,codushlaine/mongoose,tst2005googlecode/mongoose,cuongphphanoi/mongoose,Archon-/mongoose,palaniyappanBala/mongoose,evook/mongoose,kissofdarknes/mongoose,ruslansk/mongoose,jaz303/mongoose-mit,yhk1038/mongoose,txdowty/mongoose,olupotd/mongoose,LikeLionKDH/mongoose,anragab/mongoose,oldeye/mongoose,attilla/mongoose,michaelarmstrong/mongoose,Beirdo/gjhurlbu-custom-memory-mongoose,Elirudite/mongoose,M-Razavi/mongoose,yhk1038/mongoose,kiss9815/mongoose,brockn/squeasel,deadmenace/mongoose,psiniemi/mongoose,ufairiya/mongoose,emeric636/mongoose,loveJesus/mongoose,danburkert/squeasel,Lofik/mongoose,starfalling/mongoose,tmaguire/mongoose,commshare/civet-webserver,kissofdarknes/mongoose,kyj4795/mongoose,nrmmota/mongoose,olupotd/mongoose,kissofdarknes/mongoose,Letractively/mongoose,cloudtrends/mongoose,daokoder/Marten,stabAhead/mongoose,lecion/mongoose,jiltednut/mongoose,sc0ttj/mongoose,gaochunzy/mongoose,GerHobbelt/civet-webserver,mygittyhubby/free-mongoose,ruslansk/mongoose,ndesktop/mongoose,stabAhead/mongoose,chinab/mongoose,Elirudite/mongoose,BurgyDev/mongoose,codushlaine/mongoose,thamagates/mongoose,Sinisteryu/mongoose,sc0ttj/mongoose,serinchu/mongoose,mmocean/mongoose,Archon-/mongoose,Rohit214/mongoose,Rohit214/mongoose,waxmiguelito/mongoose,DayBreakZhang/mongoose,evook/mongoose,ancruna/mongoose,bl4ckic3/mongoose,kelemenbalazs/mongoose,kyj4795/mongoose,adamh0807/mongoose,jaz303/mongoose-mit,tedAir/mongoose,tmaguire/mongoose,aata/mongoose,mrwill84/mongoose,BackupGGCode/mongoose,plan44/libmongoose,anragab/mongoose,daokoder/Marten,oldeye/mongoose,fb39ca4/mongoose,commshare/civet-webserver,mrwill84/mongoose,daokoder/Marten,RandallFlagg/mongoose,waxmiguelito/mongoose,txdowty/mongoose,M-Razavi/mongoose,UCSD-PL/csolve-webserver,cloudtrends/mongoose,commshare/civet-webserver,elbuengad/mongoose,mmocean/mongoose,M-Razavi/mongoose,agenwebtoto/mongoose,ndesktop/mongoose,haima-zju/mongoose,ismailfatih/mongoose,kissofdarknes/mongoose,elbuengad/mongoose,pfalcon-mirrors/mongoose-mit,mmocean/mongoose,bharath1097/mongoose,172205/mongoose,psiniemi/mongoose,codushlaine/mongoose,tstorch/mongoose,attilla/mongoose,ndesktop/mongoose,rgbkrk/mongoose,mmocean/mongoose,frankschmidt2377/mongoose,Killerduty/mongoose,GerHobbelt/civet-webserver,sc0ttj/mongoose,bharath1097/mongoose,chesterpolo/mongoose,ruslansk/mongoose,thamagates/mongoose,jaz303/mongoose-mit,natebot13/mongoose,jreidthompson/mongoose,adamh0807/mongoose,pentix/mongoose,attilla/mongoose,AndrewGomes/mongoose,deekr/mongoose,deekr/mongoose,deadmenace/mongoose,RandallFlagg/mongoose,BackupGGCode/mongoose,jreidthompson/mongoose,ancruna/mongoose,ndesktop/mongoose,martindonofrio/mongoose,txdowty/mongoose,adamh0807/mongoose,GerHobbelt/civet-webserver,funhatch/mongoose,Shaun-duplessis79/mongoose,Elirudite/mongoose,ancruna/mongoose,hauke/mongoose,chesterpolo/mongoose,attilla/mongoose,kelemenbalazs/mongoose,asd1355215911/mongoose,hanminhee/mongoose,mulle-nat/mongoose,Killerduty/mongoose,Letractively/mongoose,mmocean/mongoose,brockn/squeasel,tstorch/mongoose,wachub/mongoose,olupotd/mongoose,ismailfatih/mongoose,h2ooooooo/mongoose,ufairiya/mongoose,natebot13/mongoose,chinab/mongoose,pentix/mongoose,kelemenbalazs/mongoose,BackupGGCode/mongoose,Beirdo/gjhurlbu-custom-memory-mongoose,elbuengad/mongoose,pentix/mongoose,kp001/mongoose,rgfernandes/mongoose,RandallFlagg/mongoose,rgfernandes/mongoose,michaelarmstrong/mongoose,starfalling/mongoose,fajsid/mongoose,630543057/mongoose,tst2005googlecode/mongoose,BackupGGCode/mongoose,slachiewicz/mongoose,funhatch/mongoose,Beirdo/gjhurlbu-custom-memory-mongoose,pfalcon/mongoose-mit,joswa/mongoose,M-Razavi/mongoose,nethibernate/mongoose,pfalcon/mongoose-mit,gcla/mongoose,stabAhead/mongoose,aata/mongoose,Lofik/mongoose,hugoprudente/mongoose,630543057/mongoose,martindonofrio/mongoose,tedAir/mongoose,Killerduty/mongoose,martindonofrio/mongoose,Serge78rus/mongoose,mulle-nat/mongoose,thamagates/mongoose,thamagates/mongoose,oldeye/mongoose,zzuzjl/mongoose,mmocean/mongoose,dabomb1004/mongoose,630543057/mongoose,kissofdarknes/mongoose,slachiewicz/mongoose,Serge78rus/mongoose,UCSD-PL/csolve-webserver,rgfernandes/mongoose,joeinfo888/mongoose,mygittyhubby/free-mongoose,gcla/mongoose,tencrocs/mongoose,starfalling/mongoose,cloudtrends/mongoose,tencrocs/mongoose,palaniyappanBala/mongoose,bharath1097/mongoose,lecion/mongoose,fajsid/mongoose,haima-zju/mongoose,kyj4795/mongoose,kuksugen/mongoose,fb39ca4/mongoose,kuksugen/mongoose,attilla/mongoose,LeeByeongHo/mongoose,Letractively/mongoose,agenwebtoto/mongoose,ranxian/mongoose,GerHobbelt/civet-webserver,natebot13/mongoose,kuksugen/mongoose,thamagates/mongoose,waxmiguelito/mongoose,kissofdarknes/mongoose,commshare/civet-webserver,RandallFlagg/mongoose,thamagates/mongoose,anragab/mongoose,AndrewGomes/mongoose,joswa/mongoose,beemoboy/mongoose,txdowty/mongoose,shaobo8910/mongoose,codushlaine/mongoose,UCSD-PL/csolve-webserver,ancruna/mongoose,chyland/Meerkat,pfalcon-mirrors/mongoose-mit,gcla/mongoose,yeomann/mongoose,ndesktop/mongoose,chinab/mongoose,slachiewicz/mongoose,Archon-/mongoose,LeeByeongHo/mongoose,frankschmidt2377/mongoose,mmocean/mongoose,Sinisteryu/mongoose,brockn/squeasel,cloudtrends/mongoose,h2ooooooo/mongoose,joeinfo888/mongoose,LikeLionKDH/mongoose,ruslansk/mongoose,mrwill84/mongoose,oldeye/mongoose,natebot13/mongoose,adamh0807/mongoose,joeinfo888/mongoose,deekr/mongoose,tedAir/mongoose,chyland/Meerkat,deekr/mongoose,gaochunzy/mongoose,deadmenace/mongoose,lecion/mongoose,tstorch/mongoose,zzuzjl/mongoose,plan44/libmongoose,ufairiya/mongoose,Beirdo/gjhurlbu-custom-memory-mongoose,h2ooooooo/mongoose,tmaguire/mongoose,bl4ckic3/mongoose,fajsid/mongoose,dabomb1004/mongoose,kiss9815/mongoose,dabomb1004/mongoose,agenwebtoto/mongoose,emeric636/mongoose,Shaun-duplessis79/mongoose,funhatch/mongoose,ancruna/mongoose,daokoder/Marten,palaniyappanBala/mongoose,codushlaine/mongoose,M-Razavi/mongoose,gihyun/mongoose,BurgyDev/mongoose,mah007/mongoose,hugoprudente/mongoose,hugoprudente/mongoose,jaz303/mongoose-mit,jreidthompson/mongoose,michaelarmstrong/mongoose,gihyun/mongoose,funhatch/mongoose,olupotd/mongoose,hauke/mongoose,gaochunzy/mongoose,mygittyhubby/free-mongoose,Rohit214/mongoose,chyland/Meerkat,ismailfatih/mongoose,martindonofrio/mongoose,asd1355215911/mongoose,dabomb1004/mongoose,tmaguire/mongoose,fajsid/mongoose,deadmenace/mongoose,natebot13/mongoose,nethibernate/mongoose,Lofik/mongoose,olupotd/mongoose,beemoboy/mongoose,palaniyappanBala/mongoose,tencrocs/mongoose,serinchu/mongoose,michaelarmstrong/mongoose,kelemenbalazs/mongoose,palaniyappanBala/mongoose,aata/mongoose,BackupGGCode/mongoose,tencrocs/mongoose,stabAhead/mongoose,yeomann/mongoose,stabAhead/mongoose,mrwill84/mongoose,frankschmidt2377/mongoose,cuongphphanoi/mongoose,Rohit214/mongoose,hauke/mongoose,loveJesus/mongoose,evook/mongoose,630543057/mongoose,daokoder/Marten,Archon-/mongoose,DayBreakZhang/mongoose,waxmiguelito/mongoose,frankschmidt2377/mongoose,codushlaine/mongoose,Shaun-duplessis79/mongoose,adamh0807/mongoose,BackupGGCode/mongoose,gihyun/mongoose,Lofik/mongoose,michaelarmstrong/mongoose,mulle-nat/mongoose,jiltednut/mongoose,M-Razavi/mongoose,thamagates/mongoose,kissofdarknes/mongoose,Elirudite/mongoose,rgbkrk/mongoose,tst2005googlecode/mongoose,RandallFlagg/mongoose,kp001/mongoose,hugoprudente/mongoose,natebot13/mongoose,Beirdo/gjhurlbu-custom-memory-mongoose,recycled-air/mongoose,joeinfo888/mongoose,jaz303/mongoose-mit,hauke/mongoose,Shaun-duplessis79/mongoose,serinchu/mongoose,tst2005googlecode/mongoose,Shaun-duplessis79/mongoose,waxmiguelito/mongoose,adamh0807/mongoose,Lofik/mongoose,nrmmota/mongoose,ranxian/mongoose,ufairiya/mongoose,sc0ttj/mongoose,LikeLionKDH/mongoose,hugoprudente/mongoose,slachiewicz/mongoose,630543057/mongoose,Rohit214/mongoose,yhk1038/mongoose,Elirudite/mongoose,bharath1097/mongoose,plan44/libmongoose,aata/mongoose,yhk1038/mongoose,olupotd/mongoose,LeeByeongHo/mongoose,lingjiancong/mongoose,adamh0807/mongoose,lingjiancong/mongoose,gcla/mongoose,172205/mongoose,shaobo8910/mongoose,brockn/squeasel,deadmenace/mongoose,danburkert/squeasel,hauke/mongoose,M-Razavi/mongoose,ruslansk/mongoose,Killerduty/mongoose,hauke/mongoose,jaz303/mongoose-mit,wachub/mongoose,emeric636/mongoose,rgfernandes/mongoose,mrwill84/mongoose,DayBreakZhang/mongoose,shaobo8910/mongoose,haima-zju/mongoose,mygittyhubby/free-mongoose,rgbkrk/mongoose,Beirdo/gjhurlbu-custom-memory-mongoose,jiltednut/mongoose,beemoboy/mongoose,fb39ca4/mongoose,tst2005googlecode/mongoose,wachub/mongoose,kuksugen/mongoose,anragab/mongoose,pfalcon/mongoose-mit,bharath1097/mongoose,merona/mongoose,deekr/mongoose,evook/mongoose,txdowty/mongoose,chinab/mongoose,mulle-nat/mongoose,psiniemi/mongoose,gcla/mongoose,wachub/mongoose,chyland/Meerkat,ismailfatih/mongoose,kp001/mongoose,slachiewicz/mongoose,daokoder/Marten,gaochunzy/mongoose,LikeLionKDH/mongoose,shaobo8910/mongoose,ufairiya/mongoose,Killerduty/mongoose,agenwebtoto/mongoose,merona/mongoose,asd1355215911/mongoose,merona/mongoose,Elirudite/mongoose,pentix/mongoose,danburkert/squeasel,chesterpolo/mongoose,evook/mongoose,tst2005googlecode/mongoose,starfalling/mongoose,hanminhee/mongoose,danburkert/squeasel,slachiewicz/mongoose,172205/mongoose,jiltednut/mongoose,mygittyhubby/free-mongoose,agenwebtoto/mongoose,AndrewGomes/mongoose,Rohit214/mongoose,waxmiguelito/mongoose,mygittyhubby/free-mongoose,bharath1097/mongoose,gaochunzy/mongoose,pentix/mongoose,kiss9815/mongoose,agenwebtoto/mongoose,wachub/mongoose,elbuengad/mongoose,palaniyappanBala/mongoose,psiniemi/mongoose,kp001/mongoose,pfalcon-mirrors/mongoose-mit,ismailfatih/mongoose,BurgyDev/mongoose,beemoboy/mongoose,tedAir/mongoose,commshare/civet-webserver,hanminhee/mongoose,joeinfo888/mongoose,jiltednut/mongoose,ufairiya/mongoose,rgbkrk/mongoose,Elirudite/mongoose,GerHobbelt/civet-webserver,plan44/libmongoose,nethibernate/mongoose,zzuzjl/mongoose,rgbkrk/mongoose,aata/mongoose,loveJesus/mongoose,daokoder/Marten,BurgyDev/mongoose,deekr/mongoose,tst2005googlecode/mongoose,cuongphphanoi/mongoose,recycled-air/mongoose,tmaguire/mongoose,olupotd/mongoose,nrmmota/mongoose,shaobo8910/mongoose,mah007/mongoose,AndrewGomes/mongoose,DayBreakZhang/mongoose,gaochunzy/mongoose,joswa/mongoose,ancruna/mongoose,kiss9815/mongoose,frankschmidt2377/mongoose,gihyun/mongoose,cloudtrends/mongoose,h2ooooooo/mongoose,asd1355215911/mongoose,recycled-air/mongoose,evook/mongoose,cloudtrends/mongoose,psiniemi/mongoose,AndrewGomes/mongoose,jreidthompson/mongoose,danburkert/squeasel,emeric636/mongoose,mah007/mongoose,elbuengad/mongoose,ruslansk/mongoose,mygittyhubby/free-mongoose,natebot13/mongoose,172205/mongoose,deekr/mongoose,haima-zju/mongoose,chesterpolo/mongoose,pfalcon/mongoose-mit,starfalling/mongoose,nethibernate/mongoose,ndesktop/mongoose,AndrewGomes/mongoose,lingjiancong/mongoose,yeomann/mongoose,commshare/civet-webserver,Letractively/mongoose,zzuzjl/mongoose,h2ooooooo/mongoose,serinchu/mongoose,LeeByeongHo/mongoose,loveJesus/mongoose,Shaun-duplessis79/mongoose,nethibernate/mongoose,jreidthompson/mongoose,Serge78rus/mongoose,mah007/mongoose,deadmenace/mongoose,gihyun/mongoose,UCSD-PL/csolve-webserver,recycled-air/mongoose,dabomb1004/mongoose,haima-zju/mongoose,Rohit214/mongoose,pfalcon/mongoose-mit,serinchu/mongoose,DayBreakZhang/mongoose,cuongphphanoi/mongoose,lecion/mongoose,slachiewicz/mongoose,hugoprudente/mongoose,Serge78rus/mongoose,AndrewGomes/mongoose,loveJesus/mongoose,danburkert/squeasel,waxmiguelito/mongoose,Sinisteryu/mongoose,plan44/libmongoose,yeomann/mongoose,mrwill84/mongoose,h2ooooooo/mongoose,ranxian/mongoose,ranxian/mongoose,commshare/civet-webserver,oldeye/mongoose,codushlaine/mongoose,ndesktop/mongoose,Letractively/mongoose,fb39ca4/mongoose,ranxian/mongoose,mrwill84/mongoose,LeeByeongHo/mongoose,asd1355215911/mongoose,Sinisteryu/mongoose,172205/mongoose,mulle-nat/mongoose,lingjiancong/mongoose,fajsid/mongoose,bharath1097/mongoose,merona/mongoose,BackupGGCode/mongoose,emeric636/mongoose,cuongphphanoi/mongoose,kp001/mongoose,tstorch/mongoose,brockn/squeasel,ruslansk/mongoose,hanminhee/mongoose,tstorch/mongoose,zzuzjl/mongoose,shaobo8910/mongoose,Serge78rus/mongoose,brockn/squeasel,bl4ckic3/mongoose,BurgyDev/mongoose,yhk1038/mongoose,asd1355215911/mongoose,gaochunzy/mongoose,plan44/libmongoose,kuksugen/mongoose,rgfernandes/mongoose,ufairiya/mongoose,Archon-/mongoose,deadmenace/mongoose,Archon-/mongoose