-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into alicanc-run-tests
- Loading branch information
Showing
37 changed files
with
483 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
the first CA is a random CA not used in this test, to verify | ||
that multiple CAs work | ||
-----BEGIN CERTIFICATE----- | ||
MIIFjTCCA3WgAwIBAgIRANOxciY0IzLc9AUoUSrsnGowDQYJKoZIhvcNAQELBQAw | ||
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh | ||
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTYxMDA2MTU0MzU1 | ||
WhcNMjExMDA2MTU0MzU1WjBKMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg | ||
RW5jcnlwdDEjMCEGA1UEAxMaTGV0J3MgRW5jcnlwdCBBdXRob3JpdHkgWDMwggEi | ||
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCc0wzwWuUuR7dyXTeDs2hjMOrX | ||
NSYZJeG9vjXxcJIvt7hLQQWrqZ41CFjssSrEaIcLo+N15Obzp2JxunmBYB/XkZqf | ||
89B4Z3HIaQ6Vkc/+5pnpYDxIzH7KTXcSJJ1HG1rrueweNwAcnKx7pwXqzkrrvUHl | ||
Npi5y/1tPJZo3yMqQpAMhnRnyH+lmrhSYRQTP2XpgofL2/oOVvaGifOFP5eGr7Dc | ||
Gu9rDZUWfcQroGWymQQ2dYBrrErzG5BJeC+ilk8qICUpBMZ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+Ky0VgVUsfxo52mwFYs1JKY | ||
2PGDuWx8M6DlS6qQkvHaRUo0FMd8TsSlbF0/v965qGFKhSDeQoMpYnwcmQilRh/0 | ||
ayLThlHLN81gSkJjVrPI0Y8xCVPB4twb1PFUd2fPM3sA1tJ83sZ5v8vgFv2yofKR | ||
PB0t6JzUA81mSqM3kxl5e+IZwhYAyO0OTg3/fs8HqGTNKd9BqoUwSRBzp06JMg5b | ||
rUCGwbCUDI0mxadJ3Bz4WxR6fyNpBK2yAinWEsikxqEt | ||
-----END CERTIFICATE----- | ||
comments should be stripped | ||
-----BEGIN CERTIFICATE----- | ||
MIIDfzCCAmegAwIBAgIJAM4nWEf/MeHVMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV | ||
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg | ||
Q29tcGFueSBMdGQxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0xNjEwMTIwNTQ3NDla | ||
Fw0yNjEwMTAwNTQ3NDlaMFYxCzAJBgNVBAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0 | ||
IENpdHkxHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxEjAQBgNVBAMMCWxv | ||
Y2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALVCI5Ma6AR0 | ||
oDv/OqactDMR4pA6CZJnNDYbjRIkjsXi3pXuAXbQ8J/lD7EKNhu8wxrM0PZvdE1s | ||
ERjgFmZlYYTJkoDQUr9HagwAhAHrUuAq6FsmogLOl1L4QmeddCxExLdTePJAvVxc | ||
+fr3mk7I9Kt5FV1kDOZMyGqkLwKvcGXjx4ue+ZMgQZjWoU4Om7ktA57siAUkrxQg | ||
SonEnlSAlEQy6/wRSR2XQ85e+o1JHMIti4+h/Soo4BmHetec7zKvHjsL1kuT9s43 | ||
YiVlj660cc/Rmqt61OqPrumeKeVLRLmOD71l0yjU8QEwvAvvzFwdTZQSPUVGb4Je | ||
9Apxn7MNnKMCAwEAAaNQME4wHQYDVR0OBBYEFFzPIkvacjl8MFC6eRCwSTyW5z9c | ||
MB8GA1UdIwQYMBaAFFzPIkvacjl8MFC6eRCwSTyW5z9cMAwGA1UdEwQFMAMBAf8w | ||
DQYJKoZIhvcNAQELBQADggEBAKN9RXWgMuEwhLYzG///duWTcIC7UfamGDVlezxa | ||
BkR+VGkRSlo4v+MaZKscG2D/NGh4PP5PQZr7okLQY6MIKmcFkIN1BDziEVfKICFs | ||
AIrcajDLyHaLcAmZv2VJe1sz12pmGZG7uTOncMAngZoNDNI0f4djzvmRd9nn4yGo | ||
o8vhLMzgdXhp3T7yaCjpbpZUd1bnggJXz9MO76EBcCkS3+HcRRr/0KMD/tk5tZUx | ||
s35hnRrJi9HvhFjZbJA/KGG8DJp4oyzEfbufmUJ7OdbMn++W3NtG1BrRhbKmH5og | ||
tpfAr88iJ6BFaXV/4JIxc4Fga8dvjJR3ueh5pT2om/rUzkQ= | ||
-----END CERTIFICATE----- | ||
another comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDfzCCAmegAwIBAgIJAM4nWEf/MeHVMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV | ||
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg | ||
Q29tcGFueSBMdGQxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0xNjEwMTIwNTQ3NDla | ||
Fw0yNjEwMTAwNTQ3NDlaMFYxCzAJBgNVBAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0 | ||
IENpdHkxHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxEjAQBgNVBAMMCWxv | ||
Y2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALVCI5Ma6AR0 | ||
oDv/OqactDMR4pA6CZJnNDYbjRIkjsXi3pXuAXbQ8J/lD7EKNhu8wxrM0PZvdE1s | ||
ERjgFmZlYYTJkoDQUr9HagwAhAHrUuAq6FsmogLOl1L4QmeddCxExLdTePJAvVxc | ||
+fr3mk7I9Kt5FV1kDOZMyGqkLwKvcGXjx4ue+ZMgQZjWoU4Om7ktA57siAUkrxQg | ||
SonEnlSAlEQy6/wRSR2XQ85e+o1JHMIti4+h/Soo4BmHetec7zKvHjsL1kuT9s43 | ||
YiVlj660cc/Rmqt61OqPrumeKeVLRLmOD71l0yjU8QEwvAvvzFwdTZQSPUVGb4Je | ||
9Apxn7MNnKMCAwEAAaNQME4wHQYDVR0OBBYEFFzPIkvacjl8MFC6eRCwSTyW5z9c | ||
MB8GA1UdIwQYMBaAFFzPIkvacjl8MFC6eRCwSTyW5z9cMAwGA1UdEwQFMAMBAf8w | ||
DQYJKoZIhvcNAQELBQADggEBAKN9RXWgMuEwhLYzG///duWTcIC7UfamGDVlezxa | ||
BkR+VGkRSlo4v+MaZKscG2D/NGh4PP5PQZr7okLQY6MIKmcFkIN1BDziEVfKICFs | ||
AIrcajDLyHaLcAmZv2VJe1sz12pmGZG7uTOncMAngZoNDNI0f4djzvmRd9nn4yGo | ||
o8vhLMzgdXhp3T7yaCjpbpZUd1bnggJXz9MO76EBcCkS3+HcRRr/0KMD/tk5tZUx | ||
s35hnRrJi9HvhFjZbJA/KGG8DJp4oyzEfbufmUJ7OdbMn++W3NtG1BrRhbKmH5og | ||
tpfAr88iJ6BFaXV/4JIxc4Fga8dvjJR3ueh5pT2om/rUzkQ= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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L+kUy44bl1ckjh+VMp6rty/5Z/K1PKkyNniznxj9Epwu | ||
4O/aI/Q7SrKZmjH64gXWBmyj8doNHM3nFF9mSIjRromovuUeOcpFlATBCe0Pxpxt | ||
sGlhjnrMVicCgYBvIwlBv9uiaBpG+s3a9AEvTHdrGigZGbVdXlzAMI9UKNY/ehp1 | ||
qGYn0+5AQszUVxcKl4ISKUL54tcMhdL7S5Y18T7eFfuYUJ53gJGQ0e366/1kVzGA | ||
CgLlJmVZoopZkxlzkRR2XiErbf4N+eEOQJeN+X3zM2ert8woGHBA7iP81QKBgBi0 | ||
3oo8zvbGhFr+0WsjuDHSOzi07/zy/1khulYoef4cLsWSzaXtgnZpeKuubsf6/Mvo | ||
LaMzTWHSnDTEppFEPRdUYeh2snMi67kdzmZyvvEU/jUVWNaMXSyx4E/25Vve6Fpq | ||
65s/Q3kcXTUx/bD4zfjyqzr02uNny4Op4kUAaRxdAoGBAK0t4FVXTOWIf6xxgGMZ | ||
BBkNu6N1n/Io3pliCpYpZrBE/6NEOaEeniyaM0BbAatR+SemaYICnEj31ueonlIs | ||
PLUi9H177Cnu2DZwBMaWx78r260RIxF+bcdTBjQ51fXt7/44okFjHmCcRVA1q/Rc | ||
WdI83+niMywS/XVfLAMhnFWR | ||
-----END PRIVATE KEY----- |
2 changes: 1 addition & 1 deletion
2
__tests__/fixtures/normalize-manifest/throw name non-string/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"_error": "Fatal problem with name in manifest: must be a string" | ||
"_error": "\"name\" is not a string" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* @flow */ | ||
/* eslint max-len: 0 */ | ||
|
||
import {NoopReporter} from '../../src/reporters/index.js'; | ||
import Config from '../../src/config.js'; | ||
import type {ConfigOptions} from '../../src/config.js'; | ||
import * as fs from '../../src/util/fs.js'; | ||
|
||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; | ||
|
||
const https = require('https'); | ||
const path = require('path'); | ||
|
||
async function createConfig(opts: ConfigOptions = {}): Promise<Config> { | ||
const config = new Config(new NoopReporter()); | ||
await config.init(opts); | ||
return config; | ||
} | ||
|
||
test('RequestManager.request with cafile', async () => { | ||
let body; | ||
const options = { | ||
key: await fs.readFile(path.join(__dirname, '..', 'fixtures', 'certificates', 'server-key.pem')), | ||
cert: await fs.readFile(path.join(__dirname, '..', 'fixtures', 'certificates', 'server-cert.pem')), | ||
}; | ||
const server = https.createServer(options, (req, res) => { res.end('ok'); }); | ||
try { | ||
server.listen(0); | ||
const config = await createConfig({'cafile': path.join(__dirname, '..', 'fixtures', 'certificates', 'cacerts.pem')}); | ||
const port = server.address().port; | ||
body = await config.requestManager.request({url: `https://localhost:${port}/?nocache`, headers: {Connection: 'close'}}); | ||
} finally { | ||
server.close(); | ||
} | ||
expect(body).toBe('ok'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.