{"action":"created","issue":{"url":"https://api.github.com/repos/containous/traefik/issues/635","repository_url":"https://api.github.com/repos/containous/traefik","labels_url":"https://api.github.com/repos/containous/traefik/issues/635/labels{/name}","comments_url":"https://api.github.com/repos/containous/traefik/issues/635/comments","events_url":"https://api.github.com/repos/containous/traefik/issues/635/events","html_url":"https://github.com/containous/traefik/issues/635","id":172329633,"number":635,"title":"How to revoke a Let's Encrypt cerificate?","user":{"login":"danielpetisme","id":593564,"avatar_url":"https://avatars.githubusercontent.com/u/593564?v=3","gravatar_id":"","url":"https://api.github.com/users/danielpetisme","html_url":"https://github.com/danielpetisme","followers_url":"https://api.github.com/users/danielpetisme/followers","following_url":"https://api.github.com/users/danielpetisme/following{/other_user}","gists_url":"https://api.github.com/users/danielpetisme/gists{/gist_id}","starred_url":"https://api.github.com/users/danielpetisme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielpetisme/subscriptions","organizations_url":"https://api.github.com/users/danielpetisme/orgs","repos_url":"https://api.github.com/users/danielpetisme/repos","events_url":"https://api.github.com/users/danielpetisme/events{/privacy}","received_events_url":"https://api.github.com/users/danielpetisme/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/containous/traefik/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-21T16:53:30Z","updated_at":"2016-08-31T19:05:14Z","closed_at":null,"body":"I configured traefik to with ACME, but now I have to revoke one of my certificate (to free the slot). \r\nBased on this thread [Certificate Revoke Steps](https://community.letsencrypt.org/t/certificate-revoke-steps/15746) I need the `pem` but traefik store everything in the JSON `storageFile`.\r\n\r\nDo I have to copy/paste a part of the content of the JSON file to create the certificate file?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/containous/traefik/issues/comments/243867456","html_url":"https://github.com/containous/traefik/issues/635#issuecomment-243867456","issue_url":"https://api.github.com/repos/containous/traefik/issues/635","id":243867456,"user":{"login":"danielpetisme","id":593564,"avatar_url":"https://avatars.githubusercontent.com/u/593564?v=3","gravatar_id":"","url":"https://api.github.com/users/danielpetisme","html_url":"https://github.com/danielpetisme","followers_url":"https://api.github.com/users/danielpetisme/followers","following_url":"https://api.github.com/users/danielpetisme/following{/other_user}","gists_url":"https://api.github.com/users/danielpetisme/gists{/gist_id}","starred_url":"https://api.github.com/users/danielpetisme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielpetisme/subscriptions","organizations_url":"https://api.github.com/users/danielpetisme/orgs","repos_url":"https://api.github.com/users/danielpetisme/repos","events_url":"https://api.github.com/users/danielpetisme/events{/privacy}","received_events_url":"https://api.github.com/users/danielpetisme/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T19:05:14Z","updated_at":"2016-08-31T19:05:14Z","body":"I finally succeed, the trick is that the `PrivateKey` and the `Certificate` are store in plain PEM format but `base64` encoded. Traefik use the `pem.EncodeToMemory` function and according to the source code of [`encoding/pem`](https://golang.org/src/encoding/pem/pem.go), the content is a `base64` encoded array of bytes. Once decoded the content is not binary (is a clear PEM format).\r\nFrom what I found only the Traefik default certificate is converted into [DER once generated].(https://github.com/containous/traefik/blob/master/acme/crypto.go#L45)\r\n\r\nSo finally \r\n```\r\ncat acme.json | head -n <lineOfthePrivateKey> | tail -n 1 | cut -d \":\" -f 2 | cut -d \"\\\"\" -f 2 | base64 --decode > private.key\r\ncat acme.json | head -n <lineOftheCertificate> | tail -n 1 | cut -d \":\" -f 2 | cut -d \"\\\"\" -f 2 | base64 --decode > certificate.pem\r\nletsencrypt/letsencrypt-auto revoke -d <domain> --cert-path ./certificate.pem --key-path private.key\r\n```\r\n\r\nI post the above ugly snippet to help people, I don't need a more elaborate script right now..."}}
{"actor":{"display_login":"danielpetisme"}}