-
Notifications
You must be signed in to change notification settings - Fork 56
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
[WIP] lib: better ssh keypair library #209
Conversation
So why I wanted to do this is to always stay in sync with the version of openssl that Node.js are providing. Since this is crypto I think that is the best way, certainly better than relying on a third party to provide built binaries of the What I wrote in the other thread:
|
Can you take a look at the failing tests? |
@LinusU could you rebase on master? I've been fixing tests. |
9165365
to
244ed97
Compare
Rebased and the tests are now working 👍 I would like to provision my t2 just to see that it's working before merging this thought, just to see that the openssl generated keys works with dropbear ssh (there really isn't any reason why they shouldn't, nevertheless). |
@LinusU if this successfully provisions will it be ready to merge? I have a new T2 coming in today that I can try this out on. |
Absolutely, I just got back from traveling which is why I've been a bit more offline than usually. I'll still try to get it done in the nearest days but if it works for you then we are good to go! 👍 |
@LinusU I gave this a try and unfortunately it doesn't work. I printed out the contents of my Working:
Not Working (transferred by this library):
Where the Xs represent an encrypted key. I tried just removing the header and footer and adding |
Oh, I completely forgot about testing this... Looks like I'll have to do some more work on it than :) |
@LinusU mind if I close this for now to keep our PR tab clean? We currently have 12 open PRs that are in some state of completion. |
Go ahead, I might open a new one if I get the time :) |
This uses a library for generating ssh keypairs that links directly against openssl instead of invoking a different binary. Windows support is still kind of blocked on nodejs/node-v0.x-archive#4051, unless the user want's to install openssl or we somehow bundle it.
I just wrote the other library, LinusU/node-generate-rsa-keypair, which I have test for that makes sure it generates correct RSA keys. I haven't tested them with openssh yet.
I haven't tested this code at all, my tessel is a few kilometers away. Hopefully I'll have time for this tomorrow 😄