Skip to content

Commit

Permalink
Generate new certificate for HTTPS tests
Browse files Browse the repository at this point in the history
Node 10 rejected the previous certificate because the key was too short. This commit generates a new certificate with a longer key (4096 bits).
  • Loading branch information
demurgos committed Aug 28, 2018
1 parent 5af4318 commit e3be670
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 22 deletions.
29 changes: 29 additions & 0 deletions test/dev.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIE+zCCAuOgAwIBAgIJALlZ4RtIICtyMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
BAMMCWxvY2FsaG9zdDAeFw0xODA4MjgwNzUyMjdaFw0yODA4MjUwNzUyMjdaMBQx
EjAQBgNVBAMMCWxvY2FsaG9zdDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
ggIBAMDrjTqjdZyAsxk8Gv62XJycpNmzrDTEqD3zb2aJb4p7d48dghee349X/cWT
YJvFOTkN8UrFBCK5PB6WQbxokxSOjB0yPJjx/ZvCdcBuylwLEzYhr3trQdSpCCCt
6r9mxKKALnls0KGoFBOjC82Ds+5Xf4dshucUuYhk0/OBhsm221RzWuv+XKbjKPGs
Ej9G3/zyHcgOp1vZxJP9Q4qAN+6HJHNLinFYJsoYN2ftiMCRChUVDBgX7yrD69TO
99crTPk7mIhd9JSab2bLA4C77blU0RKNPukhJedO/2WI5m/ua1Mn7pbemhpbTWWI
uFNj/J4V0ddTq+7vS1M8oTVjHgI71P83n8tSEHMY/mv4Uzmmn78uZE4GFQSOSLdF
8x0otG0DYugqEzNVEFBJI6docBQ0s5CdIMXWh8LyeUTfuoWGbx7gwDvEwVasxEcl
PlCSu0+fmFvYzH0f5lA4hS0KZk1cqizKH8CeEBv85NZJSSXfbUpJOvFnHmpCkAbj
D6V7qWnHuiEMzmqsOUl4qslh2dzGX+B2n728aPrbKe4X3qR/0FYVMo90qXtKjB72
EAjxpIb8dHblRT0+/nJvgLelPkhxKBGs7SlfzrpfsZSwxXU3xiurwpUKJiGSNOVz
VA6a3BD0NlwC10oC2SHBUmFB/A4JAG1WBSk8+z4Onjy3EmeJAgMBAAGjUDBOMB0G
A1UdDgQWBBQ9YH76FK3qDXglVAWwX3icz5f1BDAfBgNVHSMEGDAWgBQ9YH76FK3q
DXglVAWwX3icz5f1BDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQBK
UHRi92LurBvV5vkSKl/K/fayIWJXN5BXCK4Dg11bIexSHrPyl3ujfammBY0OR436
o13ynBnXw0Ys9N/2TUFIoC4xl6V/DkZ7uM7GUkkjQUooYCtD4xqGOZ3cjBszCYhG
nyo9Q0xi+KR+vabTr7sK4MQ3d6jVLM7xvEVGcTnPievJEVG0pwZuQBVmgQal3kK/
/NBlp/EH5wLIRH+U45tfZzbVIeonx4bF0h1jVk2CJKnPemxdqL7yuojqnt99yaDI
6VyYtbFrMNOM7JzlZ48FqCqqDFjiy2OeqZcJBSfKcMxYF/GS14gAdGtqouj2w2We
rBgzYp738uKlDJrYOKnZehOauiObaM/ywO4zHTXRu3VI6qCuVkmI803yK0gBxWms
jzzbTUC6c8uR3/kKj8tYFKHx3C4/dB2nGIxi/lC205YTjcuTHDfuxjhA3jMGXHTW
qdiJp+l00u+GiHesww0LAfomPqGdwT42j2+x5pUV7sD78bPxdQRv3QAGE+zwJnyG
lQozE59O1CCKaXpNHp1A6ZzabkT1IYNYlgfuNtWl3lgJQlVxpIHhU2FPtc4DnvWb
IOSyOhGDM90Nl62gDQXm8/g2Z4K5IJqpIwM0l45VbC/xOa7ym6JS7GLhEe3y8zyH
36rBXA+zbCQ/0/Y+WtX7GE3O4J3HPpEnlXxTg+1Cdg==
-----END CERTIFICATE-----
61 changes: 52 additions & 9 deletions test/dev.key
Original file line number Diff line number Diff line change
@@ -1,9 +1,52 @@
-----BEGIN RSA PRIVATE KEY-----
MIIBLAIBAAI+AYsnkrcckDAbvKn7z6gPggR9QdWgMR6jkb83Pao+ywP/CncbLlp0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bmF/VaAqB4Q4jqQuZmgerAToL76DFVnL3HNsC512QqHl
irECggEBAJykC4IZG7eWFRMFrVEhhMSRAuiR/urCRdqwnGld7Ia7vLVx56+fIjYE
Taqd6z1o4wPNq3Mt7MEp4zF2hO2oYInnAEVOqE4ORSX6GOp36YJTWdcrd0wixYVJ
trQpQsMTEXu3VuT3dGnVrWdzgIe7LYpgfqN5PDOdVPPozEF6UYv26C0h/gVcL8YO
rcspDZpGKl9kH9nmaSAP8wK0EYg26bBTXaekHRwHEMLmLNJ9KIetj4dt9lBkuoEZ
GEXCh+IuwYZmw7DYEKvUl9pcwESPq9i/e3HlzhW65wdOZnq18/L49IAycV10RKsD
ou94i4rwOFC4N61MCarVluNk9QIQ0Bk=
-----END PRIVATE KEY-----
8 changes: 0 additions & 8 deletions test/dev.pem

This file was deleted.

2 changes: 2 additions & 0 deletions test/generate-cert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650
11 changes: 6 additions & 5 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use strict';

var fancyLog = {log: require('fancy-log')};
var assert = require('assert');
var es = require('event-stream');
var path = require('path');
var sinon = require('sinon');
var minilr = require('mini-lr');
var Vinyl = require('vinyl');
var glr = require('../index.js');
var sinon = require('sinon');
var assert = require('assert');
var fancyLog = {log: require('fancy-log')};

var cwd = process.cwd();
var file = new Vinyl({ base: cwd, cwd: cwd, path: cwd + '/style.css' });
Expand Down Expand Up @@ -84,8 +85,8 @@ describe('gulp-livereload', function() {
var spy = sinon.spy(https, 'createServer');
var read = require('fs').readFileSync;
var opts = {
key: read(__dirname + '/dev.key'),
cert: read(__dirname + '/dev.pem')
key: read(path.join(__dirname, 'dev.key')),
cert: read(path.join(__dirname, 'dev.crt'))
};
srv.restore();
glr.listen(opts);
Expand Down

0 comments on commit e3be670

Please sign in to comment.