Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Load CAs from OS for http2 requests in the extension host #188686

Closed
3 tasks done
chrmarti opened this issue Jul 24, 2023 · 1 comment
Closed
3 tasks done

Test: Load CAs from OS for http2 requests in the extension host #188686

chrmarti opened this issue Jul 24, 2023 · 1 comment
Labels
proxy Issues regarding network proxies testplan-item
Milestone

Comments

@chrmarti
Copy link
Collaborator

chrmarti commented Jul 24, 2023

Refs: #185098

Complexity: 3

Create Issue


  • Create a local certificate:
openssl req -x509 -newkey rsa:4096 -keyout server_localhost_key.pem -out server_localhost_crt.pem -days 365 -nodes -subj /CN=localhost
  • Install the certificate in the OS.
  • Run an HTTP2 server using the certificate:
const http2 = require('http2');
const fs = require('fs');

const options = {
  key: fs.readFileSync('./server_localhost_key.pem'),
  cert: fs.readFileSync('./server_localhost_crt.pem')
};

const server = http2.createSecureServer(options);

server.on('error', (error) => {
  console.error(error);
});

server.on('stream', (stream, headers) => {
  stream.respond({
    'content-type': 'text/plain',
    ':status': 200
  });
  stream.end('Hello, HTTP2 world!');
});

server.listen(3000);
@chrmarti chrmarti added testplan-item proxy Issues regarding network proxies labels Jul 24, 2023
@chrmarti chrmarti added this to the July 2023 milestone Jul 24, 2023
@ghost ghost assigned kieferrm, dbaeumer and sbatten Jul 25, 2023
@sbatten sbatten removed their assignment Jul 25, 2023
@connor4312 connor4312 assigned connor4312 and unassigned kieferrm Jul 26, 2023
@connor4312
Copy link
Member

For future reference, https://github.com/FiloSottile/mkcert is a wonderful tool :)

@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
proxy Issues regarding network proxies testplan-item
Projects
None yet
Development

No branches or pull requests

6 participants