Reputation: 1912
I am implementing node js script over https.
Node js
const options = {
key: fs.readFileSync('private.key'),
cert: fs.readFileSync('cert.crt'),
// This is necessary only if using the client certificate authentication.
requestCert: true,
rejectUnauthorized: true,
// This is necessary only if the client uses the self-signed certificate.
ca: [fs.readFileSync('client-cert.pem')]
};
On each request this is giving error:- ERR_CERT_AUTHORITY_INVALID
I have searched a lot but nothing found.
I use below command for generating client key:-
openssl req -x509 -newkey rsa:2048 -keyout client-key.pem -out client-cert.pem -days 365
I create .crt and private keys on server and using them.
What I am doing wrong here?
Upvotes: 9
Views: 46128
Reputation: 1958
I encountered a similar situation, it is related to certificate. It also gives the information of specific url. Clicking through the url will give your hint to access unsecure content, and clicking through it will allow subsequent access by refreshing url.
Upvotes: 5
Reputation: 31
--Firstly, Right-click on your computer’s time, then select the option that says "Adjust date/time". --"Sync now" under "Synchronize your clock", and click on it. so, your system syncing your computer clock. look at : https://kinsta.com/knowledgebase/neterr-cert-authority-invalid/
Upvotes: 0
Reputation: 1
Click on the page setting and enable unsafe information the reaload the page.
Upvotes: -2