{"action":"created","comment":{"url":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments/43209932","id":43209932,"diff_hunk":"@@ -129,11 +140,63 @@ func newUpdater(\n \t\t})\n \t}\n \n-\tupdater.ocspMinTimeToExpiry = config.OCSPMinTimeToExpiry.Duration\n+\tif config.AkamaiBaseURL != \"\" {\n+\t\tissuer, err := core.LoadCert(issuerPath)\n+\t\tccu, err := akamai.NewCachePurgeClient(\n+\t\t\tconfig.AkamaiBaseURL,\n+\t\t\tconfig.AkamaiClientToken,\n+\t\t\tconfig.AkamaiClientSecret,\n+\t\t\tconfig.AkamaiAccessToken,\n+\t\t\tconfig.AkamaiPurgeRetries,\n+\t\t\tconfig.AkamaiPurgeRetryBackoff.Duration,\n+\t\t\tlog,\n+\t\t\tstats,\n+\t\t)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\t\tupdater.ccu = ccu\n+\t\tupdater.issuer = issuer\n+\t}\n \n \treturn &updater, nil\n }\n \n+// sendPurge should only be called as a Goroutine as it will block until the purge\n+// request is successful\n+func (updater *OCSPUpdater) sendPurge(der []byte) {\n+\tcert, err := x509.ParseCertificate(der)\n+\tif err != nil {\n+\t\tupdater.log.AuditErr(fmt.Errorf(\"Failed to parse certificate for cache purge\"))","path":"cmd/ocsp-updater/main.go","position":89,"original_position":89,"commit_id":"b687ba855f8917d57d415c01fc8d3da67d075f6d","original_commit_id":"b687ba855f8917d57d415c01fc8d3da67d075f6d","user":{"login":"jmhodges","id":598,"avatar_url":"https://avatars.githubusercontent.com/u/598?v=3","gravatar_id":"","url":"https://api.github.com/users/jmhodges","html_url":"https://github.com/jmhodges","followers_url":"https://api.github.com/users/jmhodges/followers","following_url":"https://api.github.com/users/jmhodges/following{/other_user}","gists_url":"https://api.github.com/users/jmhodges/gists{/gist_id}","starred_url":"https://api.github.com/users/jmhodges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmhodges/subscriptions","organizations_url":"https://api.github.com/users/jmhodges/orgs","repos_url":"https://api.github.com/users/jmhodges/repos","events_url":"https://api.github.com/users/jmhodges/events{/privacy}","received_events_url":"https://api.github.com/users/jmhodges/received_events","type":"User","site_admin":false},"body":"include error plox","created_at":"2015-10-28T01:21:25Z","updated_at":"2015-10-28T01:21:25Z","html_url":"https://github.com/letsencrypt/boulder/pull/987#discussion_r43209932","pull_request_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/987","_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments/43209932"},"html":{"href":"https://github.com/letsencrypt/boulder/pull/987#discussion_r43209932"},"pull_request":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/987"}}},"pull_request":{"url":"https://api.github.com/repos/letsencrypt/boulder/pulls/987","id":47720431,"html_url":"https://github.com/letsencrypt/boulder/pull/987","diff_url":"https://github.com/letsencrypt/boulder/pull/987.diff","patch_url":"https://github.com/letsencrypt/boulder/pull/987.patch","issue_url":"https://api.github.com/repos/letsencrypt/boulder/issues/987","number":987,"state":"open","locked":false,"title":"Add a Akamai CCU client and use it to purge OCSP responses on revocation and update","user":{"login":"rolandshoemaker","id":5080674,"avatar_url":"https://avatars.githubusercontent.com/u/5080674?v=3","gravatar_id":"","url":"https://api.github.com/users/rolandshoemaker","html_url":"https://github.com/rolandshoemaker","followers_url":"https://api.github.com/users/rolandshoemaker/followers","following_url":"https://api.github.com/users/rolandshoemaker/following{/other_user}","gists_url":"https://api.github.com/users/rolandshoemaker/gists{/gist_id}","starred_url":"https://api.github.com/users/rolandshoemaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolandshoemaker/subscriptions","organizations_url":"https://api.github.com/users/rolandshoemaker/orgs","repos_url":"https://api.github.com/users/rolandshoemaker/repos","events_url":"https://api.github.com/users/rolandshoemaker/events{/privacy}","received_events_url":"https://api.github.com/users/rolandshoemaker/received_events","type":"User","site_admin":false},"body":"So this is a big one (and still needs some more tests and polishing).\r\n\r\nAdds a [Akamai CCU](https://api.ccu.akamai.com/ccu/v2/docs/) client and adds it to the `ocsp-updater` in order to purge cached OCSP requests on the response update (due to stale response or cert revocation). Usage of the client is gated on providing the `ocspUpdater.AkamaiBaseURL` config value.\r\n\r\nFixes #828 and #733. Also as the last in a long series of patches altering the main function of the OCSP-Updater, this finally fixes #728.","created_at":"2015-10-14T21:57:19Z","updated_at":"2015-10-28T01:21:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bba1689a1eac7318e8a24b40eefc47a872d59615","assignee":null,"milestone":{"url":"https://api.github.com/repos/letsencrypt/boulder/milestones/6","html_url":"https://github.com/letsencrypt/boulder/milestones/General%20Availability","labels_url":"https://api.github.com/repos/letsencrypt/boulder/milestones/6/labels","id":1121569,"number":6,"title":"General Availability","description":"","creator":{"login":"bdaehlie","id":84762,"avatar_url":"https://avatars.githubusercontent.com/u/84762?v=3","gravatar_id":"","url":"https://api.github.com/users/bdaehlie","html_url":"https://github.com/bdaehlie","followers_url":"https://api.github.com/users/bdaehlie/followers","following_url":"https://api.github.com/users/bdaehlie/following{/other_user}","gists_url":"https://api.github.com/users/bdaehlie/gists{/gist_id}","starred_url":"https://api.github.com/users/bdaehlie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdaehlie/subscriptions","organizations_url":"https://api.github.com/users/bdaehlie/orgs","repos_url":"https://api.github.com/users/bdaehlie/repos","events_url":"https://api.github.com/users/bdaehlie/events{/privacy}","received_events_url":"https://api.github.com/users/bdaehlie/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":132,"state":"open","created_at":"2015-05-20T16:53:19Z","updated_at":"2015-10-27T20:25:16Z","due_on":"2015-11-20T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/987/commits","review_comments_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/987/comments","review_comment_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/letsencrypt/boulder/issues/987/comments","statuses_url":"https://api.github.com/repos/letsencrypt/boulder/statuses/b687ba855f8917d57d415c01fc8d3da67d075f6d","head":{"label":"letsencrypt:akamai","ref":"akamai","sha":"b687ba855f8917d57d415c01fc8d3da67d075f6d","user":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"repo":{"id":28283593,"name":"boulder","full_name":"letsencrypt/boulder","owner":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/letsencrypt/boulder","description":"An ACME-based CA, written in Go.","fork":false,"url":"https://api.github.com/repos/letsencrypt/boulder","forks_url":"https://api.github.com/repos/letsencrypt/boulder/forks","keys_url":"https://api.github.com/repos/letsencrypt/boulder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letsencrypt/boulder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letsencrypt/boulder/teams","hooks_url":"https://api.github.com/repos/letsencrypt/boulder/hooks","issue_events_url":"https://api.github.com/repos/letsencrypt/boulder/issues/events{/number}","events_url":"https://api.github.com/repos/letsencrypt/boulder/events","assignees_url":"https://api.github.com/repos/letsencrypt/boulder/assignees{/user}","branches_url":"https://api.github.com/repos/letsencrypt/boulder/branches{/branch}","tags_url":"https://api.github.com/repos/letsencrypt/boulder/tags","blobs_url":"https://api.github.com/repos/letsencrypt/boulder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letsencrypt/boulder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letsencrypt/boulder/git/refs{/sha}","trees_url":"https://api.github.com/repos/letsencrypt/boulder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letsencrypt/boulder/statuses/{sha}","languages_url":"https://api.github.com/repos/letsencrypt/boulder/languages","stargazers_url":"https://api.github.com/repos/letsencrypt/boulder/stargazers","contributors_url":"https://api.github.com/repos/letsencrypt/boulder/contributors","subscribers_url":"https://api.github.com/repos/letsencrypt/boulder/subscribers","subscription_url":"https://api.github.com/repos/letsencrypt/boulder/subscription","commits_url":"https://api.github.com/repos/letsencrypt/boulder/commits{/sha}","git_commits_url":"https://api.github.com/repos/letsencrypt/boulder/git/commits{/sha}","comments_url":"https://api.github.com/repos/letsencrypt/boulder/comments{/number}","issue_comment_url":"https://api.github.com/repos/letsencrypt/boulder/issues/comments{/number}","contents_url":"https://api.github.com/repos/letsencrypt/boulder/contents/{+path}","compare_url":"https://api.github.com/repos/letsencrypt/boulder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letsencrypt/boulder/merges","archive_url":"https://api.github.com/repos/letsencrypt/boulder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letsencrypt/boulder/downloads","issues_url":"https://api.github.com/repos/letsencrypt/boulder/issues{/number}","pulls_url":"https://api.github.com/repos/letsencrypt/boulder/pulls{/number}","milestones_url":"https://api.github.com/repos/letsencrypt/boulder/milestones{/number}","notifications_url":"https://api.github.com/repos/letsencrypt/boulder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letsencrypt/boulder/labels{/name}","releases_url":"https://api.github.com/repos/letsencrypt/boulder/releases{/id}","created_at":"2014-12-21T00:29:54Z","updated_at":"2015-10-27T21:22:03Z","pushed_at":"2015-10-28T00:44:58Z","git_url":"git://github.com/letsencrypt/boulder.git","ssh_url":"git@github.com:letsencrypt/boulder.git","clone_url":"https://github.com/letsencrypt/boulder.git","svn_url":"https://github.com/letsencrypt/boulder","homepage":null,"size":28348,"stargazers_count":846,"watchers_count":846,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":187,"forks":78,"open_issues":187,"watchers":846,"default_branch":"master"}},"base":{"label":"letsencrypt:master","ref":"master","sha":"d6fddff15ebb0e1f11f2ca02db760948b9174531","user":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"repo":{"id":28283593,"name":"boulder","full_name":"letsencrypt/boulder","owner":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/letsencrypt/boulder","description":"An ACME-based CA, written in Go.","fork":false,"url":"https://api.github.com/repos/letsencrypt/boulder","forks_url":"https://api.github.com/repos/letsencrypt/boulder/forks","keys_url":"https://api.github.com/repos/letsencrypt/boulder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letsencrypt/boulder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letsencrypt/boulder/teams","hooks_url":"https://api.github.com/repos/letsencrypt/boulder/hooks","issue_events_url":"https://api.github.com/repos/letsencrypt/boulder/issues/events{/number}","events_url":"https://api.github.com/repos/letsencrypt/boulder/events","assignees_url":"https://api.github.com/repos/letsencrypt/boulder/assignees{/user}","branches_url":"https://api.github.com/repos/letsencrypt/boulder/branches{/branch}","tags_url":"https://api.github.com/repos/letsencrypt/boulder/tags","blobs_url":"https://api.github.com/repos/letsencrypt/boulder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letsencrypt/boulder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letsencrypt/boulder/git/refs{/sha}","trees_url":"https://api.github.com/repos/letsencrypt/boulder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letsencrypt/boulder/statuses/{sha}","languages_url":"https://api.github.com/repos/letsencrypt/boulder/languages","stargazers_url":"https://api.github.com/repos/letsencrypt/boulder/stargazers","contributors_url":"https://api.github.com/repos/letsencrypt/boulder/contributors","subscribers_url":"https://api.github.com/repos/letsencrypt/boulder/subscribers","subscription_url":"https://api.github.com/repos/letsencrypt/boulder/subscription","commits_url":"https://api.github.com/repos/letsencrypt/boulder/commits{/sha}","git_commits_url":"https://api.github.com/repos/letsencrypt/boulder/git/commits{/sha}","comments_url":"https://api.github.com/repos/letsencrypt/boulder/comments{/number}","issue_comment_url":"https://api.github.com/repos/letsencrypt/boulder/issues/comments{/number}","contents_url":"https://api.github.com/repos/letsencrypt/boulder/contents/{+path}","compare_url":"https://api.github.com/repos/letsencrypt/boulder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letsencrypt/boulder/merges","archive_url":"https://api.github.com/repos/letsencrypt/boulder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letsencrypt/boulder/downloads","issues_url":"https://api.github.com/repos/letsencrypt/boulder/issues{/number}","pulls_url":"https://api.github.com/repos/letsencrypt/boulder/pulls{/number}","milestones_url":"https://api.github.com/repos/letsencrypt/boulder/milestones{/number}","notifications_url":"https://api.github.com/repos/letsencrypt/boulder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letsencrypt/boulder/labels{/name}","releases_url":"https://api.github.com/repos/letsencrypt/boulder/releases{/id}","created_at":"2014-12-21T00:29:54Z","updated_at":"2015-10-27T21:22:03Z","pushed_at":"2015-10-28T00:44:58Z","git_url":"git://github.com/letsencrypt/boulder.git","ssh_url":"git@github.com:letsencrypt/boulder.git","clone_url":"https://github.com/letsencrypt/boulder.git","svn_url":"https://github.com/letsencrypt/boulder","homepage":null,"size":28348,"stargazers_count":846,"watchers_count":846,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":187,"forks":78,"open_issues":187,"watchers":846,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/987"},"html":{"href":"https://github.com/letsencrypt/boulder/pull/987"},"issue":{"href":"https://api.github.com/repos/letsencrypt/boulder/issues/987"},"comments":{"href":"https://api.github.com/repos/letsencrypt/boulder/issues/987/comments"},"review_comments":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/987/comments"},"review_comment":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/987/commits"},"statuses":{"href":"https://api.github.com/repos/letsencrypt/boulder/statuses/b687ba855f8917d57d415c01fc8d3da67d075f6d"}}}}