aed402c5d5
-- * DemoExtension/maindemo.js - added a Demo for retrieving the default signing key * src/Errors.js - add a new Error if no default key can be determined * src/Key.js added documentation and a TODO marker for hasSecret. * src/Keyring.js implemented getDefaultKey * src/permittedOperations.js: Added missing entry for verify, added config_opt |
||
---|---|---|
.. | ||
BrowserTestExtension | ||
DemoExtension | ||
src | ||
.babelrc | ||
.eslintrc.json | ||
build_extensions.sh | ||
CHECKLIST | ||
CHECKLIST_build | ||
package.json | ||
README | ||
README_testing | ||
unittest_inputvalues.js | ||
unittests.js | ||
webpack.conf_unittests.js | ||
webpack.conf.js |
gpgmejs, as contained in this directory, is a javascript library for direct use of gnupg in browsers, with the help of nativeMessaging. Installation ------------- gpgmejs uses webpack, and thus depends on nodejs for building. Webpack can be installed by running `npm install webpack webpack-cli --save-dev`. To create a current version of the package, the command is `npx webpack --config webpack.conf.js`. If you want a more debuggable (i.e. not minified) build, just change the mode in webpack.conf.js. Demo WebExtension: As soon as a bundled webpack is in dist/ the gpgmejs folder can just be included in the extensions tab of the browser in questions (extension debug mode needs to be active). For chrome, selecting the folder is sufficient, for firefox, the manifest.json needs to be selected. Please note that it is just for demonstration/debug purposes! In the browsers' nativeMessaging configuration folder a file 'gpgmejs.json' is needed, with the following content: (The path to the native app gpgme-json may need adaption) Chromium: ~/.config/chromium/NativeMessagingHosts/gpgmejson.json { "name": "gpgmejson", "description": "This is a test application for gpgmejs", "path": "/usr/bin/gpgme-json", "type": "stdio", "allowed_origins": ["chrome-extension://ExtensionIdentifier/"] } The ExtensionIdentifier can be seen on the chrome://extensions page, and changes on each reinstallation. Note the slashes in allowed_origins. Firefox: ~/.mozilla/native-messaging-hosts/gpgmejson.json { "name": "gpgmejson", "description": "This is a test application for gpgmejs", "path": "/usr/bin/gpgme-json", "type": "stdio", "allowed_extensions": ["ExtensionIdentifier@temporary-addon"] } The ExtensionIdentifier can be seen as Extension ID on the about:addons page if addon-debugging is active. In firefox, the temporary addon is removed once firefox exits, and the identifier will need to be changed more often.