@it-enterprise/digital-signature 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10826,9 +10826,9 @@ var J = class {
|
|
|
10826
10826
|
code: f.EndUserError.EU_ERROR_BAD_PARAMETER,
|
|
10827
10827
|
message: this._resourses.PasswordNotSet
|
|
10828
10828
|
};
|
|
10829
|
-
Array.isArray(t) && (t = await Promise.all(t.map((e) => e instanceof File || e instanceof Blob ? g(e) : e instanceof f.EndUserCertificate ? e.data : e)));
|
|
10829
|
+
Array.isArray(t) && t.length > 0 && (t = await Promise.all(t.map((e) => e instanceof File || e instanceof Blob ? g(e) : e instanceof f.EndUserCertificate ? e.data : e)));
|
|
10830
10830
|
try {
|
|
10831
|
-
let n = await this._euSign.CtxCreate(), r = await this._euSign.CtxReadPrivateKey(e, t, this._selectedIssuerCN), i = new G(B.Token, r.ownerInfo, await this._euSign.CtxGetOwnCertificates(r), e);
|
|
10831
|
+
let n = await this._euSign.CtxCreate(), r = await this._euSign.CtxReadPrivateKey(n, e, t, this._selectedIssuerCN), i = new G(B.Token, r.ownerInfo, await this._euSign.CtxGetOwnCertificates(r), e);
|
|
10832
10832
|
return i.context = n, i.keyContext = r, i._glSign = this._glSign, i;
|
|
10833
10833
|
} catch (e) {
|
|
10834
10834
|
if (e && e.code === f.EndUserError.EU_ERROR_CERT_NOT_FOUND) {
|
|
@@ -10856,7 +10856,7 @@ var J = class {
|
|
|
10856
10856
|
code: f.EndUserError.EU_ERROR_BAD_PARAMETER,
|
|
10857
10857
|
message: this._resourses.PasswordNotSet
|
|
10858
10858
|
};
|
|
10859
|
-
(e instanceof File || e instanceof Blob) && (e = await g(e)), Array.isArray(n) && (n = await Promise.all(n.map((e) => e instanceof File || e instanceof Blob ? g(e) : e instanceof f.EndUserCertificate ? e.data : e)));
|
|
10859
|
+
(e instanceof File || e instanceof Blob) && (e = await g(e)), Array.isArray(n) && n.length > 0 && (n = await Promise.all(n.map((e) => e instanceof File || e instanceof Blob ? g(e) : e instanceof f.EndUserCertificate ? e.data : e)));
|
|
10860
10860
|
try {
|
|
10861
10861
|
let r = await this._euSign.CtxCreate(), i = await this._euSign.CtxReadPrivateKeyBinary(r, e, t, n, this._selectedIssuerCN), a = new W(B.File, i.ownerInfo, await this._euSign.CtxGetOwnCertificates(i), e, t);
|
|
10862
10862
|
return a.context = r, a.keyContext = i, a._glSign = this._glSign, a;
|
|
@@ -10878,7 +10878,7 @@ var J = class {
|
|
|
10878
10878
|
}
|
|
10879
10879
|
}
|
|
10880
10880
|
async ctxFreePrivateKey(e) {
|
|
10881
|
-
e
|
|
10881
|
+
e.keyType === B.Token ? await this.setLibraryType(B.Token) : await this.setLibraryType(B.File), await this._euSign.CtxFreePrivateKey(e.keyContext), await this._euSign.CtxFree(e.context);
|
|
10882
10882
|
}
|
|
10883
10883
|
async getPrivateKeyInfoFromStorage(e, t) {
|
|
10884
10884
|
let n = (e ? localStorage : sessionStorage)[this._userId + Z], r, i = [];
|