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

[NOT FO MERGE!] Nodefy #9

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

[NOT FO MERGE!] Nodefy #9

wants to merge 23 commits into from

Conversation

garex
Copy link

@garex garex commented Dec 10, 2016

It's not for MERGE! Only for discussing.

I played with this lib trying to replicate SignalCom keys export.
Some of changes can be used already: misspells, relative exports.

Other needs talks: base64 compatible to PEM, imports/DI.

@@ -79,7 +79,7 @@
}
};

if (typeof document !== 'undefiend') {
if (typeof document !== 'undefined') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лол, js такой js :-)

@garex
Copy link
Author

garex commented Dec 12, 2016

To test locally run:

sudo npm install -g https://github.com/garex/nodejs-gost-crypto/archive/nodefy.tar.gz
cd /tmp
wget https://www.contact-sys.com/files/redactor/files/TestContactKey.zip
unzip TestContactKey.zip -d TestContactKey
gost-export-signalcom-key --pse TestContactKey --key Keys/00000001.key

You should get:

-----BEGIN PRIVATE KEY-----
MEYCAQAwHQYGKoUDAgITMBMGByqFAwICIwEGCCqFAwcBAQICBCIEIG0GEmE3dhrH
zm1KfFDpKBWEmMydwcmP0hNKvXXbEbLO
-----END PRIVATE KEY-----
OK: Private SignalCom key successfully exported in STDOUT in "PEM" format.

* Always use promises
* Remove rand.opq as it's not used in export
* Store actual keys in fixtures also
* Add keys prefix to output
* Loop over keysPrefixes: 2001 and 2012
* Default of current dir to keys param
* Add secondary option
* Describe in package.json
* Output whole error and exit with code
* Add default current directory as container param
* Avoid rand.opq when exporting (signalcom)
* Optimize cli width and options width look
* Use short opts
* Output in PEM/DER formats
* Make node 0.10.x compatible
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.

3 participants