{"action":"created","comment":{"url":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments/26331393","id":26331393,"diff_hunk":"@@ -0,0 +1,148 @@\n+package main\n+\n+import (\n+\t\"crypto/rand\"\n+\t\"crypto/sha1\"\n+\t\"crypto/x509\"\n+\t\"crypto/x509/pkix\"\n+\t\"encoding/json\"\n+\t\"encoding/pem\"\n+\t\"flag\"\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\t\"math/big\"\n+\t\"time\"\n+\n+\t\"github.com/cloudflare/cfssl/crypto/pkcs11key\"\n+\t\"github.com/cloudflare/cfssl/log\"\n+)\n+\n+var configFile = flag.String(\"config\", \"\", \"JSON file for subject and validity\")\n+var module = flag.String(\"pkcs11-module\", \"\", \"PKCS#11 module\")\n+var pin = flag.String(\"pkcs11-pin\", \"\", \"PKCS#11 password\")\n+var token = flag.String(\"pkcs11-token\", \"\", \"PKCS#11 token name\")\n+var label = flag.String(\"pkcs11-label\", \"\", \"PKCS#11 key label\")\n+\n+type Config struct {\n+\tName struct {\n+\t\tC  string\n+\t\tO  string\n+\t\tOU string\n+\t\tCN string\n+\t}\n+\tNotBefore time.Time\n+\tNotAfter  time.Time\n+}\n+\n+func main() {\n+\t// Validate input\n+\t// All flags are required\n+\tflag.Parse()\n+\tmissing := false\n+\tswitch {\n+\tcase len(*configFile) == 0:","path":"cmd/mkroot/main.go","position":43,"original_position":43,"commit_id":"496d9d98f45375ba15c318ce0f27f46c981af73d","original_commit_id":"496d9d98f45375ba15c318ce0f27f46c981af73d","user":{"login":"jsha","id":220205,"avatar_url":"https://avatars.githubusercontent.com/u/220205?v=3","gravatar_id":"","url":"https://api.github.com/users/jsha","html_url":"https://github.com/jsha","followers_url":"https://api.github.com/users/jsha/followers","following_url":"https://api.github.com/users/jsha/following{/other_user}","gists_url":"https://api.github.com/users/jsha/gists{/gist_id}","starred_url":"https://api.github.com/users/jsha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsha/subscriptions","organizations_url":"https://api.github.com/users/jsha/orgs","repos_url":"https://api.github.com/users/jsha/repos","events_url":"https://api.github.com/users/jsha/events{/privacy}","received_events_url":"https://api.github.com/users/jsha/received_events","type":"User","site_admin":false},"body":"In future you can simplify this case with `flag.Visitall(fn func(*Flag))`, which visits even unset flags.","created_at":"2015-03-12T18:37:48Z","updated_at":"2015-03-12T18:37:48Z","html_url":"https://github.com/letsencrypt/boulder/pull/30#discussion_r26331393","pull_request_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments/26331393"},"html":{"href":"https://github.com/letsencrypt/boulder/pull/30#discussion_r26331393"},"pull_request":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/letsencrypt/boulder/pulls/30","id":31010663,"html_url":"https://github.com/letsencrypt/boulder/pull/30","diff_url":"https://github.com/letsencrypt/boulder/pull/30.diff","patch_url":"https://github.com/letsencrypt/boulder/pull/30.patch","issue_url":"https://api.github.com/repos/letsencrypt/boulder/issues/30","number":30,"state":"open","locked":false,"title":"Add mkroot and mkcrl","user":{"login":"bifurcation","id":75597,"avatar_url":"https://avatars.githubusercontent.com/u/75597?v=3","gravatar_id":"","url":"https://api.github.com/users/bifurcation","html_url":"https://github.com/bifurcation","followers_url":"https://api.github.com/users/bifurcation/followers","following_url":"https://api.github.com/users/bifurcation/following{/other_user}","gists_url":"https://api.github.com/users/bifurcation/gists{/gist_id}","starred_url":"https://api.github.com/users/bifurcation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifurcation/subscriptions","organizations_url":"https://api.github.com/users/bifurcation/orgs","repos_url":"https://api.github.com/users/bifurcation/repos","events_url":"https://api.github.com/users/bifurcation/events{/privacy}","received_events_url":"https://api.github.com/users/bifurcation/received_events","type":"User","site_admin":false},"body":"These are scripts that provide thin wrappers around the Go X.509 libraries for two specific purposes.  We may ultimately end up not needing them, or moving the functionality over to CFSSL (especially for CRLs).  But it seems worth tracking them in the mean time.","created_at":"2015-03-12T06:10:47Z","updated_at":"2015-03-12T18:37:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58e53a71b0cee49dde894552288eb7b9a211066e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/30/commits","review_comments_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/30/comments","review_comment_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/letsencrypt/boulder/issues/30/comments","statuses_url":"https://api.github.com/repos/letsencrypt/boulder/statuses/496d9d98f45375ba15c318ce0f27f46c981af73d","head":{"label":"bifurcation:mkstuff","ref":"mkstuff","sha":"496d9d98f45375ba15c318ce0f27f46c981af73d","user":{"login":"bifurcation","id":75597,"avatar_url":"https://avatars.githubusercontent.com/u/75597?v=3","gravatar_id":"","url":"https://api.github.com/users/bifurcation","html_url":"https://github.com/bifurcation","followers_url":"https://api.github.com/users/bifurcation/followers","following_url":"https://api.github.com/users/bifurcation/following{/other_user}","gists_url":"https://api.github.com/users/bifurcation/gists{/gist_id}","starred_url":"https://api.github.com/users/bifurcation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifurcation/subscriptions","organizations_url":"https://api.github.com/users/bifurcation/orgs","repos_url":"https://api.github.com/users/bifurcation/repos","events_url":"https://api.github.com/users/bifurcation/events{/privacy}","received_events_url":"https://api.github.com/users/bifurcation/received_events","type":"User","site_admin":false},"repo":{"id":31672944,"name":"boulder","full_name":"bifurcation/boulder","owner":{"login":"bifurcation","id":75597,"avatar_url":"https://avatars.githubusercontent.com/u/75597?v=3","gravatar_id":"","url":"https://api.github.com/users/bifurcation","html_url":"https://github.com/bifurcation","followers_url":"https://api.github.com/users/bifurcation/followers","following_url":"https://api.github.com/users/bifurcation/following{/other_user}","gists_url":"https://api.github.com/users/bifurcation/gists{/gist_id}","starred_url":"https://api.github.com/users/bifurcation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifurcation/subscriptions","organizations_url":"https://api.github.com/users/bifurcation/orgs","repos_url":"https://api.github.com/users/bifurcation/repos","events_url":"https://api.github.com/users/bifurcation/events{/privacy}","received_events_url":"https://api.github.com/users/bifurcation/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bifurcation/boulder","description":"An ACME-based CA, written in Go.","fork":true,"url":"https://api.github.com/repos/bifurcation/boulder","forks_url":"https://api.github.com/repos/bifurcation/boulder/forks","keys_url":"https://api.github.com/repos/bifurcation/boulder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bifurcation/boulder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bifurcation/boulder/teams","hooks_url":"https://api.github.com/repos/bifurcation/boulder/hooks","issue_events_url":"https://api.github.com/repos/bifurcation/boulder/issues/events{/number}","events_url":"https://api.github.com/repos/bifurcation/boulder/events","assignees_url":"https://api.github.com/repos/bifurcation/boulder/assignees{/user}","branches_url":"https://api.github.com/repos/bifurcation/boulder/branches{/branch}","tags_url":"https://api.github.com/repos/bifurcation/boulder/tags","blobs_url":"https://api.github.com/repos/bifurcation/boulder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bifurcation/boulder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bifurcation/boulder/git/refs{/sha}","trees_url":"https://api.github.com/repos/bifurcation/boulder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bifurcation/boulder/statuses/{sha}","languages_url":"https://api.github.com/repos/bifurcation/boulder/languages","stargazers_url":"https://api.github.com/repos/bifurcation/boulder/stargazers","contributors_url":"https://api.github.com/repos/bifurcation/boulder/contributors","subscribers_url":"https://api.github.com/repos/bifurcation/boulder/subscribers","subscription_url":"https://api.github.com/repos/bifurcation/boulder/subscription","commits_url":"https://api.github.com/repos/bifurcation/boulder/commits{/sha}","git_commits_url":"https://api.github.com/repos/bifurcation/boulder/git/commits{/sha}","comments_url":"https://api.github.com/repos/bifurcation/boulder/comments{/number}","issue_comment_url":"https://api.github.com/repos/bifurcation/boulder/issues/comments{/number}","contents_url":"https://api.github.com/repos/bifurcation/boulder/contents/{+path}","compare_url":"https://api.github.com/repos/bifurcation/boulder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bifurcation/boulder/merges","archive_url":"https://api.github.com/repos/bifurcation/boulder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bifurcation/boulder/downloads","issues_url":"https://api.github.com/repos/bifurcation/boulder/issues{/number}","pulls_url":"https://api.github.com/repos/bifurcation/boulder/pulls{/number}","milestones_url":"https://api.github.com/repos/bifurcation/boulder/milestones{/number}","notifications_url":"https://api.github.com/repos/bifurcation/boulder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bifurcation/boulder/labels{/name}","releases_url":"https://api.github.com/repos/bifurcation/boulder/releases{/id}","created_at":"2015-03-04T18:31:22Z","updated_at":"2015-03-04T18:31:22Z","pushed_at":"2015-03-12T06:09:36Z","git_url":"git://github.com/bifurcation/boulder.git","ssh_url":"git@github.com:bifurcation/boulder.git","clone_url":"https://github.com/bifurcation/boulder.git","svn_url":"https://github.com/bifurcation/boulder","homepage":null,"size":306,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"letsencrypt:master","ref":"master","sha":"9146d60c0c5b51777b9e67a8c67c570a272be44e","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-03-12T05:19:17Z","pushed_at":"2015-03-11T18:34:39Z","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":767,"stargazers_count":223,"watchers_count":223,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":9,"forks":16,"open_issues":9,"watchers":223,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/30"},"html":{"href":"https://github.com/letsencrypt/boulder/pull/30"},"issue":{"href":"https://api.github.com/repos/letsencrypt/boulder/issues/30"},"comments":{"href":"https://api.github.com/repos/letsencrypt/boulder/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/letsencrypt/boulder/statuses/496d9d98f45375ba15c318ce0f27f46c981af73d"}}}}