Fix broken SNI
commit152fda6702d1e35af3490a15046588d2521addb3
authorAlan Frindell <afrind@fb.com>
Fri, 15 Aug 2014 00:40:05 +0000 (14 17:40 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Fri, 15 Aug 2014 05:09:13 +0000 (14 22:09 -0700)
tree855ed225a798bf95de4e1eb64fe85c9585a7bc2a
parent4b37eaae248d34a4d6b821b26a19a834a5292f8b
Fix broken SNI

Summary: There were a bunch of bugs in D1462765, which revealed an older bug t4917174.  Fixes:

1) Use the correct path to the file for stat(2)
2) Don't skip trying to load the cert when stat fails
3) log the errno of stat failure
4) correctly set dup to be true when insert fails
5) re-set the SNI no-match handler every time a cert is added, otherwise it gets cleared and disables SNI handling

Reviewed By: @bertmaher

Differential Revision: D1499536
hphp/runtime/server/server-name-indication.cpp