GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: improvements to crypto.markdown copy by estliberitas · Pull Request #5230 · nodejs/node

Conversation

@estliberitas

@estliberitas estliberitas commented Feb 15, 2016

Copy link
Copy Markdown
Contributor

Fix several typos. Add missing links.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mscdex mscdex added crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to Node.js documentation. labels Feb 15, 2016
@estliberitas

estliberitas commented Feb 15, 2016

Copy link
Copy Markdown
Contributor Author

Also, guys. While I've been working on this I've got a question about crypto.Certificate. Why is it not a static class or just an object with functions?
I could not find any reason for using crypto.Certificate as a class, because:

  1. crypto.Certificate just wraps C++ Certificate class
  2. C++ Certificate methods do not work with instance, just extract environment from it (one method only - Certificate::VerifySpkac())

So I guess there should be a reason for this. Like inheriting of AsyncWrap or MakeWeak makes sense with memory or handle management or so.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Feb 15, 2016

Copy link
Copy Markdown
Member

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell jasnell added the lts-watch-v4.x label Feb 15, 2016
@estliberitas estliberitas mentioned this pull request Feb 19, 2016
doc: markdown links do not turn into real links #5322
Closed
@Knighton910

Knighton910 commented Feb 19, 2016

Copy link
Copy Markdown

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@jasnell

jasnell commented Feb 19, 2016

Copy link
Copy Markdown
Member

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@estliberitas

estliberitas commented Feb 19, 2016

Copy link
Copy Markdown
Contributor Author

Guys, can anyone answer question above? Or should I create separate issue for this q?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Knighton910

Knighton910 commented Feb 19, 2016

Copy link
Copy Markdown

Personally, I'd open a separate Issue for it. That way someone will get to it faster & I'd cc some of the guys who worked on the crypto doc. But someone should get to it here, as well. This issue does have a crypto label on it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Feb 19, 2016

Copy link
Copy Markdown
Member

Not sure of the history on that class, it's likely just some left over legacy thing. Perhaps @indutny or @shigeki could shed some light on it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Feb 19, 2016

Copy link
Copy Markdown
Member

@nodejs/crypto

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Feb 20, 2016

Copy link
Copy Markdown
Member

Why is it not a static class or just an object with functions?

No reason except that it follows how other types are implemented.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@estliberitas

estliberitas commented Feb 20, 2016

Copy link
Copy Markdown
Contributor Author

@bnoordhuis Would it be a good idea to simplify things and, for example, put Certificate instance methods in crypto module? Or this is a case when beauty of consistency is preferred?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Feb 20, 2016

Copy link
Copy Markdown
Member

If it was new code, I would have pushed to implement it as static methods. But it's existing, working code; it would basically be an aesthetic change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Feb 20, 2016

Copy link
Copy Markdown
Member

aesthetic change

Then again, maybe not. Implementing it as static methods would eliminate the need for a persistent handle and that's never a bad thing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@estliberitas

estliberitas commented Feb 20, 2016

Copy link
Copy Markdown
Contributor Author

@bnoordhuis if it would be a change for the good of everyone, I'd like to implement it and let others judge it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Feb 20, 2016

Copy link
Copy Markdown
Member

Go ahead, I'll review it. Please make sure you read CONTRIBUTING.md first and that make test passes before you open the pull request. Cheers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Feb 20, 2016

Copy link
Copy Markdown
Member

We should first attempt to see how extensively the current API is used (cc @ChALkeR). The current API form would need to be deprecated. Seems like a good change to make.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ChALkeR

ChALkeR commented Feb 21, 2016

Copy link
Copy Markdown
Member

@estliberitas Can you split the actual (non-doc) change proposal into a separate issue, please?

@jasnell This is everything that I found for crypto.*\.Certificate (downloads/month on the left):

14264   diff-dom-2.0.0.tgz/venv/src/node-v4.1.1/test/parallel/test-crypto-certificate.js:21:var certificate = new crypto.Certificate();
483     webid-0.3.7.tgz/tls/index.js:12:var certificate = new crypto.Certificate()
483     webid-0.3.7.tgz/test/test.js:8:var certificate = new crypto.Certificate()
434     pn-1.0.0.tgz/crypto.js:5:  Certificate: { enumerable: true, value: crypto.Certificate },
60      biojs-vis-blast-0.1.5.tgz/node/test/simple/test-crypto-certificate.js:37:var certificate = new crypto.Certificate();
43      flush-all-0.1.1.tgz/node-v0.13/test/simple/test-crypto-certificate.js:37:var certificate = new crypto.Certificate();
38      node-core-test-simple-0.11.11.tgz/test-crypto-certificate.js:37:var certificate = new crypto.Certificate();

The first line actually looks as a diff-dom packaging error to me, I'm going to report that now.

Even given the false negatives, the usage looks very low, so I think that the change is possible here. It would still require several major releases, of course.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ChALkeR ChALkeR mentioned this pull request Feb 21, 2016
Do not package the venv dir (reduce the installed size 200x) fiduswriter/diffDOM#35
Closed
@estliberitas

estliberitas commented Feb 21, 2016

Copy link
Copy Markdown
Contributor Author

Cool, okay, I'll be working on it today.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Feb 21, 2016

Copy link
Copy Markdown
Member

@ChALkeR +1 thank you for that. So yeah @estliberitas, The existing API would need to go through a deprecation cycle (do a quick search for "deprecated" in the source to see how that's handled in code). The documentation would also need to be updated to show that. Deprecations are a semver-major change so it would hit as part of v6. You can introduce the revamped API alongside the deprecation but the existing stuff cannot be removed until at least v7 or v8. If you need any help, let one of us know!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@estliberitas

estliberitas commented Feb 21, 2016

Copy link
Copy Markdown
Contributor Author

@jasnell Okay, I want to walk the whole way to the new API even if it will be released with v8 or so. I'll check soon how deprecations were handled previously. I guess, it is to be a series of 2 PRs:

  1. Wrap existing API in internal/util.deprecate() and introduce another API.
  2. Remove old API.

Correct?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@johanneswilm

johanneswilm commented Feb 21, 2016

Copy link
Copy Markdown

The first line actually looks as a diff-dom packaging error to me, I'm going to report that now.

Indeed. Should be fixed in version 2.0.1

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Feb 21, 2016

Copy link
Copy Markdown
Member

Maybe I didn't make myself clear but I wouldn't change the public API, just the implementation details so the persistent handle is no longer necessary.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@estliberitas

estliberitas commented Feb 21, 2016

Copy link
Copy Markdown
Contributor Author

@bnoordhuis

Then again, maybe not. Implementing it as static methods would eliminate the need for a persistent handle and that's never a bad thing.

So this is about binding implementation?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Feb 21, 2016

Copy link
Copy Markdown
Member

Correct.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ChALkeR

ChALkeR commented Feb 21, 2016

Copy link
Copy Markdown
Member

@jasnell

Deprecations are a semver-major change so it would hit as part of v6. You can introduce the revamped API alongside the deprecation but the existing stuff cannot be removed until at least v7 or v8.

I'd go with a documentation-only deprecation in v6, actual deprecation in v7 (perhaps), and possible removal at some point after that (in v8 or later).

These npm greps are not the absolute source of information — someone could be using this in their private code (e.g. their website apps etc). Also, there could be false negatives even in the data that I have.

We should take into account that crypto module is labeled Stable in the docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@estliberitas

estliberitas commented Feb 23, 2016

Copy link
Copy Markdown
Contributor Author

@bnoordhuis

Correct.

Would it be semver-(minor|major)? I guess, no, thus no new public API is added and existing is not changed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Feb 23, 2016

Copy link
Copy Markdown
Member

It could be semver-patch but because it's not a real bug fix, I'd be conservative and label it semver-minor.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@estliberitas estliberitas mentioned this pull request Feb 23, 2016
crypto: simplify Certificate class bindings #5382
Closed
4 tasks done
silverwind
silverwind reviewed Feb 27, 2016
View reviewed changes
Comment thread doc/api/crypto.markdown Outdated

@silverwind silverwind Feb 27, 2016

Copy link
Copy Markdown
Contributor

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.

where does this writable-write link to?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@silverwind silverwind Feb 27, 2016

Copy link
Copy Markdown
Contributor

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.

Oh, found it. maybe name it stream-writable-write for clarity?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@estliberitas estliberitas Feb 27, 2016

Copy link
Copy Markdown
Contributor Author

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.

@silverwind done

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@silverwind

silverwind commented Feb 27, 2016

Copy link
Copy Markdown
Contributor

LGTM except suggestion above.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Feb 28, 2016

Copy link
Copy Markdown
Contributor

@estliberitas still not applying cleanly here:

Error: git am exited with code: 128
.git/rebase-apply/patch:590: trailing whitespace.
[`ecdh.setPrivateKey()`]: #crypto_ecdh_setprivatekey_private_key_encoding
.git/rebase-apply/patch:596: trailing whitespace.
[`hmac.digest()`]: #crypto_hmac_digest_encoding
error: patch failed: doc/api/crypto.markdown:899
error: doc/api/crypto.markdown: patch does not apply
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@estliberitas
doc: improvements to crypto.markdown copy
8999292
Fix several typos. Add missing links.
@estliberitas

estliberitas commented Feb 28, 2016

Copy link
Copy Markdown
Contributor Author

@silverwind Done.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

silverwind pushed a commit that referenced this pull request Feb 28, 2016
@estliberitas @silverwind
doc: improvements to crypto.markdown copy
f0c0614
Fix several typos. Add missing links.

PR-URL: #5230
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Kelvin Knighton <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
@silverwind

silverwind commented Feb 28, 2016

Copy link
Copy Markdown
Contributor

Thanks! Landed in f0c0614.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind silverwind closed this Feb 28, 2016
@estliberitas
estliberitas deleted the doc-fix-crypto branch February 28, 2016 21:13
@Fishrock123 Fishrock123 mentioned this pull request Mar 1, 2016
Release proposal: v5.7.1 #5464
Merged
5 tasks done
MylesBorins pushed a commit that referenced this pull request Mar 1, 2016
@estliberitas Myles Borins
doc: improvements to crypto.markdown copy
6a42204
Fix several typos. Add missing links.

PR-URL: #5230
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Kelvin Knighton <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
@MylesBorins MylesBorins added land-on-v4.x and removed lts-watch-v4.x labels Mar 1, 2016
MylesBorins pushed a commit that referenced this pull request Mar 1, 2016
@estliberitas Myles Borins
doc: improvements to crypto.markdown copy
e355f13
Fix several typos. Add missing links.

PR-URL: #5230
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Kelvin Knighton <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Fishrock123 pushed a commit that referenced this pull request Mar 2, 2016
@estliberitas @Fishrock123
doc: improvements to crypto.markdown copy
ea8331e
Fix several typos. Add missing links.

PR-URL: #5230
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Kelvin Knighton <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
@estliberitas Myles Borins
doc: improvements to crypto.markdown copy
2f6cf0a
Fix several typos. Add missing links.

PR-URL: #5230
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Kelvin Knighton <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to Node.js documentation.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

9 participants

@estliberitas @jasnell @Knighton910 @bnoordhuis @ChALkeR @johanneswilm @silverwind @mscdex @MylesBorins
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.