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

Certs included have wrong password #76

Open
ethanschofer opened this issue Apr 23, 2024 · 1 comment
Open

Certs included have wrong password #76

ethanschofer opened this issue Apr 23, 2024 · 1 comment

Comments

@ethanschofer
Copy link

The cert included in the repo: \Foundation-spa-react\src\Headless.Cms\App_Data\certificates\my.pfx, has a password set in appsettings.json. This password is incorrect. I can see this in the CertificateOptions class. On line 33-ish, where is tries to create a new X509Certificate2, it throws throws an error that the password for the cert is incorrect. I had to generate my own cert. In the context of making my own site that will eventually be out on the web, this is fine. But in the context of using Foundation-Spa-React to learn how to architect a headless site, then its a problem that I spent some time trying to troubleshoot.

@tago-SE
Copy link

tago-SE commented Sep 20, 2024

openssl genrsa -out private.key 2048
openssl req -new -x509 -key private.key -out cert.x509 -days 365 -nodes
openssl pkcs12 -export -out my.pfx -inkey private.key -in cert.x509

Country Name (2 letter code) [AU]: US
State or Province Name (full name) [Some-State]: New York
Locality Name (eg, city) []: New York
Organization Name (eg, company) [Internet Widgits Pty Ltd]: MyCompany
Organizational Unit Name (eg, section) []: IT Department
Common Name (e.g. server FQDN or YOUR name) []: localhost
Email Address []: [email protected]

openssl pkcs12 -export -out my-certificate.pfx -inkey my-private-key.key -in my-certificate.crt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants