From: discomfitor Date: Thu, 8 Dec 2011 03:56:29 +0000 (+0000) Subject: more informative error messages when cert verification fails X-Git-Tag: build/2012-07-04.173327~604 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4427dc3f7f5ab10f672a740d20903e01cb3c0c8;p=profile%2Fivi%2Fecore.git more informative error messages when cert verification fails git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@66012 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_con/ecore_con_ssl.c b/src/lib/ecore_con/ecore_con_ssl.c index b2ff117..797f7e1 100644 --- a/src/lib/ecore_con/ecore_con_ssl.c +++ b/src/lib/ecore_con/ecore_con_ssl.c @@ -332,10 +332,18 @@ _openssl_name_verify(const char *name, const char *svrname) EINA_SAFETY_ON_TRUE_RETURN_VAL(!s, EINA_FALSE); /* same as above for the stored name */ EINA_SAFETY_ON_TRUE_RETURN_VAL(!strchr(s + 1, '.'), EINA_FALSE); - EINA_SAFETY_ON_TRUE_RETURN_VAL(strcasecmp(s, name + 1), EINA_FALSE); + if (strcasecmp(s, name + 1)) + { + ERR("%s != %s", s, name + 1); + return EINA_FALSE; + } } else - EINA_SAFETY_ON_TRUE_RETURN_VAL(strcasecmp(name, svrname), EINA_FALSE); + if (strcasecmp(name, svrname)) + { + ERR("%s != %s", name, svrname); + return EINA_FALSE; + } return EINA_TRUE; }