-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Conversation
Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion. Commit jas-/node@2f80449b8e390e6045237f6e90c430818be18e91 has the following error(s):
The following commiters were not found in the CLA:
You can fix all these things without opening another issue. Please see CONTRIBUTING.md for more information |
assert.deepEqual(dh1.getPrime(), dh3.getPrime()); | ||
assert.deepEqual(dh1.getGenerator(), dh3.getGenerator()); | ||
assert.deepEqual(dh1.getPublicKey(), dh3.getPublicKey()); | ||
assert.deepEqual(dh1.getPrivateKey(), dh3.getPrivateKey()); | ||
|
||
console.log(dh1.getPrivateKey()); | ||
console.log(dh3.getPrivateKey()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extraneous?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I will remove this (I was looking into the assert.deepEqual() function regarding buffer comparisions). That should not have been in the pr
There's some style issues, and the binding should accept strings with an encoding, as well as buffers, and then pull the data out in C++. (Really, all of crypto should use the StringBytes api, but some of it is old and grimy.) It's late here, and I haven't reviewed it very carefully, so there may be other issues. As for the functionality itself, it seems useful enough to me, and doing this in userland is a huge PITA, so it kind of makes sense. @bnoordhuis, @indutny: what do you think? |
@jas- Also, please go to http://nodejs.org/cla.html and click the buttons to appease the legal gods. Thanks :) |
@jas- also you'll need to redo all your commit messages (remove the time stamp and prepend |
@@ -577,7 +577,26 @@ function pbkdf2(password, salt, iterations, keylen, callback) { | |||
} | |||
} | |||
|
|||
exports.Certificate = exports.Certificate = Certificate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
am I missing why the double assignation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mistake, thanks
@isaacs I filed out the required docs as asked. @trevnorris I did this over the weekend |
@jas- no other commands should be run with
From here switch all |
Also, you'll need to ditch the |
Well |
@jas- ok. then you'll need to force push by |
That did it. Thanks. I squashed all previous commits for brevity. |
HandleScope scope(node_isolate); | ||
|
||
EVP_PKEY *pkey = NULL; | ||
NETSCAPE_SPKI *spki = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: type*
, not type *
Certificate* certificate = ObjectWrap::Unwrap<Certificate>(args.This()); | ||
|
||
ASSERT_IS_BUFFER(args[0]); | ||
ssize_t length = Buffer::Length(args[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returns size_t
.
@jas- left a few comments. post again when they're cleaned up (github doesn't alert on force-push). |
@trevnorris Modifications complete. |
@jas- github is being really strange. just to double check, (assuming you have |
wait. seems you did. really strange. the file changes you pushed aren't showing up on the files tab, but the new commit shows up on the commit tab. |
@trevnorris It is the timestamp from the development server that affected that |
ah, there we go. @jas- ok. just a few more. (just trying to foresee anything @bnoordhuis might bring up. :) |
|
||
pkey = X509_PUBKEY_get(spki->spkac->pubkey); | ||
if (pkey == NULL) | ||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call NETSCAPE_SPKI_free() before returning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am embarrassed that I forgot this
Implements new class 'Certificate' within crypto object for working with SPKAC's (signed public key & challenge) bool Certificate::verifySpkac(buffer) buffer Certificate::exportPublicKey(buffer) buffer Certificate::exportChallenge(buffer)
The cc api has changed a bit since the v8 3.20 upgrade. Doesn't take much to correct, if you know the new API. Went ahead and did that for you. Also fixed a couple trailing white space, long line issues. Just run the following:
Then go ahead and Also for future reference, there's no need to place a |
+1 |
@jas- You still want to go through with this PR? It probably needs a little rebasing on top of Trevor's patch but IIRC it was close to finished last time I looked at it. |
@bnoordhuis Hello, yes I do. I will rebase it on top of @trevnorris's patch as suggested. Sorry about the delay. |
I am closing this request. Any future references should refer to pull request #6330 |
crypto: Implements new class 'Certificate' within crypto object
with (as of this commit) three new functions for working
with SPKAC's. Issue #5546 as discussed with @bnoordhuis
Also includes tests