Comparing version 1.3.1 to 1.3.3
@@ -160,2 +160,20 @@ /* | ||
tag_class: 3, // CONTEXT-SPECIFIC | ||
tag_number: 1 // [1] | ||
}, | ||
value: [ | ||
new in_window.org.pkijs.asn1.ANY() | ||
] | ||
}), // JUST A STUB | ||
new in_window.org.pkijs.asn1.ASN1_CONSTRUCTED({ | ||
id_block: { | ||
tag_class: 3, // CONTEXT-SPECIFIC | ||
tag_number: 2 // [2] | ||
}, | ||
value: [ | ||
new in_window.org.pkijs.asn1.ANY() | ||
] | ||
}), // JUST A STUB | ||
new in_window.org.pkijs.asn1.ASN1_CONSTRUCTED({ | ||
id_block: { | ||
tag_class: 3, // CONTEXT-SPECIFIC | ||
tag_number: 3 // [3] | ||
@@ -293,3 +311,3 @@ }, | ||
//************************************************************************************** | ||
in_window.org.pkijs.schema.x509.RSAES_OAEP_params = | ||
in_window.org.pkijs.schema.cms.RSAES_OAEP_params = | ||
function() | ||
@@ -296,0 +314,0 @@ { |
@@ -66,2 +66,46 @@ /* | ||
//************************************************************************************** | ||
// #region Settings for "crypto engine" | ||
//************************************************************************************** | ||
local.engine = { | ||
name: "none", | ||
crypto: null, | ||
subtle: null | ||
}; | ||
if("crypto" in window) | ||
{ | ||
var engineName = "webcrypto"; | ||
var cryptoObject = window.crypto; | ||
var subtleObject = null; | ||
// Apple Safari support | ||
if("webkitSubtle" in window.crypto) | ||
subtleObject = window.crypto.webkitSubtle; | ||
if("subtle" in window.crypto) | ||
subtleObject = window.crypto.subtle; | ||
local.engine = { | ||
name: engineName, | ||
crypto: cryptoObject, | ||
subtle: subtleObject | ||
}; | ||
} | ||
//************************************************************************************** | ||
function setEngine(name, crypto, subtle) | ||
{ | ||
/// <summary>Setting the global "crypto engine" parameters</summary> | ||
/// <param name="name" type="String">Auxiliary name for "crypto engine"</param> | ||
/// <param name="crypto" type="Object">Object handling all root cryptographic requests (in fact currently it must handle only "getRandomValues")</param> | ||
/// <param name="subtle" type="Object">Object handling all main cryptographic requests</param> | ||
local.engine = { | ||
name: name, | ||
crypto: crypto, | ||
subtle: subtle | ||
}; | ||
} | ||
//************************************************************************************** | ||
// #endregion | ||
//************************************************************************************** | ||
// #region Declaration of common functions | ||
@@ -217,12 +261,5 @@ //************************************************************************************** | ||
if("crypto" in in_window) | ||
{ | ||
// Apple Safari support | ||
if("webkitSubtle" in in_window.crypto) | ||
crypto_temp = in_window.crypto.webkitSubtle; | ||
if(local.engine.subtle !== null) | ||
crypto_temp = local.engine.subtle; | ||
if("subtle" in in_window.crypto) | ||
crypto_temp = in_window.crypto.subtle; | ||
} | ||
return crypto_temp; | ||
@@ -325,4 +362,4 @@ } | ||
if("crypto" in in_window) | ||
return in_window.crypto.getRandomValues(view); | ||
if(local.engine.crypto !== null) | ||
return local.engine.crypto.getRandomValues(view); | ||
else | ||
@@ -329,0 +366,0 @@ throw new Error("No support for Web Cryptography API"); |
@@ -8,3 +8,3 @@ { | ||
"description": "Public Key Infrastructure (PKI) is the basis of how identity and key management is performed on the web today. PKIjs is a pure JavaScript library implementing the formats that are used in PKI applications. It is built on WebCrypto and aspires to make it possible to build native web applications that utilize X.509 and the related formats on the web without plug-ins", | ||
"version": "1.3.1", | ||
"version": "1.3.3", | ||
"repository": { | ||
@@ -11,0 +11,0 @@ "type": "git", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3869776
67663