{"action":"created","issue":{"url":"https://api.github.com/repos/vpulim/node-soap/issues/800","repository_url":"https://api.github.com/repos/vpulim/node-soap","labels_url":"https://api.github.com/repos/vpulim/node-soap/issues/800/labels{/name}","comments_url":"https://api.github.com/repos/vpulim/node-soap/issues/800/comments","events_url":"https://api.github.com/repos/vpulim/node-soap/issues/800/events","html_url":"https://github.com/vpulim/node-soap/pull/800","id":135582840,"number":800,"title":"Remove assertions around location of BEGIN CERTIFICATE and END CERTIFICATE","user":{"login":"JosephJNK","id":1519098,"avatar_url":"https://avatars.githubusercontent.com/u/1519098?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephJNK","html_url":"https://github.com/JosephJNK","followers_url":"https://api.github.com/users/JosephJNK/followers","following_url":"https://api.github.com/users/JosephJNK/following{/other_user}","gists_url":"https://api.github.com/users/JosephJNK/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephJNK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephJNK/subscriptions","organizations_url":"https://api.github.com/users/JosephJNK/orgs","repos_url":"https://api.github.com/users/JosephJNK/repos","events_url":"https://api.github.com/users/JosephJNK/events{/privacy}","received_events_url":"https://api.github.com/users/JosephJNK/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-22T23:53:30Z","updated_at":"2016-02-24T21:00:32Z","closed_at":"2016-02-24T21:00:14Z","pull_request":{"url":"https://api.github.com/repos/vpulim/node-soap/pulls/800","html_url":"https://github.com/vpulim/node-soap/pull/800","diff_url":"https://github.com/vpulim/node-soap/pull/800.diff","patch_url":"https://github.com/vpulim/node-soap/pull/800.patch"},"body":"Currently node-soap throws an error if a certificate file does not have \"------ BEGIN CERTIFICATE ------\" as the first characters in the file. However, https://tools.ietf.org/html/rfc7468 provides a spec for encodings of X.509 certificates, and says:\r\n```\r\n\"Textual encoding begins with a line comprising \"-----BEGIN \", a label, and \"-----\", and ends with a line comprising \"-----END \", a label, and \"-----\".  Between these lines, or \"encapsulation boundaries\", are base64-encoded data according to Section 4 of [RFC4648].  (PEM [RFC1421] referred to this data as the \"encapsulated text portion\".)  Data before the encapsulation boundaries are permitted, and parsers MUST NOT malfunction when processing such data.\r\n```\r\nIn this PR I removed the check for BEGIN and END entirely. It may be possible to provide a more thorough verification while remaining true to the spec, by accepting a wider range of labels (such as \"TRUSTED CERTIFICATE\" in addition to \"CERTIFICATE\") and accepting them at any location in the file. I don't think this is worth it, though, as complete verification of the spec would be non-trivial, and since it's ultimately the receiving server's responsibility to validate the certificate."},"comment":{"url":"https://api.github.com/repos/vpulim/node-soap/issues/comments/188451336","html_url":"https://github.com/vpulim/node-soap/pull/800#issuecomment-188451336","issue_url":"https://api.github.com/repos/vpulim/node-soap/issues/800","id":188451336,"user":{"login":"herom","id":2472487,"avatar_url":"https://avatars.githubusercontent.com/u/2472487?v=3","gravatar_id":"","url":"https://api.github.com/users/herom","html_url":"https://github.com/herom","followers_url":"https://api.github.com/users/herom/followers","following_url":"https://api.github.com/users/herom/following{/other_user}","gists_url":"https://api.github.com/users/herom/gists{/gist_id}","starred_url":"https://api.github.com/users/herom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/herom/subscriptions","organizations_url":"https://api.github.com/users/herom/orgs","repos_url":"https://api.github.com/users/herom/repos","events_url":"https://api.github.com/users/herom/events{/privacy}","received_events_url":"https://api.github.com/users/herom/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T21:00:32Z","updated_at":"2016-02-24T21:00:32Z","body":"Merged. Thanks a lot @JosephJNK :+1: "}}