{"action":"created","issue":{"url":"https://api.github.com/repos/pyca/cryptography/issues/3080","repository_url":"https://api.github.com/repos/pyca/cryptography","labels_url":"https://api.github.com/repos/pyca/cryptography/issues/3080/labels{/name}","comments_url":"https://api.github.com/repos/pyca/cryptography/issues/3080/comments","events_url":"https://api.github.com/repos/pyca/cryptography/issues/3080/events","html_url":"https://github.com/pyca/cryptography/pull/3080","id":169032784,"number":3080,"title":"[WIP] OCSP Request parsing","user":{"login":"reaperhulk","id":161495,"avatar_url":"https://avatars.githubusercontent.com/u/161495?v=3","gravatar_id":"","url":"https://api.github.com/users/reaperhulk","html_url":"https://github.com/reaperhulk","followers_url":"https://api.github.com/users/reaperhulk/followers","following_url":"https://api.github.com/users/reaperhulk/following{/other_user}","gists_url":"https://api.github.com/users/reaperhulk/gists{/gist_id}","starred_url":"https://api.github.com/users/reaperhulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reaperhulk/subscriptions","organizations_url":"https://api.github.com/users/reaperhulk/orgs","repos_url":"https://api.github.com/users/reaperhulk/repos","events_url":"https://api.github.com/users/reaperhulk/events{/privacy}","received_events_url":"https://api.github.com/users/reaperhulk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pyca/cryptography/labels/primitives","name":"primitives","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pyca/cryptography/milestones/17","html_url":"https://github.com/pyca/cryptography/milestones/Fifteenth%20release","labels_url":"https://api.github.com/repos/pyca/cryptography/milestones/17/labels","id":1807924,"number":17,"title":"Fifteenth release","description":"","creator":{"login":"alex","id":772,"avatar_url":"https://avatars.githubusercontent.com/u/772?v=3","gravatar_id":"","url":"https://api.github.com/users/alex","html_url":"https://github.com/alex","followers_url":"https://api.github.com/users/alex/followers","following_url":"https://api.github.com/users/alex/following{/other_user}","gists_url":"https://api.github.com/users/alex/gists{/gist_id}","starred_url":"https://api.github.com/users/alex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex/subscriptions","organizations_url":"https://api.github.com/users/alex/orgs","repos_url":"https://api.github.com/users/alex/repos","events_url":"https://api.github.com/users/alex/events{/privacy}","received_events_url":"https://api.github.com/users/alex/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":43,"state":"open","created_at":"2016-06-03T20:34:45Z","updated_at":"2016-08-17T02:39:31Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-08-03T02:23:27Z","updated_at":"2016-08-17T10:54:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pyca/cryptography/pulls/3080","html_url":"https://github.com/pyca/cryptography/pull/3080","diff_url":"https://github.com/pyca/cryptography/pull/3080.diff","patch_url":"https://github.com/pyca/cryptography/pull/3080.patch"},"body":"This adds support for OCSP request parsing. Still needed:\r\n\r\n- [ ] Documentation\r\n- [ ] Coverage"},"comment":{"url":"https://api.github.com/repos/pyca/cryptography/issues/comments/240378685","html_url":"https://github.com/pyca/cryptography/pull/3080#issuecomment-240378685","issue_url":"https://api.github.com/repos/pyca/cryptography/issues/3080","id":240378685,"user":{"login":"reaperhulk","id":161495,"avatar_url":"https://avatars.githubusercontent.com/u/161495?v=3","gravatar_id":"","url":"https://api.github.com/users/reaperhulk","html_url":"https://github.com/reaperhulk","followers_url":"https://api.github.com/users/reaperhulk/followers","following_url":"https://api.github.com/users/reaperhulk/following{/other_user}","gists_url":"https://api.github.com/users/reaperhulk/gists{/gist_id}","starred_url":"https://api.github.com/users/reaperhulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reaperhulk/subscriptions","organizations_url":"https://api.github.com/users/reaperhulk/orgs","repos_url":"https://api.github.com/users/reaperhulk/repos","events_url":"https://api.github.com/users/reaperhulk/events{/privacy}","received_events_url":"https://api.github.com/users/reaperhulk/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T10:54:34Z","updated_at":"2016-08-17T10:54:34Z","body":"Here's the official definition:\r\n\r\n```\r\n   OCSPRequest     ::=     SEQUENCE {\r\n       tbsRequest                  TBSRequest,\r\n       optionalSignature   [0]     EXPLICIT Signature OPTIONAL }\r\n\r\n   TBSRequest      ::=     SEQUENCE {\r\n       version             [0]     EXPLICIT Version DEFAULT v1,\r\n       requestorName       [1]     EXPLICIT GeneralName OPTIONAL,\r\n       requestList                 SEQUENCE OF Request,\r\n       requestExtensions   [2]     EXPLICIT Extensions OPTIONAL }\r\n\r\n   Signature       ::=     SEQUENCE {\r\n       signatureAlgorithm      AlgorithmIdentifier,\r\n       signature               BIT STRING,\r\n       certs               [0] EXPLICIT SEQUENCE OF Certificate\r\n   OPTIONAL}\r\n\r\n   Version         ::=             INTEGER  {  v1(0) }\r\n\r\n   Request         ::=     SEQUENCE {\r\n       reqCert                     CertID,\r\n       singleRequestExtensions     [0] EXPLICIT Extensions OPTIONAL }\r\n\r\n   CertID          ::=     SEQUENCE {\r\n       hashAlgorithm       AlgorithmIdentifier,\r\n       issuerNameHash      OCTET STRING, -- Hash of issuer's DN\r\n       issuerKeyHash       OCTET STRING, -- Hash of issuer's public key\r\n       serialNumber        CertificateSerialNumber }\r\n```\r\n\r\nFor this PR the idea was to create an `OCSPRequest` object but only expose the `requestList` (in the form of an iterable `OCSPRequest`). The `Request` object it returns exposes the `CertID` data directly, but doesn't support extensions yet.\r\n\r\nWe could potentially make `OCSPRequest` non-iterable and make a property called `requests` that returns a list. That list will only be one element long in almost all (all?) cases, but it might look a bit less crazy.\r\n\r\nOn the other hand, our convention in the X509 APIs is to have the object be iterable, so this would be inconsistent.\r\n\r\nOne other option would be to have methods to read the request information on `OCSPRequest` but have them assert that the number of requests is 1. If not, accessing those convenience methods would raise an exception and you would be required to iterate. In the common case this would be vastly more usable, but it's a pretty weird API."}}
{"actor":{"display_login":"reaperhulk"}}