Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit fe539e6

Browse files
vmxAlan Shaw
authored and
Alan Shaw
committed
fix: add new SSL certificate (#432)
When running the tests I got errors like this: Error: error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak In order to fix this I created a new certificate. I thought 100 years of validity might be enough. The command to create it was (based on https://letsencrypt.org/docs/certificates-for-localhost/): openssl req -x509 -out cert.pem -keyout privkey.pem \ -newkey rsa:2048 -nodes -sha256 \ -subj '/CN=localhost' -extensions EXT -config <( \ printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth") \ -days 36524 To verify, run from within *js-ipfs*: npx mocha test/core/interface.spec.js --grep 'should add from a HTTPS URL'
1 parent 44d4803 commit fe539e6

File tree

2 files changed

+44
-45
lines changed

2 files changed

+44
-45
lines changed

js/test/fixtures/ssl/cert.pem

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
-----BEGIN CERTIFICATE-----
2-
MIIDOzCCAiMCCQCVqVeRIp9pFDANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJV
3-
UzENMAsGA1UECAwEVXRhaDEOMAwGA1UEBwwFUHJvdm8xIzAhBgNVBAoMGkFDTUUg
4-
U2lnbmluZyBBdXRob3JpdHkgSW5jMRQwEgYDVQQDDAtleGFtcGxlLmNvbTAeFw0x
5-
ODA4MTQyMDEzNTdaFw0xOTEyMjcyMDEzNTdaMFgxCzAJBgNVBAYTAlVTMQ0wCwYD
6-
VQQIDARVdGFoMQ4wDAYDVQQHDAVQcm92bzEWMBQGA1UECgwNQUNNRSBUZWNoIElu
7-
YzESMBAGA1UEAwwJMTI3LjAuMC4xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
8-
CgKCAQEA6x6mTXV+rC35QW/sPutT1O1cugtnw+UsJx7EGgzyjh7EoXE3gb7sO96P
9-
tO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4dwxc69eB3ZS4B32d/GIpIti23F3bRxAKE15km+Ufhj
8+
X1NGuFqbJOYHfbqOMkgMlkO54y4gAJa5tQnb3n0pNzpIklSzBO65T/u1HAsVDVZW
9+
BgVW/pqourvh6TtjCA3LJp33T9IcItTAlYbiFM0hKytlePzaHG6OKRazO6Z46l/V
10+
gTvRY90B7LrQWnSY3saLYuv9Gs5qQvEvthP/U6LroXjNAgMBAAGjOjA4MBQGA1Ud
11+
EQQNMAuCCWxvY2FsaG9zdDALBgNVHQ8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUH
12+
AwEwDQYJKoZIhvcNAQELBQADggEBAJHi6CJk5aZViLK+dm/ruV2vBiqGuRgfuviJ
13+
Mb+iApO39Q/PjxE2IQoVVcf7Rpml2SSARyN7K9cxLdSFFZn3Wgq3yHXB6vhsyGO+
14+
r17awBEI08PUlCuYVlE/mEzHGUGYbR0whIQSWK+gLMSQ2NG11DJyIPnErZYM1XSS
15+
p9ERjyR4KXC33RxEc0AtGZsGgCThGkmwas3v702pzGfDd3qpbXztb+jdbfUVMUj4
16+
Wrzhps9JZ6HJ8RZBjnSMMqmWDbvJI+2aG0Ky6BYChrARLn9H7rCMgfe0l0QIL5br
17+
T1BqL+HHCVNiyt82+byg5mjpcsKvojCrQVVcQBs1xUkk6F45LeU=
2018
-----END CERTIFICATE-----

js/test/fixtures/ssl/privkey.pem

+28-27
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
-----BEGIN RSA PRIVATE KEY-----
2-
MIIEogIBAAKCAQEA6x6mTXV+rC35QW/sPutT1O1cugtnw+UsJx7EGgzyjh7EoXE3
3-
gb7sO96PtOI5zknb0vecckbiVkesmLnAs2iNa1u9EiRr6WHdc+1MfUCxyHRfP731
4-
vRZyo0kxbSXerE0qZ2N3M1XyndZF7VMthKDKIg0ZR0TvdjwLqyLYEHAnRBhJLRS0
5-
Oy0fC6OfVWCO3gIuk1HkTXH+/ZMA/obqrtlisxY85mMdlRz+1PNd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