{"action":"created","comment":{"url":"https://api.github.com/repos/eLBati/l10n-italy/pulls/comments/29318475","id":29318475,"diff_hunk":"@@ -1036,6 +1036,81 @@ def strip_xml_content(self, xml):\n                 elem.text = elem.text.strip()\n         return etree.tostring(root)\n \n+    def check_file_is_pem(self, p7m_file):\n+        file_is_pem = True\n+        strcmd = (\n+            'openssl asn1parse  -inform PEM -in %s'\n+        ) % (p7m_file)\n+        cmd = shlex.split(strcmd)\n+        try:\n+            proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)\n+            stdoutdata, stderrdata = proc.communicate()\n+            if proc.wait() != 0:\n+                file_is_pem = False\n+        except Exception as e:\n+            raise orm.except_orm(\n+                _('Errore'),\n+                _(\n+                    'Check PEM file %s'\n+                ) % e.args\n+            )\n+        return file_is_pem\n+\n+    def parse_pem_2_der(self, pem_file, tmp_der_file):\n+        strcmd = (\n+            'openssl asn1parse -in %s -out %s'\n+        ) % (pem_file, tmp_der_file)\n+        cmd = shlex.split(strcmd)\n+        try:\n+            proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)\n+            stdoutdata, stderrdata = proc.communicate()\n+            if proc.wait() != 0:\n+                _logger.warning(stdoutdata)\n+                raise Exception(stderrdata)\n+            if not os.path.isfile(tmp_der_file):\n+                raise orm.except_orm(","path":"l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py","position":36,"original_position":36,"commit_id":"0887c2d3bb8c8adb097b03d53f7ca7ea7febae3d","original_commit_id":"0887c2d3bb8c8adb097b03d53f7ca7ea7febae3d","user":{"login":"archetipo","id":5037557,"avatar_url":"https://avatars.githubusercontent.com/u/5037557?v=3","gravatar_id":"","url":"https://api.github.com/users/archetipo","html_url":"https://github.com/archetipo","followers_url":"https://api.github.com/users/archetipo/followers","following_url":"https://api.github.com/users/archetipo/following{/other_user}","gists_url":"https://api.github.com/users/archetipo/gists{/gist_id}","starred_url":"https://api.github.com/users/archetipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archetipo/subscriptions","organizations_url":"https://api.github.com/users/archetipo/orgs","repos_url":"https://api.github.com/users/archetipo/repos","events_url":"https://api.github.com/users/archetipo/events{/privacy}","received_events_url":"https://api.github.com/users/archetipo/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2015-04-29T08:41:37Z","updated_at":"2015-04-29T08:41:37Z","html_url":"https://github.com/eLBati/l10n-italy/pull/45#discussion_r29318475","pull_request_url":"https://api.github.com/repos/eLBati/l10n-italy/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/eLBati/l10n-italy/pulls/comments/29318475"},"html":{"href":"https://github.com/eLBati/l10n-italy/pull/45#discussion_r29318475"},"pull_request":{"href":"https://api.github.com/repos/eLBati/l10n-italy/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/eLBati/l10n-italy/pulls/45","id":34263165,"html_url":"https://github.com/eLBati/l10n-italy/pull/45","diff_url":"https://github.com/eLBati/l10n-italy/pull/45.diff","patch_url":"https://github.com/eLBati/l10n-italy/pull/45.patch","issue_url":"https://api.github.com/repos/eLBati/l10n-italy/issues/45","number":45,"state":"open","locked":false,"title":"Fix fatturapa openssl","user":{"login":"archetipo","id":5037557,"avatar_url":"https://avatars.githubusercontent.com/u/5037557?v=3","gravatar_id":"","url":"https://api.github.com/users/archetipo","html_url":"https://github.com/archetipo","followers_url":"https://api.github.com/users/archetipo/followers","following_url":"https://api.github.com/users/archetipo/following{/other_user}","gists_url":"https://api.github.com/users/archetipo/gists{/gist_id}","starred_url":"https://api.github.com/users/archetipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archetipo/subscriptions","organizations_url":"https://api.github.com/users/archetipo/orgs","repos_url":"https://api.github.com/users/archetipo/repos","events_url":"https://api.github.com/users/archetipo/events{/privacy}","received_events_url":"https://api.github.com/users/archetipo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-28T12:52:48Z","updated_at":"2015-04-29T08:41:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6ba6d45e02a41190b16ce2f9a2faba3c657baeb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eLBati/l10n-italy/pulls/45/commits","review_comments_url":"https://api.github.com/repos/eLBati/l10n-italy/pulls/45/comments","review_comment_url":"https://api.github.com/repos/eLBati/l10n-italy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eLBati/l10n-italy/issues/45/comments","statuses_url":"https://api.github.com/repos/eLBati/l10n-italy/statuses/0887c2d3bb8c8adb097b03d53f7ca7ea7febae3d","head":{"label":"archetipo:fix_fatturapa_openssl","ref":"fix_fatturapa_openssl","sha":"0887c2d3bb8c8adb097b03d53f7ca7ea7febae3d","user":{"login":"archetipo","id":5037557,"avatar_url":"https://avatars.githubusercontent.com/u/5037557?v=3","gravatar_id":"","url":"https://api.github.com/users/archetipo","html_url":"https://github.com/archetipo","followers_url":"https://api.github.com/users/archetipo/followers","following_url":"https://api.github.com/users/archetipo/following{/other_user}","gists_url":"https://api.github.com/users/archetipo/gists{/gist_id}","starred_url":"https://api.github.com/users/archetipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archetipo/subscriptions","organizations_url":"https://api.github.com/users/archetipo/orgs","repos_url":"https://api.github.com/users/archetipo/repos","events_url":"https://api.github.com/users/archetipo/events{/privacy}","received_events_url":"https://api.github.com/users/archetipo/received_events","type":"User","site_admin":false},"repo":{"id":26489119,"name":"l10n-italy","full_name":"archetipo/l10n-italy","owner":{"login":"archetipo","id":5037557,"avatar_url":"https://avatars.githubusercontent.com/u/5037557?v=3","gravatar_id":"","url":"https://api.github.com/users/archetipo","html_url":"https://github.com/archetipo","followers_url":"https://api.github.com/users/archetipo/followers","following_url":"https://api.github.com/users/archetipo/following{/other_user}","gists_url":"https://api.github.com/users/archetipo/gists{/gist_id}","starred_url":"https://api.github.com/users/archetipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/archetipo/subscriptions","organizations_url":"https://api.github.com/users/archetipo/orgs","repos_url":"https://api.github.com/users/archetipo/repos","events_url":"https://api.github.com/users/archetipo/events{/privacy}","received_events_url":"https://api.github.com/users/archetipo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/archetipo/l10n-italy","description":"","fork":true,"url":"https://api.github.com/repos/archetipo/l10n-italy","forks_url":"https://api.github.com/repos/archetipo/l10n-italy/forks","keys_url":"https://api.github.com/repos/archetipo/l10n-italy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/archetipo/l10n-italy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/archetipo/l10n-italy/teams","hooks_url":"https://api.github.com/repos/archetipo/l10n-italy/hooks","issue_events_url":"https://api.github.com/repos/archetipo/l10n-italy/issues/events{/number}","events_url":"https://api.github.com/repos/archetipo/l10n-italy/events","assignees_url":"https://api.github.com/repos/archetipo/l10n-italy/assignees{/user}","branches_url":"https://api.github.com/repos/archetipo/l10n-italy/branches{/branch}","tags_url":"https://api.github.com/repos/archetipo/l10n-italy/tags","blobs_url":"https://api.github.com/repos/archetipo/l10n-italy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/archetipo/l10n-italy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/archetipo/l10n-italy/git/refs{/sha}","trees_url":"https://api.github.com/repos/archetipo/l10n-italy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/archetipo/l10n-italy/statuses/{sha}","languages_url":"https://api.github.com/repos/archetipo/l10n-italy/languages","stargazers_url":"https://api.github.com/repos/archetipo/l10n-italy/stargazers","contributors_url":"https://api.github.com/repos/archetipo/l10n-italy/contributors","subscribers_url":"https://api.github.com/repos/archetipo/l10n-italy/subscribers","subscription_url":"https://api.github.com/repos/archetipo/l10n-italy/subscription","commits_url":"https://api.github.com/repos/archetipo/l10n-italy/commits{/sha}","git_commits_url":"https://api.github.com/repos/archetipo/l10n-italy/git/commits{/sha}","comments_url":"https://api.github.com/repos/archetipo/l10n-italy/comments{/number}","issue_comment_url":"https://api.github.com/repos/archetipo/l10n-italy/issues/comments{/number}","contents_url":"https://api.github.com/repos/archetipo/l10n-italy/contents/{+path}","compare_url":"https://api.github.com/repos/archetipo/l10n-italy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/archetipo/l10n-italy/merges","archive_url":"https://api.github.com/repos/archetipo/l10n-italy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/archetipo/l10n-italy/downloads","issues_url":"https://api.github.com/repos/archetipo/l10n-italy/issues{/number}","pulls_url":"https://api.github.com/repos/archetipo/l10n-italy/pulls{/number}","milestones_url":"https://api.github.com/repos/archetipo/l10n-italy/milestones{/number}","notifications_url":"https://api.github.com/repos/archetipo/l10n-italy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/archetipo/l10n-italy/labels{/name}","releases_url":"https://api.github.com/repos/archetipo/l10n-italy/releases{/id}","created_at":"2014-11-11T14:45:22Z","updated_at":"2015-04-28T14:00:36Z","pushed_at":"2015-04-28T14:57:44Z","git_url":"git://github.com/archetipo/l10n-italy.git","ssh_url":"git@github.com:archetipo/l10n-italy.git","clone_url":"https://github.com/archetipo/l10n-italy.git","svn_url":"https://github.com/archetipo/l10n-italy","homepage":null,"size":5316,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"7.0"}},"base":{"label":"eLBati:imp_add_fattura_pa_in","ref":"imp_add_fattura_pa_in","sha":"3850b20f7279491b8cd9a9f2f7eef08e46c22113","user":{"login":"eLBati","id":1033131,"avatar_url":"https://avatars.githubusercontent.com/u/1033131?v=3","gravatar_id":"","url":"https://api.github.com/users/eLBati","html_url":"https://github.com/eLBati","followers_url":"https://api.github.com/users/eLBati/followers","following_url":"https://api.github.com/users/eLBati/following{/other_user}","gists_url":"https://api.github.com/users/eLBati/gists{/gist_id}","starred_url":"https://api.github.com/users/eLBati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLBati/subscriptions","organizations_url":"https://api.github.com/users/eLBati/orgs","repos_url":"https://api.github.com/users/eLBati/repos","events_url":"https://api.github.com/users/eLBati/events{/privacy}","received_events_url":"https://api.github.com/users/eLBati/received_events","type":"User","site_admin":false},"repo":{"id":21132003,"name":"l10n-italy","full_name":"eLBati/l10n-italy","owner":{"login":"eLBati","id":1033131,"avatar_url":"https://avatars.githubusercontent.com/u/1033131?v=3","gravatar_id":"","url":"https://api.github.com/users/eLBati","html_url":"https://github.com/eLBati","followers_url":"https://api.github.com/users/eLBati/followers","following_url":"https://api.github.com/users/eLBati/following{/other_user}","gists_url":"https://api.github.com/users/eLBati/gists{/gist_id}","starred_url":"https://api.github.com/users/eLBati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLBati/subscriptions","organizations_url":"https://api.github.com/users/eLBati/orgs","repos_url":"https://api.github.com/users/eLBati/repos","events_url":"https://api.github.com/users/eLBati/events{/privacy}","received_events_url":"https://api.github.com/users/eLBati/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eLBati/l10n-italy","description":"","fork":true,"url":"https://api.github.com/repos/eLBati/l10n-italy","forks_url":"https://api.github.com/repos/eLBati/l10n-italy/forks","keys_url":"https://api.github.com/repos/eLBati/l10n-italy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eLBati/l10n-italy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eLBati/l10n-italy/teams","hooks_url":"https://api.github.com/repos/eLBati/l10n-italy/hooks","issue_events_url":"https://api.github.com/repos/eLBati/l10n-italy/issues/events{/number}","events_url":"https://api.github.com/repos/eLBati/l10n-italy/events","assignees_url":"https://api.github.com/repos/eLBati/l10n-italy/assignees{/user}","branches_url":"https://api.github.com/repos/eLBati/l10n-italy/branches{/branch}","tags_url":"https://api.github.com/repos/eLBati/l10n-italy/tags","blobs_url":"https://api.github.com/repos/eLBati/l10n-italy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eLBati/l10n-italy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eLBati/l10n-italy/git/refs{/sha}","trees_url":"https://api.github.com/repos/eLBati/l10n-italy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eLBati/l10n-italy/statuses/{sha}","languages_url":"https://api.github.com/repos/eLBati/l10n-italy/languages","stargazers_url":"https://api.github.com/repos/eLBati/l10n-italy/stargazers","contributors_url":"https://api.github.com/repos/eLBati/l10n-italy/contributors","subscribers_url":"https://api.github.com/repos/eLBati/l10n-italy/subscribers","subscription_url":"https://api.github.com/repos/eLBati/l10n-italy/subscription","commits_url":"https://api.github.com/repos/eLBati/l10n-italy/commits{/sha}","git_commits_url":"https://api.github.com/repos/eLBati/l10n-italy/git/commits{/sha}","comments_url":"https://api.github.com/repos/eLBati/l10n-italy/comments{/number}","issue_comment_url":"https://api.github.com/repos/eLBati/l10n-italy/issues/comments{/number}","contents_url":"https://api.github.com/repos/eLBati/l10n-italy/contents/{+path}","compare_url":"https://api.github.com/repos/eLBati/l10n-italy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eLBati/l10n-italy/merges","archive_url":"https://api.github.com/repos/eLBati/l10n-italy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eLBati/l10n-italy/downloads","issues_url":"https://api.github.com/repos/eLBati/l10n-italy/issues{/number}","pulls_url":"https://api.github.com/repos/eLBati/l10n-italy/pulls{/number}","milestones_url":"https://api.github.com/repos/eLBati/l10n-italy/milestones{/number}","notifications_url":"https://api.github.com/repos/eLBati/l10n-italy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eLBati/l10n-italy/labels{/name}","releases_url":"https://api.github.com/repos/eLBati/l10n-italy/releases{/id}","created_at":"2014-06-23T15:45:18Z","updated_at":"2014-07-12T12:41:06Z","pushed_at":"2015-04-28T14:57:45Z","git_url":"git://github.com/eLBati/l10n-italy.git","ssh_url":"git@github.com:eLBati/l10n-italy.git","clone_url":"https://github.com/eLBati/l10n-italy.git","svn_url":"https://github.com/eLBati/l10n-italy","homepage":null,"size":5053,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eLBati/l10n-italy/pulls/45"},"html":{"href":"https://github.com/eLBati/l10n-italy/pull/45"},"issue":{"href":"https://api.github.com/repos/eLBati/l10n-italy/issues/45"},"comments":{"href":"https://api.github.com/repos/eLBati/l10n-italy/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/eLBati/l10n-italy/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/eLBati/l10n-italy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eLBati/l10n-italy/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/eLBati/l10n-italy/statuses/0887c2d3bb8c8adb097b03d53f7ca7ea7febae3d"}}}}