Disable the real webcrypto
Sadly, we are not quite compliant with the WC3 webcrypto spec due to our insistance on passing around key data in plain old ArrayBuffers. Also converted whitespace.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* vim: ts=4:sw=4
|
||||
/* vim: ts=4:sw=4:expandtab
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -17,9 +17,9 @@
|
||||
/* Web Crypto polyfill. TODO: replace with web crypto */
|
||||
// All inputs/outputs are arraybuffers!
|
||||
window.crypto.subtle = (function() {
|
||||
if (window.crypto.subtle !== undefined && window.crypto.subtle !== null) {
|
||||
/* if (window.crypto.subtle !== undefined && window.crypto.subtle !== null) {
|
||||
return window.crypto.subtle;
|
||||
} else {
|
||||
} else*/ {
|
||||
var StaticArrayBufferProto = new ArrayBuffer().__proto__;
|
||||
function assertIsArrayBuffer(thing) {
|
||||
if (thing !== Object(thing) || thing.__proto__ != StaticArrayBufferProto)
|
||||
|
Reference in New Issue
Block a user