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

src: make root_cert_vector function scoped #12788

Closed

Conversation

@danbev
Copy link
Member

commented May 2, 2017

root_cert_vector currently has file scope and external linkage, but is
only used in the NewRootCertsStore function. If this is not required to
be externally linked perhaps it can be changed to be static and function
scoped instead.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src

src: make root_cert_vector function scoped
root_cert_vector currently has file scope and external linkage, but is
only used in the NewRootCertsStore function. If this is not required to
be externally linked perhaps it can be changed to be static and function
scoped instead.
@danbev

This comment has been minimized.

Copy link
Member Author

commented May 2, 2017

@addaleax

This comment has been minimized.

Copy link
Member

commented May 2, 2017

LGTM but it might be good for somebody from @nodejs/crypto to confirm that this is really really safe ;)

@cjihrig
cjihrig approved these changes May 2, 2017
@jasnell
jasnell approved these changes May 2, 2017
Copy link
Member

left a comment

LGTM but let's definitely get @shigeki or @indutny to sign off

@shigeki
shigeki approved these changes May 3, 2017
Copy link
Contributor

left a comment

I've confirmed that it is initialized with builtin root certs only at the first time and works fine. LGTM.

@danbev

This comment has been minimized.

Copy link
Member Author

commented May 4, 2017

test/windows-fanned does not look related to this:

not ok 356 sequential/test-benchmark-child-process
  ---
  duration_ms: 60.128
  severity: fail
  stack: |-
    timeout
danbev added a commit to danbev/node that referenced this pull request May 4, 2017
src: make root_cert_vector function scoped
root_cert_vector currently has file scope and external linkage, but is
only used in the NewRootCertsStore function. If this is not required to
be externally linked perhaps it can be changed to be static and function
scoped instead.

PR-URL: nodejs#12788
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
@danbev

This comment has been minimized.

Copy link
Member Author

commented May 4, 2017

Landed in d0c968e

@danbev danbev closed this May 4, 2017

@danbev danbev deleted the danbev:crypo-make-root_certs_vector-static branch May 4, 2017

@refack

This comment has been minimized.

Copy link
Member

commented May 4, 2017

test/windows-fanned does not look related to this:

Yep, related to #12821

anchnk pushed a commit to anchnk/node that referenced this pull request May 6, 2017
src: make root_cert_vector function scoped
root_cert_vector currently has file scope and external linkage, but is
only used in the NewRootCertsStore function. If this is not required to
be externally linked perhaps it can be changed to be static and function
scoped instead.

PR-URL: nodejs#12788
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
@jasnell jasnell referenced this pull request May 11, 2017
@gibfahn gibfahn referenced this pull request Jun 15, 2017
2 of 3 tasks complete
@gibfahn

This comment has been minimized.

Copy link
Member

commented Jun 18, 2017

Is this okay for v6.x? It cherry-picks cleanly if so.

@sam-github

This comment has been minimized.

Copy link
Member

commented Jul 21, 2017

@addaleax why not land? not necessary?

#13194 would cherry-pick clean if this was landed, and this still cherry picks clean

@MylesBorins I recommend landing #12788 and then #13194, no conflicts if you do it in that order.

@sam-github sam-github referenced this pull request Jul 21, 2017
2 of 2 tasks complete
@addaleax

This comment has been minimized.

Copy link
Member

commented Jul 21, 2017

@addaleax why not land? not necessary?

Yes, in combination with a tiny chance of breakage. I assume it’s a good sign nobody complained about this change, so I don’t feel strongly. :)

sam-github added a commit that referenced this pull request Jul 21, 2017
src: make root_cert_vector function scoped
root_cert_vector currently has file scope and external linkage, but is
only used in the NewRootCertsStore function. If this is not required to
be externally linked perhaps it can be changed to be static and function
scoped instead.

PR-URL: #12788
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
@sam-github

This comment has been minimized.

Copy link
Member

commented Jul 21, 2017

@addaleax OK, wanted to make sure there wasn't some more fundamental problem with it.

landed on v6.x-staging, @nodejs/backporting

MylesBorins added a commit that referenced this pull request Aug 1, 2017
src: make root_cert_vector function scoped
root_cert_vector currently has file scope and external linkage, but is
only used in the NewRootCertsStore function. If this is not required to
be externally linked perhaps it can be changed to be static and function
scoped instead.

PR-URL: #12788
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
MylesBorins added a commit that referenced this pull request Aug 12, 2017
src: make root_cert_vector function scoped
root_cert_vector currently has file scope and external linkage, but is
only used in the NewRootCertsStore function. If this is not required to
be externally linked perhaps it can be changed to be static and function
scoped instead.

PR-URL: #12788
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
@MylesBorins MylesBorins referenced this pull request Aug 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.