test: add script to create 0-dns-cert.pem#11579
test: add script to create 0-dns-cert.pem#11579shigeki wants to merge 3 commits intonodejs:masterfrom
Conversation
0-dns-cert.pem and 0-dns-key.pem were stored in `test/fixtures/key` directory, but the cert file cannot be created with the openssl command via Makefile. Added a script to create it with using `asn1.js` and `asn1.js-rfc5280` and moved them out of key directory and put into `test/fixtures/0-dns`. The domains listed in the cert were also changed into example.com and example.org to show the use for only testing.
|
CI is running on https://ci.nodejs.org/job/node-test-pull-request/6602/ . |
|
To be the fix of #10228. |
|
The ci jobs was somehow removed. |
test/fixtures/0-dns/README.md
Outdated
test/fixtures/0-dns/createCert.js
Outdated
There was a problem hiding this comment.
you can wrap to 80 columns, and the backslash isn't necessary at end of line
test/fixtures/0-dns/createCert.js
Outdated
test/fixtures/0-dns/createCert.js
Outdated
There was a problem hiding this comment.
js files would be named create-cert.js
test/fixtures/0-dns/createCert.js
Outdated
There was a problem hiding this comment.
inconsistent casing, sometimes snake_case, sometimes camelCase, it looks like test/fixtures doesn't get linted
There was a problem hiding this comment.
id_at_commonName is named after the ASN.1 notation in RFC5280 which would come from OID name.
test/fixtures/0-dns/createCert.js
Outdated
There was a problem hiding this comment.
this isn't generally how node indents object literals
test/fixtures/0-dns/createCert.js
Outdated
There was a problem hiding this comment.
lacking before closing } here and a couple lines onwards
There was a problem hiding this comment.
Good to have a test description, it should be a capitalized and period terminated sentence.
|
Nice use of |
0920c23 to
fd05b71
Compare
|
I made eslint for $ ./node tools/eslint/bin/eslint.js --rulesdir=tools/eslint-rules test/fixtures/0-dns/create-cert.js --no-ignore
/home/sotsu/github/node/test/fixtures/0-dns/create-cert.js
1:1 error Mandatory module "common" must be loaded required-modules
✖ 1 problem (1 error, 0 warnings)I think it is not necessary for the script in fixtures. |
sam-github
left a comment
There was a problem hiding this comment.
Its still a mixture of snake_case and camelCase for vars, but basically LGTM
test/fixtures/0-dns/0-dns-cert.pem
Outdated
|
camelCase vars are used to follow ASN.1 notation in |
|
@indutny Please take a look of this if you have time for you are the author of |
|
I will land this tomorrow if there are no any comments. |
|
Landed in dacaaa5. Thanks. |
0-dns-cert.pem and 0-dns-key.pem were stored in `test/fixtures/key` directory, but the cert file cannot be created with the openssl command via Makefile. Added a script to create it with using `asn1.js` and `asn1.js-rfc5280` and moved them out of key directory and put into `test/fixtures/0-dns`. The domains listed in the cert were also changed into example.com and example.org to show the use for only testing. Fixes: #10228 PR-URL: #11579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
0-dns-cert.pem and 0-dns-key.pem were stored in `test/fixtures/key` directory, but the cert file cannot be created with the openssl command via Makefile. Added a script to create it with using `asn1.js` and `asn1.js-rfc5280` and moved them out of key directory and put into `test/fixtures/0-dns`. The domains listed in the cert were also changed into example.com and example.org to show the use for only testing. Fixes: nodejs#10228 PR-URL: nodejs#11579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
0-dns-cert.pem and 0-dns-key.pem were stored in `test/fixtures/key` directory, but the cert file cannot be created with the openssl command via Makefile. Added a script to create it with using `asn1.js` and `asn1.js-rfc5280` and moved them out of key directory and put into `test/fixtures/0-dns`. The domains listed in the cert were also changed into example.com and example.org to show the use for only testing. Fixes: nodejs#10228 PR-URL: nodejs#11579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
0-dns-cert.pem and 0-dns-key.pem were stored in `test/fixtures/key` directory, but the cert file cannot be created with the openssl command via Makefile. Added a script to create it with using `asn1.js` and `asn1.js-rfc5280` and moved them out of key directory and put into `test/fixtures/0-dns`. The domains listed in the cert were also changed into example.com and example.org to show the use for only testing. Fixes: #10228 PR-URL: #11579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
0-dns-cert.pem and 0-dns-key.pem were stored in `test/fixtures/key` directory, but the cert file cannot be created with the openssl command via Makefile. Added a script to create it with using `asn1.js` and `asn1.js-rfc5280` and moved them out of key directory and put into `test/fixtures/0-dns`. The domains listed in the cert were also changed into example.com and example.org to show the use for only testing. Fixes: #10228 PR-URL: #11579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
0-dns-cert.pem and 0-dns-key.pem were stored in `test/fixtures/key` directory, but the cert file cannot be created with the openssl command via Makefile. Added a script to create it with using `asn1.js` and `asn1.js-rfc5280` and moved them out of key directory and put into `test/fixtures/0-dns`. The domains listed in the cert were also changed into example.com and example.org to show the use for only testing. Fixes: nodejs/node#10228 PR-URL: nodejs/node#11579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
0-dns-cert.pem and 0-dns-key.pem were stored in
test/fixtures/keydirectory, but the cert file cannot be created with the openssl
command via Makefile.
make cleanremoves them but we could not re-create them.This added a script to create it with using
asn1.jsandasn1.js-rfc5280and moved them out of key directory and put intotest/fixtures/0-dns.The domains listed in the cert were also changed into example.com and
example.org to show the use for only testing.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test, tls
R: @indutny