Selfsigned cert are too small and project wont run
When running the project with npm or yarn I get an error:
SSL_CTX_use_certificate:ee key too small
I think the default keysize is 1024. Setting keysize in the webpack config selfsigned.generate function specifically will allow the project to start properly:
Adding keysize: 2048 inside the function starting on line 31 in webpack.config.js solves my issue:
31 const pems = selfsigned.generate(
32 [
33 {
34 name: "commonName",
35 value: "localhost"
36 }
37 ],
38 {
39 keySize: 2048,
40 days: 365,
41 algorithm: "sha256",
42 extensions: [
43 {
44 name: "subjectAltName",
45 altNames: [
46 {
47 type: 2,
48 value: "localhost"
49 },
50 {
51 type: 2,
52 value: "hubs.local"
53 }
54 ]
55 }
56 ]
57 }
Ubuntu 20.04 LTS, Linux 5.4.0-42-generic x86-64
I don't know of the implications of setting this in the default config, but I'd assume more people than me have this issue.
Hi @robertlong ,
I faced same problem, but how can I resolve this issue with a local environment?
Ohh, I resolved it by replace the old cert and key files with my own generated version.
run this command.
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
@robertlong, Btw, how can I deploy the spoke on the my own server what published with hubs? I want to deploy the modifed version of spoke on my server.