{"action":"created","comment":{"url":"https://api.github.com/repos/inliniac/suricata/pulls/comments/52426863","id":52426863,"diff_hunk":"@@ -128,6 +191,57 @@ const Asn1Generic * Asn1DerGet(const Asn1Generic *top, const uint8_t *seq_index,\n     return node;\n }\n \n+int Asn1DerGetValidity(const Asn1Generic *cert, time_t *not_before,\n+                       time_t *not_after, uint32_t *errcode)\n+{\n+    const Asn1Generic *node, *it;\n+    int rc = -1;\n+\n+    if (errcode)","path":"src/util-decode-der-get.c","position":87,"original_position":87,"commit_id":"62dd22b3ab2cfa196475d933cc335103b2e9b050","original_commit_id":"62dd22b3ab2cfa196475d933cc335103b2e9b050","user":{"login":"thus","id":75630,"avatar_url":"https://avatars.githubusercontent.com/u/75630?v=3","gravatar_id":"","url":"https://api.github.com/users/thus","html_url":"https://github.com/thus","followers_url":"https://api.github.com/users/thus/followers","following_url":"https://api.github.com/users/thus/following{/other_user}","gists_url":"https://api.github.com/users/thus/gists{/gist_id}","starred_url":"https://api.github.com/users/thus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thus/subscriptions","organizations_url":"https://api.github.com/users/thus/orgs","repos_url":"https://api.github.com/users/thus/repos","events_url":"https://api.github.com/users/thus/events{/privacy}","received_events_url":"https://api.github.com/users/thus/received_events","type":"User","site_admin":false},"body":"You are right. \r\n\r\nIn the other ASN1 functions \"errcode\" is set to 0 right before returning when no error is encountered. It probably makes most sense to just remove it, since \"errcode\" is not used any way when there is no error.","created_at":"2016-02-10T08:25:34Z","updated_at":"2016-02-10T08:25:34Z","html_url":"https://github.com/inliniac/suricata/pull/1728#discussion_r52426863","pull_request_url":"https://api.github.com/repos/inliniac/suricata/pulls/1728","_links":{"self":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/comments/52426863"},"html":{"href":"https://github.com/inliniac/suricata/pull/1728#discussion_r52426863"},"pull_request":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/1728"}}},"pull_request":{"url":"https://api.github.com/repos/inliniac/suricata/pulls/1728","id":49248898,"html_url":"https://github.com/inliniac/suricata/pull/1728","diff_url":"https://github.com/inliniac/suricata/pull/1728.diff","patch_url":"https://github.com/inliniac/suricata/pull/1728.patch","issue_url":"https://api.github.com/repos/inliniac/suricata/issues/1728","number":1728,"state":"open","locked":false,"title":"app-layer-tls: validity dates from TLS certificate","user":{"login":"thus","id":75630,"avatar_url":"https://avatars.githubusercontent.com/u/75630?v=3","gravatar_id":"","url":"https://api.github.com/users/thus","html_url":"https://github.com/thus","followers_url":"https://api.github.com/users/thus/followers","following_url":"https://api.github.com/users/thus/following{/other_user}","gists_url":"https://api.github.com/users/thus/gists{/gist_id}","starred_url":"https://api.github.com/users/thus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thus/subscriptions","organizations_url":"https://api.github.com/users/thus/orgs","repos_url":"https://api.github.com/users/thus/repos","events_url":"https://api.github.com/users/thus/events{/privacy}","received_events_url":"https://api.github.com/users/thus/received_events","type":"User","site_admin":false},"body":"Get validity dates (notBefore and notAfter) from TLS certificate.\r\n\r\nNew detection keywords (tls_notbefore and tls_notafter), added validity dates to extended JSON log and extended TLS log output, and new lua function TlsGetCertValidity().\r\n\r\nChanges:\r\n* Added support for human readable date formats (ISO 8601) to rule keywords\r\n* ISO 8601 date (YYYY-mm-ddTHH:MM:SS) in tls-log and output-json-tls.\r\n* Fixed time zone handling\r\n\r\nFixed changes suggested in #1722.\r\n\r\nhttps://redmine.openinfosecfoundation.org/issues/1583","created_at":"2015-10-30T09:46:33Z","updated_at":"2016-02-10T08:25:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0106e68c4652bf116eee168065b3b6d49d2b2db2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/inliniac/suricata/pulls/1728/commits","review_comments_url":"https://api.github.com/repos/inliniac/suricata/pulls/1728/comments","review_comment_url":"https://api.github.com/repos/inliniac/suricata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inliniac/suricata/issues/1728/comments","statuses_url":"https://api.github.com/repos/inliniac/suricata/statuses/62dd22b3ab2cfa196475d933cc335103b2e9b050","head":{"label":"thus:dev-ssl-validity-v3","ref":"dev-ssl-validity-v3","sha":"62dd22b3ab2cfa196475d933cc335103b2e9b050","user":{"login":"thus","id":75630,"avatar_url":"https://avatars.githubusercontent.com/u/75630?v=3","gravatar_id":"","url":"https://api.github.com/users/thus","html_url":"https://github.com/thus","followers_url":"https://api.github.com/users/thus/followers","following_url":"https://api.github.com/users/thus/following{/other_user}","gists_url":"https://api.github.com/users/thus/gists{/gist_id}","starred_url":"https://api.github.com/users/thus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thus/subscriptions","organizations_url":"https://api.github.com/users/thus/orgs","repos_url":"https://api.github.com/users/thus/repos","events_url":"https://api.github.com/users/thus/events{/privacy}","received_events_url":"https://api.github.com/users/thus/received_events","type":"User","site_admin":false},"repo":{"id":43420959,"name":"suricata","full_name":"thus/suricata","owner":{"login":"thus","id":75630,"avatar_url":"https://avatars.githubusercontent.com/u/75630?v=3","gravatar_id":"","url":"https://api.github.com/users/thus","html_url":"https://github.com/thus","followers_url":"https://api.github.com/users/thus/followers","following_url":"https://api.github.com/users/thus/following{/other_user}","gists_url":"https://api.github.com/users/thus/gists{/gist_id}","starred_url":"https://api.github.com/users/thus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thus/subscriptions","organizations_url":"https://api.github.com/users/thus/orgs","repos_url":"https://api.github.com/users/thus/repos","events_url":"https://api.github.com/users/thus/events{/privacy}","received_events_url":"https://api.github.com/users/thus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thus/suricata","description":"My personal development tree for Suricata","fork":true,"url":"https://api.github.com/repos/thus/suricata","forks_url":"https://api.github.com/repos/thus/suricata/forks","keys_url":"https://api.github.com/repos/thus/suricata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thus/suricata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thus/suricata/teams","hooks_url":"https://api.github.com/repos/thus/suricata/hooks","issue_events_url":"https://api.github.com/repos/thus/suricata/issues/events{/number}","events_url":"https://api.github.com/repos/thus/suricata/events","assignees_url":"https://api.github.com/repos/thus/suricata/assignees{/user}","branches_url":"https://api.github.com/repos/thus/suricata/branches{/branch}","tags_url":"https://api.github.com/repos/thus/suricata/tags","blobs_url":"https://api.github.com/repos/thus/suricata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thus/suricata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thus/suricata/git/refs{/sha}","trees_url":"https://api.github.com/repos/thus/suricata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thus/suricata/statuses/{sha}","languages_url":"https://api.github.com/repos/thus/suricata/languages","stargazers_url":"https://api.github.com/repos/thus/suricata/stargazers","contributors_url":"https://api.github.com/repos/thus/suricata/contributors","subscribers_url":"https://api.github.com/repos/thus/suricata/subscribers","subscription_url":"https://api.github.com/repos/thus/suricata/subscription","commits_url":"https://api.github.com/repos/thus/suricata/commits{/sha}","git_commits_url":"https://api.github.com/repos/thus/suricata/git/commits{/sha}","comments_url":"https://api.github.com/repos/thus/suricata/comments{/number}","issue_comment_url":"https://api.github.com/repos/thus/suricata/issues/comments{/number}","contents_url":"https://api.github.com/repos/thus/suricata/contents/{+path}","compare_url":"https://api.github.com/repos/thus/suricata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thus/suricata/merges","archive_url":"https://api.github.com/repos/thus/suricata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thus/suricata/downloads","issues_url":"https://api.github.com/repos/thus/suricata/issues{/number}","pulls_url":"https://api.github.com/repos/thus/suricata/pulls{/number}","milestones_url":"https://api.github.com/repos/thus/suricata/milestones{/number}","notifications_url":"https://api.github.com/repos/thus/suricata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thus/suricata/labels{/name}","releases_url":"https://api.github.com/repos/thus/suricata/releases{/id}","deployments_url":"https://api.github.com/repos/thus/suricata/deployments","created_at":"2015-09-30T08:23:02Z","updated_at":"2015-10-10T14:10:15Z","pushed_at":"2015-11-25T08:17:47Z","git_url":"git://github.com/thus/suricata.git","ssh_url":"git@github.com:thus/suricata.git","clone_url":"https://github.com/thus/suricata.git","svn_url":"https://github.com/thus/suricata","homepage":"","size":41057,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"inliniac:master","ref":"master","sha":"86711a1332f7082a688ff68ad38f2641bd20ee26","user":{"login":"inliniac","id":719366,"avatar_url":"https://avatars.githubusercontent.com/u/719366?v=3","gravatar_id":"","url":"https://api.github.com/users/inliniac","html_url":"https://github.com/inliniac","followers_url":"https://api.github.com/users/inliniac/followers","following_url":"https://api.github.com/users/inliniac/following{/other_user}","gists_url":"https://api.github.com/users/inliniac/gists{/gist_id}","starred_url":"https://api.github.com/users/inliniac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inliniac/subscriptions","organizations_url":"https://api.github.com/users/inliniac/orgs","repos_url":"https://api.github.com/users/inliniac/repos","events_url":"https://api.github.com/users/inliniac/events{/privacy}","received_events_url":"https://api.github.com/users/inliniac/received_events","type":"User","site_admin":false},"repo":{"id":5410234,"name":"suricata","full_name":"inliniac/suricata","owner":{"login":"inliniac","id":719366,"avatar_url":"https://avatars.githubusercontent.com/u/719366?v=3","gravatar_id":"","url":"https://api.github.com/users/inliniac","html_url":"https://github.com/inliniac","followers_url":"https://api.github.com/users/inliniac/followers","following_url":"https://api.github.com/users/inliniac/following{/other_user}","gists_url":"https://api.github.com/users/inliniac/gists{/gist_id}","starred_url":"https://api.github.com/users/inliniac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inliniac/subscriptions","organizations_url":"https://api.github.com/users/inliniac/orgs","repos_url":"https://api.github.com/users/inliniac/repos","events_url":"https://api.github.com/users/inliniac/events{/privacy}","received_events_url":"https://api.github.com/users/inliniac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/inliniac/suricata","description":"Mirror of the official OISF Suricata git repository","fork":false,"url":"https://api.github.com/repos/inliniac/suricata","forks_url":"https://api.github.com/repos/inliniac/suricata/forks","keys_url":"https://api.github.com/repos/inliniac/suricata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inliniac/suricata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inliniac/suricata/teams","hooks_url":"https://api.github.com/repos/inliniac/suricata/hooks","issue_events_url":"https://api.github.com/repos/inliniac/suricata/issues/events{/number}","events_url":"https://api.github.com/repos/inliniac/suricata/events","assignees_url":"https://api.github.com/repos/inliniac/suricata/assignees{/user}","branches_url":"https://api.github.com/repos/inliniac/suricata/branches{/branch}","tags_url":"https://api.github.com/repos/inliniac/suricata/tags","blobs_url":"https://api.github.com/repos/inliniac/suricata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inliniac/suricata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inliniac/suricata/git/refs{/sha}","trees_url":"https://api.github.com/repos/inliniac/suricata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inliniac/suricata/statuses/{sha}","languages_url":"https://api.github.com/repos/inliniac/suricata/languages","stargazers_url":"https://api.github.com/repos/inliniac/suricata/stargazers","contributors_url":"https://api.github.com/repos/inliniac/suricata/contributors","subscribers_url":"https://api.github.com/repos/inliniac/suricata/subscribers","subscription_url":"https://api.github.com/repos/inliniac/suricata/subscription","commits_url":"https://api.github.com/repos/inliniac/suricata/commits{/sha}","git_commits_url":"https://api.github.com/repos/inliniac/suricata/git/commits{/sha}","comments_url":"https://api.github.com/repos/inliniac/suricata/comments{/number}","issue_comment_url":"https://api.github.com/repos/inliniac/suricata/issues/comments{/number}","contents_url":"https://api.github.com/repos/inliniac/suricata/contents/{+path}","compare_url":"https://api.github.com/repos/inliniac/suricata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inliniac/suricata/merges","archive_url":"https://api.github.com/repos/inliniac/suricata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inliniac/suricata/downloads","issues_url":"https://api.github.com/repos/inliniac/suricata/issues{/number}","pulls_url":"https://api.github.com/repos/inliniac/suricata/pulls{/number}","milestones_url":"https://api.github.com/repos/inliniac/suricata/milestones{/number}","notifications_url":"https://api.github.com/repos/inliniac/suricata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inliniac/suricata/labels{/name}","releases_url":"https://api.github.com/repos/inliniac/suricata/releases{/id}","deployments_url":"https://api.github.com/repos/inliniac/suricata/deployments","created_at":"2012-08-14T08:30:06Z","updated_at":"2016-02-09T08:15:51Z","pushed_at":"2016-02-10T08:21:55Z","git_url":"git://github.com/inliniac/suricata.git","ssh_url":"git@github.com:inliniac/suricata.git","clone_url":"https://github.com/inliniac/suricata.git","svn_url":"https://github.com/inliniac/suricata","homepage":"http://suricata-ids.org/","size":52332,"stargazers_count":238,"watchers_count":238,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":222,"mirror_url":null,"open_issues_count":45,"forks":222,"open_issues":45,"watchers":238,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/1728"},"html":{"href":"https://github.com/inliniac/suricata/pull/1728"},"issue":{"href":"https://api.github.com/repos/inliniac/suricata/issues/1728"},"comments":{"href":"https://api.github.com/repos/inliniac/suricata/issues/1728/comments"},"review_comments":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/1728/comments"},"review_comment":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inliniac/suricata/pulls/1728/commits"},"statuses":{"href":"https://api.github.com/repos/inliniac/suricata/statuses/62dd22b3ab2cfa196475d933cc335103b2e9b050"}}}}