Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate ECDSA P-256 SHA-256 signing scheme into telnet-client #39

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,18 @@ Types.
### Building a Signed Web Bundle

Signing a Web Bundle requires generating a private key. This only needs to be
done once,
done once; the supported algorithms are Ed25519 and ECDSA P-256 SHA-256.

```sh
openssl genpkey -algorithm ed25519 -out private.pem
```

or

```sh
openssl ecparam -name prime256v1 -genkey -noout -out private.pem
```

To build,

```sh
Expand Down
37 changes: 19 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"style-loader": "^3.3.1",
"ts-loader": "^9.3.0",
"typescript": "^4.6.4",
"wbn-sign": "0.1.0",
"webbundle-webpack-plugin": "0.1.3",
"wbn-sign": "0.1.3",
"webbundle-webpack-plugin": "0.1.5",
"webpack": "^5.76.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.9.0",
Expand Down
8 changes: 4 additions & 4 deletions webpack.wbn.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const common = require('./webpack.common.js');
const WebBundlePlugin = require('webbundle-webpack-plugin');
const { WebBundleId, parsePemKey } = require('wbn-sign');
const fs = require("fs");
require('dotenv').config({ path: '.env' });
require('dotenv').config({ path: '.env' });

const privateKeyFile = process.env.ED25519KEYFILE || "private.pem";
const privateKeyFile = process.env.KEYFILE || "private.pem";
let privateKey;
if (process.env.ED25519KEY) {
privateKey = process.env.ED25519KEY;
if (process.env.KEY) {
GrapeGreen marked this conversation as resolved.
Show resolved Hide resolved
privateKey = process.env.KEY;
} else if (fs.existsSync(privateKeyFile)) {
privateKey = fs.readFileSync(privateKeyFile);
}
Expand Down
Loading