
With some help I managed the correct certificat and import procedure. The solution can be found here: https://stackoverflow.com/questions/71470513/selfsignedcertificate-not-accepted-in-ms-edge-win-10/71487759#71487759
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
My previous self signed certificate has expired and I just cannot get a new one to work even after following multiple tutorials. This one was the latest. Whenever I try to use the localhost server, Office refuses to load the addin, because the certificate is invalid.
I think the issue is: When I import the certificate in Edge, it states "Import successful", but the certificate will not appear in the certificates list. I read here, that a missing private key might cause that issue. I tried fixing that with digicert utils, as suggested. But importing the certificate in digicert only shows the message "The file does not have any SSL or code signing enabled certificates contained in it."
My certificate looks valid, except it does not show the "protected by private key" info. It looks like that issue here. If I try to repair as proposed in that link, certutil asks to connect a smart card. Never heard of that.
As per the first tutorial, I created a root certification authority with key and imported it into the Trusted Root Certification Authorities. I the used the root.pem to create localhost.key/.csr and finally localhost.crt. I cannot see a fault with the process or the certificate except for the missing private key information (see attached image, Edit: Image upload does nothing, here is the link to the image.).
Please help, I am going nuts over this. Why does it not say there is a corresponding private key or if that is outdated, why is it not importing into Edge. Do I even need to get it imported into Edge for Office JS Addings to work. I am utterly confused by now. The commands I used to create the files are:
openssl genrsa -des3 -out rootSSL.key 2048
openssl req -x509 -new -nodes -key rootSSL.key -sha256 -days 10240 -out rootSSL.pem
<---Import--->
openssl req -new -sha256 -nodes -out localhost.csr -newkey rsa:2048 -keyout localhost.key
openssl x509 -req -in localhost.csr -CA rootSSL.pem -CAkey rootSSL.key -CAcreateserial -out localhost.crt -days 50000 -sha256
With some help I managed the correct certificat and import procedure. The solution can be found here: https://stackoverflow.com/questions/71470513/selfsignedcertificate-not-accepted-in-ms-edge-win-10/71487759#71487759