{"action":"closed","issue":{"url":"https://api.github.com/repos/drwetter/testssl.sh/issues/251","labels_url":"https://api.github.com/repos/drwetter/testssl.sh/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/drwetter/testssl.sh/issues/251/comments","events_url":"https://api.github.com/repos/drwetter/testssl.sh/issues/251/events","html_url":"https://github.com/drwetter/testssl.sh/issues/251","id":122493805,"number":251,"title":"Dead branch in expiration check","user":{"login":"seccubus","id":1063278,"avatar_url":"https://avatars.githubusercontent.com/u/1063278?v=3","gravatar_id":"","url":"https://api.github.com/users/seccubus","html_url":"https://github.com/seccubus","followers_url":"https://api.github.com/users/seccubus/followers","following_url":"https://api.github.com/users/seccubus/following{/other_user}","gists_url":"https://api.github.com/users/seccubus/gists{/gist_id}","starred_url":"https://api.github.com/users/seccubus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seccubus/subscriptions","organizations_url":"https://api.github.com/users/seccubus/orgs","repos_url":"https://api.github.com/users/seccubus/repos","events_url":"https://api.github.com/users/seccubus/events{/privacy}","received_events_url":"https://api.github.com/users/seccubus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-16T12:27:42Z","updated_at":"2015-12-16T12:29:52Z","closed_at":"2015-12-16T12:29:52Z","body":"Expiration check code reads:\r\n\r\n     if ! echo $expire | grep -qw not; then\r\n          pr_red \"expired!\"\r\n     else\r\n          secs2warn=$((24 * 60 * 60 * DAYS2WARN2))  # low threshold first\r\n          expire=$($OPENSSL x509 -in $HOSTCERT -checkend $secs2warn 2>>$ERRFILE)\r\n          if echo \"$expire\" | grep -qw not; then\r\n               secs2warn=$((24 * 60 * 60 * DAYS2WARN1))\r\n               expire=$($OPENSSL x509 -in $HOSTCERT -checkend $secs2warn 2>>$ERRFILE)\r\n               if echo \"$expire\" | grep -qw not; then\r\n                    pr_litegreen \">= $DAYS2WARN1 days\"\r\n               else\r\n                    pr_brown \"expires < $DAYS2WARN1 days\"\r\n               fi\r\n          else\r\n               pr_litered \"expires < $DAYS2WARN2 days!\"\r\n          fi\r\n     fi\r\n\r\nGIven that the second if statement is the negated version of the first if statement the code \r\n\r\n               pr_litered \"expires < $DAYS2WARN2 days!\"\r\n\r\nWill never be reached.\r\n"}}