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

Add keyPassphrase option to signer #115

Merged
merged 1 commit into from
Sep 10, 2020
Merged

Add keyPassphrase option to signer #115

merged 1 commit into from
Sep 10, 2020

Conversation

ashpieboop
Copy link
Contributor

Fix #81

Allow requests to be signed with a private key that is protected with a passphrase.

@jasonbking
Copy link
Contributor

Can you run 'make check' -- it looks like there's a couple of minor formatting errors -- can you fix this and update the PR?

@ashpieboop
Copy link
Contributor Author

There you go, fixed those.

However it looks like my make check couldn't complete because of missing dependencies (I don't have json in my path?):

$ make check

deps/javascriptlint/build/install/jsl --nologo --nosummary --conf=tools/jsl.node.conf lib/parser.js lib/signer.js lib/index.js lib/utils.js lib/verify.js
/r/arisu/dev/node-http-signature/lib/parser.js
/r/arisu/dev/node-http-signature/lib/signer.js
/r/arisu/dev/node-http-signature/lib/index.js
/r/arisu/dev/node-http-signature/lib/utils.js
/r/arisu/dev/node-http-signature/lib/verify.js
deps/jsstyle/jsstyle -f tools/jsstyle.conf lib/parser.js lib/signer.js lib/index.js lib/utils.js lib/verify.js
/bin/sh: json: command not found
version is:
[ "`cat package.json | json version`" = "`grep '^## ' CHANGES.md | head -2 | tail -1 | awk '{print $2}'`" ]
/bin/sh: json: command not found
make: *** [Makefile:32: check-version] Error 1

@jasonbking
Copy link
Contributor

It looks like the two issues are:

17:51:35  lib/signer.js: 108: line > 80 characters
17:51:35  lib/signer.js: 350: line > 80 characters

The json utility is:

json@10.0.0 | Proprietary | deps: none | versions: 16
a 'json' command for massaging and processing JSON on the command line
https://github.com/trentm/json#readme

keywords: json, jsontool, filter, command, shell

bin: json

dist
.tarball: https://registry.npmjs.org/json/-/json-10.0.0.tgz
.shasum: c49a939d4abc7067cc225419d5dd17ab7bf2f66c
.integrity: sha512-iK7tAZtpoghibjdB1ncCWykeBMmke3JThUe+rnkD4qkZaglOIQ70Pw7r5UJ4lyUT+7gnw7ehmmLUHDuhqzQD+g==
.unpackedSize: 122.1 kB

maintainers:
- trentm <trentm@gmail.com>

dist-tags:
latest: 10.0.0

published a week ago by trentm <trentm@gmail.com>

(i.e. npm install json).

@ashpieboop
Copy link
Contributor Author

Thanks for the help; since it is used by a dev tool I'd add it to dev dependencies and also add the make check as a lint script in package.json (I can make the PR if you want).

Anyway, the make check fully passes and there are no other problems.

@jasonbking jasonbking merged commit 241725d into TritonDataCenter:master Sep 10, 2020
@NigelNec
Copy link

Hello everyone,

When I download this package, I tried in 2 different projects, with "npm i http-signature@latest" the code from this PR is not included, the file "signer.js" is only 450 lines instead of 483.

My package.json indicates version 1.3.4

Am I doing something wrong?

Thanks in Advance,
Nigel

@ashpieboop
Copy link
Contributor Author

@NigelNec this package simply didn't get a release since this PR was merged (yet).

check the commit history

@NigelNec
Copy link

Understood, I'll download the zip file for now.
Thanks for the help

@jasonbking
Copy link
Contributor

I'll get a release cut and updated on npm. It'll probably be tomorrow when that happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Will not parse pem files that have a passphrase - solution offered
3 participants