{"action":"created","issue":{"url":"https://api.github.com/repos/PeculiarVentures/PKI.js/issues/171","repository_url":"https://api.github.com/repos/PeculiarVentures/PKI.js","labels_url":"https://api.github.com/repos/PeculiarVentures/PKI.js/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/PeculiarVentures/PKI.js/issues/171/comments","events_url":"https://api.github.com/repos/PeculiarVentures/PKI.js/issues/171/events","html_url":"https://github.com/PeculiarVentures/PKI.js/issues/171","id":319936865,"number":171,"title":"Set Extended Key Usage on Certificate","user":{"login":"hendrik-weiler","id":342368,"avatar_url":"https://avatars0.githubusercontent.com/u/342368?v=4","gravatar_id":"","url":"https://api.github.com/users/hendrik-weiler","html_url":"https://github.com/hendrik-weiler","followers_url":"https://api.github.com/users/hendrik-weiler/followers","following_url":"https://api.github.com/users/hendrik-weiler/following{/other_user}","gists_url":"https://api.github.com/users/hendrik-weiler/gists{/gist_id}","starred_url":"https://api.github.com/users/hendrik-weiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendrik-weiler/subscriptions","organizations_url":"https://api.github.com/users/hendrik-weiler/orgs","repos_url":"https://api.github.com/users/hendrik-weiler/repos","events_url":"https://api.github.com/users/hendrik-weiler/events{/privacy}","received_events_url":"https://api.github.com/users/hendrik-weiler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-03T14:09:00Z","updated_at":"2018-05-04T12:03:39Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\nim trying to create a certificate with an extended key usage extension.\r\n\r\nThats why i have so far:\r\n`\tvar keyPurpose = new BitString({ valueHex: bitArray });\r\n\tvar bitView2 = new Uint8Array(keyPurpose);\r\n\r\n\tbitView2[0] = bitView2[0] | 0x04;\r\n\r\n\tcertificate.extensions.push(new Extension({\r\n\t\textnID: \"2.5.29.37\",\r\n\t\tkeyPurposes : keyPurpose\r\n\t}));`\r\n\r\nWhat i want to set is the \"id-kp 4\" for E-Mail protection. (Source: http://www.alvestrand.no/objectid/2.5.29.37.html)\r\n\r\nWhat i get is \"asn1.js:151 Uncaught TypeError: Cannot read property 'slice' of undefined\".\r\n\r\nWhats the correct way to do it?"},"comment":{"url":"https://api.github.com/repos/PeculiarVentures/PKI.js/issues/comments/386580390","html_url":"https://github.com/PeculiarVentures/PKI.js/issues/171#issuecomment-386580390","issue_url":"https://api.github.com/repos/PeculiarVentures/PKI.js/issues/171","id":386580390,"user":{"login":"hendrik-weiler","id":342368,"avatar_url":"https://avatars0.githubusercontent.com/u/342368?v=4","gravatar_id":"","url":"https://api.github.com/users/hendrik-weiler","html_url":"https://github.com/hendrik-weiler","followers_url":"https://api.github.com/users/hendrik-weiler/followers","following_url":"https://api.github.com/users/hendrik-weiler/following{/other_user}","gists_url":"https://api.github.com/users/hendrik-weiler/gists{/gist_id}","starred_url":"https://api.github.com/users/hendrik-weiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendrik-weiler/subscriptions","organizations_url":"https://api.github.com/users/hendrik-weiler/orgs","repos_url":"https://api.github.com/users/hendrik-weiler/repos","events_url":"https://api.github.com/users/hendrik-weiler/events{/privacy}","received_events_url":"https://api.github.com/users/hendrik-weiler/received_events","type":"User","site_admin":false},"created_at":"2018-05-04T12:03:39Z","updated_at":"2018-05-04T12:03:39Z","author_association":"NONE","body":"Ok. I have now attached the code:\r\n[pki-es6.txt](https://github.com/PeculiarVentures/PKI.js/files/1974320/pki-es6.txt)\r\n"}}
{"actor":{"display_login":"hendrik-weiler"}}