mirror of
https://github.com/andwati/kget-capture.git
synced 2026-10-18 03:02:56 +00:00
initial commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# Extension signing key
|
||||
|
||||
This directory holds the RSA key pair used to pin the extension's Chrome ID so
|
||||
it's identical across every install (needed so the native messaging host's
|
||||
`allowed_origins` can be hardcoded instead of asking each user to paste their
|
||||
extension ID).
|
||||
|
||||
- `kget-capture-private.pem` — **not committed** (see `.gitignore`). Keep it
|
||||
somewhere safe if you want to be able to reproduce the same key deterministically
|
||||
later; losing it just means a future re-key would get a new extension ID, it's
|
||||
not a security incident.
|
||||
- `kget-capture-public.der` / `kget-capture-public.b64` — derived from the
|
||||
private key. The base64 contents of `kget-capture-public.b64` is pasted
|
||||
verbatim into `extension/manifest.json`'s `"key"` field. These are already
|
||||
effectively public once checked into `manifest.json`, so committing them is
|
||||
fine (and `extension-id.txt` too).
|
||||
- `extension-id.txt` — the 32-character Chrome extension ID derived from the
|
||||
public key (also hardcoded into `native-host/com.kget_capture.host.json`).
|
||||
|
||||
## Regenerating (only if rotating the key)
|
||||
|
||||
```bash
|
||||
openssl genrsa -out keys/kget-capture-private.pem 2048
|
||||
openssl rsa -in keys/kget-capture-private.pem -pubout -outform DER -out keys/kget-capture-public.der
|
||||
openssl base64 -A -in keys/kget-capture-public.der -out keys/kget-capture-public.b64
|
||||
openssl dgst -sha256 -binary keys/kget-capture-public.der | head -c 16 | od -An -tx1 \
|
||||
| tr -d ' \n' | tr '0123456789abcdef' 'abcdefghijklmnop' > keys/extension-id.txt
|
||||
```
|
||||
|
||||
Rotating the key changes the extension ID, which means `extension/manifest.json`'s
|
||||
`"key"` and `native-host/com.kget_capture.host.json`'s `allowed_origins` both
|
||||
need updating to match.
|
||||
@@ -0,0 +1 @@
|
||||
lgkhlfhejbffjnpcdlpjclicihnbjijp
|
||||
@@ -0,0 +1 @@
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtM1nFg5pPd3UBzynUJHj6aUy7bjudZaX9AQTWGMqAX3fXylw1lubSzP1/BaS9ivvgOJg/loyEgzEZlcNPzblFVlg8BqEJ3tntdk2OzYvUs0pUdcPzzyjso9TykCkUUTI7ev8JkreW/FYlinfvNwSYN4/c1s3h8/I6XHtxOdmO1G3bS98+BQaXPldbDmxoKwyWR8u1f8gTO2Mg3GY4BHau3RWf1kgtNzh20p9wE3sEFdWkFu7ArgRCIrWLh6m3O6lolnHQSCWPwtOTx893Qkp9Eu6FwUnoWc8rsYx8sqa0eNCTCS6Kjr1Iu3yEJ5y9390jUiDZTQ/c62ueCTQaYv2bwIDAQAB
|
||||
Binary file not shown.
Reference in New Issue
Block a user