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

fix: add new SSL certificate #432

Merged
merged 1 commit into from
Jan 25, 2019
Merged

fix: add new SSL certificate #432

merged 1 commit into from
Jan 25, 2019

Conversation

vmx
Copy link
Contributor

@vmx vmx commented Jan 24, 2019

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'

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'
@ghost ghost assigned vmx Jan 24, 2019
@ghost ghost added the in progress label Jan 24, 2019
@alanshaw alanshaw merged commit fe539e6 into master Jan 25, 2019
@ghost ghost removed the in progress label Jan 25, 2019
@alanshaw alanshaw deleted the new-ssl-certificate branch January 25, 2019 11:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants