{"action":"created","issue":{"url":"https://api.github.com/repos/cisco/node-jose/issues/69","repository_url":"https://api.github.com/repos/cisco/node-jose","labels_url":"https://api.github.com/repos/cisco/node-jose/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/cisco/node-jose/issues/69/comments","events_url":"https://api.github.com/repos/cisco/node-jose/issues/69/events","html_url":"https://github.com/cisco/node-jose/issues/69","id":167690945,"number":69,"title":"Cannot add private PEM key to storage","user":{"login":"mirik123","id":9895557,"avatar_url":"https://avatars.githubusercontent.com/u/9895557?v=3","gravatar_id":"","url":"https://api.github.com/users/mirik123","html_url":"https://github.com/mirik123","followers_url":"https://api.github.com/users/mirik123/followers","following_url":"https://api.github.com/users/mirik123/following{/other_user}","gists_url":"https://api.github.com/users/mirik123/gists{/gist_id}","starred_url":"https://api.github.com/users/mirik123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirik123/subscriptions","organizations_url":"https://api.github.com/users/mirik123/orgs","repos_url":"https://api.github.com/users/mirik123/repos","events_url":"https://api.github.com/users/mirik123/events{/privacy}","received_events_url":"https://api.github.com/users/mirik123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-26T19:28:41Z","updated_at":"2016-08-01T17:01:32Z","closed_at":null,"body":"I receive an error \"no importer for key\" when try to add private key to keystore.\r\n```javascript\r\nvar privkey = fs.readFileSync('/certs/key.pem');\r\nvar jose = require('node-jose');\r\nvar keystore = jose.JWK.createKeyStore();\r\nkeystore.add(privkey, 'pem')\r\n    .then(function (key) {\r\n        joseprivkey = key;\r\n    },\r\n    function (err) {\r\n        console.error('Failed to create JWE key: ', err);\r\n});\r\n```\r\n\r\n**forge.asn1.validate errors:**\r\n[ECPrivateKey] Expected type \"16\", got \"3\"\r\n[ECPrivateKey] Expected tag class \"0\", got \"64\"\r\n\r\n**type**:      SEQUENCE, got BITSTRING\r\n**tag class**: UNIVERSAL, got APPLICATION\r\n\r\n**certificate**:\r\n```\r\n-----BEGIN RSA PRIVATE KEY-----\r\nProc-Type: 4,ENCRYPTED\r\nDEK-Info: AES-256-CBC,DA07AA34F2B9374D582546854D8362F5\r\nXXX\r\n-----END RSA PRIVATE KEY-----\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/cisco/node-jose/issues/comments/236641574","html_url":"https://github.com/cisco/node-jose/issues/69#issuecomment-236641574","issue_url":"https://api.github.com/repos/cisco/node-jose/issues/69","id":236641574,"user":{"login":"linuxwolf","id":757401,"avatar_url":"https://avatars.githubusercontent.com/u/757401?v=3","gravatar_id":"","url":"https://api.github.com/users/linuxwolf","html_url":"https://github.com/linuxwolf","followers_url":"https://api.github.com/users/linuxwolf/followers","following_url":"https://api.github.com/users/linuxwolf/following{/other_user}","gists_url":"https://api.github.com/users/linuxwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/linuxwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linuxwolf/subscriptions","organizations_url":"https://api.github.com/users/linuxwolf/orgs","repos_url":"https://api.github.com/users/linuxwolf/repos","events_url":"https://api.github.com/users/linuxwolf/events{/privacy}","received_events_url":"https://api.github.com/users/linuxwolf/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T17:01:32Z","updated_at":"2016-08-01T17:01:32Z","body":"That is correct"}}
{"actor":{"display_login":"linuxwolf"}}