PeculiarVentures / fortify-examples

Fortify enables web applications to use smart cards, local certificate stores and do certificate enrollment. This is a set of examples of how to use Fortify in your own applications.
MIT License
8 stars 5 forks source link

Issues when hosted in webserver #4

Closed rrightwrong closed 5 years ago

rrightwrong commented 5 years ago

Hi ! I am facing the errors when the examples (Tested Example5) are hosted on webserver (IIS) and when accessing examples through server IP.

Uncaught (in promise) DOMException: Failed to execute 'put' on 'IDBObjectStore': function SHA256() webcrypto-socket.js:4403

AlgorithmError: Unrecognized name example5.html:78

However, it functions well for localhost.

rmhrisk commented 5 years ago

Is the site over HTTPS?

rrightwrong commented 5 years ago

No its HTTP.

rmhrisk commented 5 years ago

WebCrypto will not work without HTTPS.

Pick up an ACME client, get a certificate from Let's Encrypt.

rmhrisk commented 5 years ago

see https://www.chromium.org/blink/webcrypto and "Access to the WebCrypto API is restricted to secure origins (which is to say https:// pages)."

rrightwrong commented 5 years ago

Thanks Ryan !!!