-
Notifications
You must be signed in to change notification settings - Fork 13
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
https://peculiarventures.github.io/webcrypto-local/webcrypto-socket.js returns 404 #229
Comments
See https://unpkg.com/@webcrypto-local/client@latest <script src="https://unpkg.com/@webcrypto-local/[email protected]/build/webcrypto-socket.js"></script> or minified version <script src="https://unpkg.com/@webcrypto-local/[email protected]/build/webcrypto-socket.min.js"></script> |
<!-- Babel Polyfill -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.7.0/polyfill.min.js"></script>
<!-- Crypto -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/asmCrypto/2.3.2/asmcrypto.all.es5.min.js"></script>
<script src="https://cdn.rawgit.com/indutny/elliptic/master/dist/elliptic.min.js"></script>
<script src="https://unpkg.com/[email protected]/build/webcrypto-liner.shim.min.js"></script>
<!-- WebCrypto Socket -->
<script src="https://cdn.rawgit.com/dcodeIO/protobuf.js/6.8.0/dist/protobuf.js"></script>
<script src="https://unpkg.com/@webcrypto-local/[email protected]/build/webcrypto-socket.min.js"></script> |
@microshine
|
Please try the full version. It would be easier to find a problem |
|
Im using React and importing all the external js urls with this. for (const id in urls) {
let tag = document.createElement('script');
tag.async = false;
tag.src = urls[id];
let body = document.getElementsByTagName('body')[0];
body.appendChild(tag);
} |
Certificate.tsx: 54 // get webcryptosocket
useEffect(() => {
window.WebcryptoSocket && init();
}, [window.WebcryptoSocket])
const init = () => {
const WebcryptoSocket = window.WebcryptoSocket;
const ws = new WebcryptoSocket.SocketProvider();
setWs(ws);
setWsReady(true);
} |
const ws = new WebcryptoSocket.SocketProvider({
storage: await WebcryptoSocket.BrowserStorage.create(),
}); |
I'll update README file. I created a new ticket for that #230 |
I updated the code to this: const init = async () => {
const WebcryptoSocket = window.WebcryptoSocket;
const ws = new WebcryptoSocket.SocketProvider({
storage: await WebcryptoSocket.BrowserStorage.create(),
});
setWs(ws);
setWsReady(true);
} |
@microshine I'm using react. Is there a template to load js resources to use WebSocket? |
It seemed to detect provider, but cannot decode certificate storage. Public key is read w/o problems but x.509 certificate.
|
https://peculiarventures.github.io/fortify-examples/example4.html By the way, this example also gives the same error. |
This error was solved by downgrading webcrypto-local to 1.0.12 But ws.connect produces DOMException error. How do I solve this? ws.connect("127.0.0.1:31337")
.on("error", function (e: any) {
console.error(e);
}) produces error :
|
Are you using |
The latest version of Fortify is v1.0.21? |
Currently using v1.0.20 |
Updating and a bit of tweaking solved the problem! Thanks! |
I have a code importing 'https://peculiarventures.github.io/webcrypto-local/webcrypto-socket.js', but since one week ago, I get 404 not found.
Any way to work around this?
The text was updated successfully, but these errors were encountered: