web-pki 2.14.6 → 2.15.1

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.
@@ -341,7 +341,9 @@ export declare class LacunaWebPKI {
341
341
  /** The Array of Base64 encoded hashes to be signed. */
342
342
  batch: string[],
343
343
  /** The digest algorithm identifier of the hashes on `batch` parameter. It can be the algorithm name or OID (i.e. `'SHA-256'` or `'2.16.840.1.101.3.4.2.1'`). */
344
- digestAlgorithm: string
344
+ digestAlgorithm: string,
345
+ /** Set to be able to call [[preauthorizeSignatures]] in order to call [[signHashBatch]] multiple times.*/
346
+ usePreauthorizedSignatures?: boolean
345
347
  }): Promise<SignHashBatchResponse>;
346
348
 
347
349
  /**************************************************************
@@ -648,7 +650,7 @@ export declare class LacunaWebPKI {
648
650
  idResolutionTable?: XmlIdResolutionTableModel
649
651
 
650
652
  /** The selected XML [[FileModel.id]], as returned by [[showFileBrowser]] method. */
651
- fileId: string,
653
+ fileId?: string,
652
654
 
653
655
  /** The signer certificate thumbprint. Available in [[CertificateModel.thumbprint]] property returned by [[listCertificates]] method. */
654
656
  certificateThumbprint: string,
@@ -690,7 +692,10 @@ export declare class LacunaWebPKI {
690
692
  */
691
693
  openPades(args: {
692
694
  /** The signed PDF [[FileModel.id]], as returned by [[showFileBrowser]] method. */
693
- signatureFileId: string,
695
+ signatureFileId?: string,
696
+
697
+ /** The signed PDF content (Base64 encoded bytes) to open. It can be passed optionally to `signatureFileId`. */
698
+ signatureContent?: string,
694
699
 
695
700
  /** Whether or not to validate the PDF sinatures. */
696
701
  validate: boolean,
@@ -714,7 +719,10 @@ export declare class LacunaWebPKI {
714
719
  */
715
720
  openCades(args: {
716
721
  /** The signed document (.p7s) [[FileModel.id]], as returned by [[showFileBrowser]] method. */
717
- signatureFileId: string,
722
+ signatureFileId?: string,
723
+
724
+ /** The signed PDF content (Base64 encoded bytes) to open. It can be passed optionally to `signatureFileId`. */
725
+ signatureContent?: string,
718
726
 
719
727
  /** The original file. Only applies if the passed `signatureFileId` does not have the encapsulated content. */
720
728
  originalFileId?: string,
@@ -746,7 +754,7 @@ export declare class LacunaWebPKI {
746
754
  /** The signed XML [[FileModel.id]], as returned by [[showFileBrowser]] method. */
747
755
  signatureFileId?: string,
748
756
 
749
- /** A signed XML content (UTF-8 string or Base64 encoded bytes) can be passed optionally to `signatureFileId`. */
757
+ /** The signed XML content (UTF-8 string or Base64 encoded bytes) to open. It can be passed optionally to `signatureFileId`. */
750
758
  signatureContent?: string,
751
759
 
752
760
  /** Whether or not to validate the CAdES sinatures. */
@@ -933,7 +941,8 @@ export namespace LacunaWebPKI {
933
941
  v1_5_1 = '1.5.1',
934
942
  v1_5_2 = '1.5.2',
935
943
  v1_6 = '1.6.0',
936
- v1_6_1 = '1.6.1'
944
+ v1_6_1 = '1.6.1',
945
+ v1_7_0 = '1.7.0'
937
946
  }
938
947
 
939
948
  /**************************************************************
@@ -1028,6 +1037,11 @@ export namespace LacunaWebPKI {
1028
1037
  Unknown = 'Unknown'
1029
1038
  }
1030
1039
 
1040
+ export const enum CertificatePolicyQualifierTypes {
1041
+ Cps = 'Cps',
1042
+ UserNotice = 'UserNotice'
1043
+ }
1044
+
1031
1045
  export const enum MobileIntegrationModes {
1032
1046
  /** Redirects and continue execution inside Web PKI App. Direct integration without bouncing between Browser App and Web PKI App. */
1033
1047
  AppIntegration = 'appIntegration',
@@ -1053,14 +1067,27 @@ export namespace LacunaWebPKI {
1053
1067
  /** PAdES-BES policy */
1054
1068
  Basic = 'basic',
1055
1069
  /** ICP-Brasil AD-RB policy */
1056
- BrazilAdrBasica = 'brazilAdrBasica'
1070
+ BrazilAdrBasica = 'brazilAdrBasica',
1071
+ PadesT = 'padesT',
1072
+ BrazilAdrTempo = 'brazilAdrTempo'
1057
1073
  }
1058
1074
 
1059
1075
  export const enum CadesPolicies {
1076
+ Cms = 'cms',
1060
1077
  /** CAdES-BES policy */
1061
1078
  Bes = 'cadesBes',
1079
+ /** CAdES-T policy */
1080
+ CadesT = 'cadesT',
1062
1081
  /** ICP-Brasil AD-RB policy */
1063
- BrazilAdrBasica = 'brazilAdrBasica'
1082
+ BrazilAdrBasica = 'brazilAdrBasica',
1083
+ /** ICP-Brasil AD-RT policy */
1084
+ BrazilAdrTempo = 'brazilAdrTempo',
1085
+ /** ICP-Brasil AD-RV policy */
1086
+ BrazilAdrValidacao = 'brazilAdrValidacao',
1087
+ /** ICP-Brasil AD-RC policy */
1088
+ BrazilAdrCompleta = 'brazilAdrCompleta',
1089
+ /** ICP-Brasil AD-RA policy */
1090
+ BrazilAdrArquivamento = 'brazilAdrArquivamento',
1064
1091
  }
1065
1092
 
1066
1093
  export const enum XmlPolicies {
@@ -1069,9 +1096,11 @@ export namespace LacunaWebPKI {
1069
1096
  /** XAdES-BES policy */
1070
1097
  XadesBes = 'xadesBes',
1071
1098
  /** Brazil national NFe policy */
1099
+ XadesT = 'xadesT',
1072
1100
  BrazilNFe = 'brazilNFe',
1073
1101
  /** ICP-Brasil AD-RB policy */
1074
1102
  BrazilAdrBasica = 'brazilAdrBasica',
1103
+ BrazilAdrTempo = 'brazilAdrTempo',
1075
1104
  }
1076
1105
 
1077
1106
  export const enum XmlSignedEntityTypes {
@@ -1253,10 +1282,14 @@ export interface ExceptionModel {
1253
1282
  * Each property on the [[PkiBrazilModel]] and [[PkiItalyModel]] objects may be null, but the objects themselves (`cert.pkiBrazil` or `cert.pkiItaly`) are **never** null.
1254
1283
  */
1255
1284
  export interface CertificateModel {
1256
- /** The Common Name (CN) part of the certificate's subject name field. */
1285
+ /** The Common Name (CN) part of the certificate's subject DN name field. */
1257
1286
  subjectName: string,
1287
+ /** The subject Distinguished Name (DN) formatted string */
1288
+ subjectDN: string,
1258
1289
  /** The Common Name (CN) part of the certificate's issuer name field. */
1259
1290
  issuerName: string,
1291
+ /** The issuer Distinguished Name (DN) formatted string */
1292
+ issuerDN: string,
1260
1293
  /** `true` if the certificate is stored on Web PKI mobile app. `null` or `false` otherwise. */
1261
1294
  isRemote?: boolean,
1262
1295
  /** The subject e-mail address. */
@@ -1265,10 +1298,20 @@ export interface CertificateModel {
1265
1298
  thumbprint: string,
1266
1299
  /** Object with boolean properties indicating wether each possible key usage is set on the certificate. */
1267
1300
  keyUsage: KeyUsagesModel,
1301
+ /** Array with certificate policies info */
1302
+ certificatePolicies: CertificatePolicyModel[],
1268
1303
  /** Object with Brazil-specific fields. */
1269
1304
  pkiBrazil: PkiBrazilModel,
1305
+ /** Object with Argentina-specific fields. */
1306
+ pkiArgentina: PkiArgentinaModel,
1307
+ /** Object with Ecuador-specific fields. */
1308
+ pkiEcuador: PkiEcuadorModel,
1270
1309
  /** Object with Italy-specific fields. */
1271
1310
  pkiItaly: PkiItalyModel,
1311
+ /** Object with Paraguay-specific fields. */
1312
+ pkiParaguay: PkiParaguayModel,
1313
+ /** Object with Peru-specific fields. */
1314
+ pkiPeru: PkiPeruModel,
1272
1315
  /** The not before field of the certificate. */
1273
1316
  validityStart: Date,
1274
1317
  /** The not after field of the certificate. */
@@ -1332,6 +1375,81 @@ export interface PkiItalyModel {
1332
1375
  codiceFiscale: string
1333
1376
  }
1334
1377
 
1378
+ /**************************************************************
1379
+ * Object with PKI Argentina specific fields.
1380
+ */
1381
+ export interface PkiArgentinaModel {
1382
+ /** Clave Única de Identificación Laboral */
1383
+ cuil: string,
1384
+ /** Clave Única de Identificación Tributaria */
1385
+ cuit: string
1386
+ }
1387
+
1388
+ /**************************************************************
1389
+ * Object with PKI Ecuador specific fields.
1390
+ */
1391
+ export interface PkiEcuadorModel {
1392
+ /** */
1393
+ certificateType: string,
1394
+ cedulaDeIdentidad: string,
1395
+ pasaporte: string,
1396
+ /** Registro Único de Proveedores */
1397
+ rup: string,
1398
+ /** Registro Único de Contribuyentes */
1399
+ ruc: string,
1400
+ nombres: string,
1401
+ apellidos: string,
1402
+ razonSocial: string
1403
+ }
1404
+
1405
+ /**************************************************************
1406
+ * Object with PKI Paraguay specific fields.
1407
+ */
1408
+ export interface PkiParaguayModel {
1409
+ personCertificateType: string,
1410
+ certificateType: string,
1411
+ /** Cédula de identidad */
1412
+ ci: string,
1413
+ /** Cédula de identidad para extranjero */
1414
+ cie: string,
1415
+ /** Registro Único de Contribuyente. Número de Cédula Tributaria correspondiente al Titular */
1416
+ ruc: string,
1417
+ pasaporte: string,
1418
+ /** Nombre y apellido del responsable del certificado */
1419
+ responsable: string
1420
+ }
1421
+
1422
+ /**************************************************************
1423
+ * Object with PKI Peru specific fields.
1424
+ */
1425
+ export interface PkiPeruModel {
1426
+ /** Documento Nacional de Identidad */
1427
+ dni: string,
1428
+ /** Registro Único de Contribuyentes */
1429
+ ruc: string
1430
+ }
1431
+
1432
+ /**************************************************************
1433
+ * Object with certificate policy info
1434
+ */
1435
+ export interface CertificatePolicyModel {
1436
+ /** Certificate Policy Identifier */
1437
+ id: string,
1438
+ /** Certificate Policy Qualifiers */
1439
+ qualifiers: CertificatePolicyQualifierModel[]
1440
+ }
1441
+
1442
+ /**************************************************************
1443
+ * Object with certificate policy qualifier
1444
+ */
1445
+ export interface CertificatePolicyQualifierModel {
1446
+ type: LacunaWebPKI.CertificatePolicyQualifierTypes,
1447
+ cpsUri: string,
1448
+ unOrganization: string,
1449
+ unExplicitText: string,
1450
+ unNoticeNumbers: number[],
1451
+ }
1452
+
1335
1453
  // Common Functions
1336
1454
 
1337
1455
  export interface SuccessCallback<T> {
@@ -1738,4 +1856,11 @@ export interface TimestampRequester {
1738
1856
  authentication?: AuthenticationParameters
1739
1857
  }
1740
1858
 
1859
+ export interface GeolocationInfo {
1860
+ accuracy: number,
1861
+ latitude: number,
1862
+ longitude: number,
1863
+ timestamp: Date
1864
+ }
1865
+
1741
1866
 
package/lacuna-web-pki.js CHANGED
@@ -21,6 +21,17 @@ LacunaWebPKI = function (license) {
21
21
  if (license) {
22
22
  this.license = license;
23
23
  }
24
+
25
+ // check for JQuery blockUI presence causing mobile touch blocking
26
+ if (this.isSupportedMobile && window.$ && window.$.blockUI) {
27
+ try {
28
+ window.$.blockUI.defaults.bindEvents = false;
29
+ this._log('blockUI bindEvents disabled');
30
+
31
+ } catch (ex) {
32
+ this._log('Error disabling blockUI bindEvents: ', ex);
33
+ }
34
+ }
24
35
  };
25
36
 
26
37
  // Inject class prototype
@@ -115,20 +126,21 @@ LacunaWebPKI = function (license) {
115
126
 
116
127
  $._installUrl = 'https://get.webpkiplugin.com/';
117
128
  $._chromeExtensionId = 'dcngeagmmhegagicpcmpinaoklddcgon';
118
- $._firefoxExtensionId = 'webpki@lacunasoftware.com';
119
- $._edgeExtensionId = 'd2798a85-9698-425a-add7-3db79a39ca8a';
129
+ $._firefoxExtensionId = 'webpki-beta@lacunasoftware.com';
130
+ $._edgeExtensionId = 'nedeegdmhlnmboboahchfpkmdnnemapd';
131
+ $._edgeLegacyProductId = 'd2798a85-9698-425a-add7-3db79a39ca8a';
120
132
  $._chromeExtensionFirstVersionWithSelfUpdate = '2.0.20';
121
- $._jslibVersion = '2.14.6';
133
+ $._jslibVersion = '2.15.1';
122
134
  $._mobileSupported = 'true' === 'true';
123
135
  $._buildChannel = 'stable';
124
136
 
125
137
  // latest components version ----------------------
126
- $._extensionRequiredVersion = '2.15.0';
127
- $._chromeNativeWinRequiredVersion = '2.10.1';
128
- $._chromeNativeLinuxRequiredVersion = '2.10.0';
129
- $._chromeNativeMacRequiredVersion = '2.10.0';
130
- $._ieAddonRequiredVersion = '2.7.2';
131
- $._mobileRequiredVersion = '2.7.0';
138
+ $._extensionRequiredVersion = '2.16.0';
139
+ $._chromeNativeWinRequiredVersion = '2.11.0';
140
+ $._chromeNativeLinuxRequiredVersion = '2.12.0';
141
+ $._chromeNativeMacRequiredVersion = '2.12.0';
142
+ $._ieAddonRequiredVersion = '2.8.0';
143
+ $._mobileRequiredVersion = '3.0.0';
132
144
  // ------------------------------------------------
133
145
 
134
146
  $._chromeInstallationStates = {
@@ -163,6 +175,7 @@ LacunaWebPKI = function (license) {
163
175
  v1_5_2: '1.5.2',
164
176
  v1_6: '1.6.0',
165
177
  v1_6_1: '1.6.1',
178
+ v1_7_0: '1.7.0',
166
179
  latest: 'latest'
167
180
  };
168
181
 
@@ -187,6 +200,7 @@ LacunaWebPKI = function (license) {
187
200
  $._apiMap.nativeWin[$.apiVersions.v1_5_2] = '2.9.0';
188
201
  $._apiMap.nativeWin[$.apiVersions.v1_6] = '2.10.0';
189
202
  $._apiMap.nativeWin[$.apiVersions.v1_6_1] = '2.10.1';
203
+ $._apiMap.nativeWin[$.apiVersions.v1_7_0] = '2.11.0';
190
204
 
191
205
  // IE
192
206
  $._apiMap.ieAddon[$.apiVersions.v1_0] = '2.0.4';
@@ -200,6 +214,7 @@ LacunaWebPKI = function (license) {
200
214
  $._apiMap.ieAddon[$.apiVersions.v1_5_2] = '2.6.0';
201
215
  $._apiMap.ieAddon[$.apiVersions.v1_6] = '2.7.0';
202
216
  $._apiMap.ieAddon[$.apiVersions.v1_6_1] = '2.7.2';
217
+ $._apiMap.ieAddon[$.apiVersions.v1_7_0] = '2.8.0';
203
218
 
204
219
  // Linux
205
220
  $._apiMap.nativeLinux[$.apiVersions.v1_0] = '2.0.0';
@@ -213,6 +228,7 @@ LacunaWebPKI = function (license) {
213
228
  $._apiMap.nativeLinux[$.apiVersions.v1_5_2] = '2.9.5';
214
229
  $._apiMap.nativeLinux[$.apiVersions.v1_6] = '2.10.0';
215
230
  $._apiMap.nativeLinux[$.apiVersions.v1_6_1] = '2.10.0';
231
+ $._apiMap.nativeLinux[$.apiVersions.v1_7_0] = '2.12.0';
216
232
 
217
233
  // Mac
218
234
  $._apiMap.nativeMac[$.apiVersions.v1_0] = '2.3.0';
@@ -226,6 +242,7 @@ LacunaWebPKI = function (license) {
226
242
  $._apiMap.nativeMac[$.apiVersions.v1_5_2] = '2.9.5';
227
243
  $._apiMap.nativeMac[$.apiVersions.v1_6] = '2.10.0';
228
244
  $._apiMap.nativeMac[$.apiVersions.v1_6_1] = '2.10.0';
245
+ $._apiMap.nativeMac[$.apiVersions.v1_7_0] = '2.12.0';
229
246
 
230
247
  // WebExtension
231
248
  $._apiMap.extension[$.apiVersions.v1_0] = '2.3.2';
@@ -239,6 +256,7 @@ LacunaWebPKI = function (license) {
239
256
  $._apiMap.extension[$.apiVersions.v1_5_2] = '2.14.2';
240
257
  $._apiMap.extension[$.apiVersions.v1_6] = '2.15.0';
241
258
  $._apiMap.extension[$.apiVersions.v1_6_1] = '2.15.0';
259
+ $._apiMap.extension[$.apiVersions.v1_7_0] = '2.16.0';
242
260
 
243
261
  // Mobile
244
262
  $._apiMap.mobile[$.apiVersions.v1_0] = '1.1.0';
@@ -252,6 +270,7 @@ LacunaWebPKI = function (license) {
252
270
  $._apiMap.mobile[$.apiVersions.v1_5_2] = '1.1.0';
253
271
  $._apiMap.mobile[$.apiVersions.v1_6] = '2.7.0';
254
272
  $._apiMap.mobile[$.apiVersions.v1_6_1] = '2.7.0';
273
+ $._apiMap.mobile[$.apiVersions.v1_7_0] = '3.0.0';
255
274
 
256
275
  // All latest
257
276
  $._apiMap.nativeWin [$.apiVersions.latest] = $._chromeNativeWinRequiredVersion;
@@ -658,19 +677,11 @@ LacunaWebPKI = function (license) {
658
677
  this.brand = args.brand;
659
678
  }
660
679
  if (args.restPkiUrl) {
661
- this.restPkiUrl = args.restPkiUrl;
680
+ this.restPkiUrl = args.restPkiUrl[args.restPkiUrl.length - 1] === '/' ? args.restPkiUrl : args.restPkiUrl + '/';
662
681
  }
663
682
 
664
683
  this.useDomainNativePool = args.useDomainNativePool === true;
665
684
 
666
- if ($.isSupportedMobile && window.$ && window.$.blockUI) {
667
- try {
668
- window.$.blockUI.defaults.bindEvents = false;
669
- } catch (ex) {
670
- $._log('Error disabling blockUI bindEvents: ', ex);
671
- }
672
- }
673
-
674
685
  var self = this;
675
686
  var onCheckInstalledSuccess = function (result) {
676
687
  if (result.isInstalled) {
@@ -995,6 +1006,7 @@ LacunaWebPKI = function (license) {
995
1006
  var request = {
996
1007
  certificateThumbprint: args.certificateThumbprint,
997
1008
  digestAlgorithm: args.digestAlgorithm,
1009
+ usePreauthorizedSignatures: args.usePreauthorizedSignatures,
998
1010
  batch: args.batch
999
1011
  };
1000
1012
  $._requestHandler.sendCommand(context, 'signHashBatch', request);
@@ -1320,9 +1332,19 @@ LacunaWebPKI = function (license) {
1320
1332
  return context.promise;
1321
1333
  };
1322
1334
 
1335
+ $.getGeolocation = function (args) {
1336
+ var context = this._createContext(args);
1337
+ var request = {
1338
+ certificateThumbprint: args.certificateThumbprint
1339
+ };
1340
+ $._requestHandler.sendCommand(context, 'getGeolocation', request);
1341
+ return context.promise;
1342
+ };
1343
+
1323
1344
 
1324
1345
  // -------------------- Browser detection --------------------
1325
- // http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
1346
+ // Based on http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
1347
+ // with new Edge UA 'Edg' changes
1326
1348
  $.detectedBrowser = (function () {
1327
1349
  var ua = navigator.userAgent, tem,
1328
1350
  M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
@@ -1331,7 +1353,7 @@ LacunaWebPKI = function (license) {
1331
1353
  return 'IE ' + (tem[1] || '');
1332
1354
  }
1333
1355
  if (M[1] === 'Chrome') {
1334
- tem = ua.match(/\b(OPR|Edge)\/(\d+)/);
1356
+ tem = ua.match(/\b(OPR|Edge|Edg)\/(\d+)/);
1335
1357
  if (tem !== null) return tem.slice(1).join(' ').replace('OPR', 'Opera');
1336
1358
  }
1337
1359
  M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
@@ -1340,24 +1362,24 @@ LacunaWebPKI = function (license) {
1340
1362
  })();
1341
1363
 
1342
1364
  $._supportedMobileDetected = false;
1343
- var mobileOs = (function () {
1344
- var nAgt = navigator.userAgent;
1345
- var os = '';
1346
- var clientStrings = [
1347
- { s: 'Android', r: /Android/ },
1348
- { s: 'iOS', r: /(iPhone|iPad|iPod)/ }
1349
- ];
1350
- for (var i = 0; i < clientStrings.length; i++) {
1351
- var cs = clientStrings[i];
1352
- if (cs.r.test(nAgt)) {
1353
- os = cs.s;
1354
- $._supportedMobileDetected = true && $._mobileSupported;
1355
- break;
1356
- }
1365
+ var hasMultiTouchPoints = window.navigator.maxTouchPoints > 3;
1366
+ var mobileOs = '';
1367
+ var clientStrings = [
1368
+ { getName: function () { return 'Android'; }, r: /Android/ },
1369
+ { getName: function () { return 'iOS'; }, r: /(iPhone|iPad|iPod)/ },
1370
+
1371
+ // iPad iOS running on Desktop mode
1372
+ { getName: function () { return hasMultiTouchPoints ? 'iOS' : ''; }, r: /(Mac OS|MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ }
1373
+ ];
1374
+ for (var i = 0; i < clientStrings.length; i++) {
1375
+ var cs = clientStrings[i];
1376
+ if (cs.r.test(window.navigator.userAgent)) {
1377
+ mobileOs = cs.getName();
1378
+ break;
1357
1379
  }
1358
- return os;
1359
- })();
1380
+ }
1360
1381
 
1382
+ $._supportedMobileDetected = $._mobileSupported && mobileOs !== '';
1361
1383
  $.isSupportedMobile = $._supportedMobileDetected;
1362
1384
 
1363
1385
 
@@ -1408,7 +1430,7 @@ LacunaWebPKI = function (license) {
1408
1430
  isIE = ($.detectedBrowser.indexOf('IE') >= 0);
1409
1431
  isChrome = ($.detectedBrowser.indexOf('Chrome') >= 0);
1410
1432
  isFirefox = ($.detectedBrowser.indexOf('Firefox') >= 0);
1411
- isEdge = ($.detectedBrowser.indexOf('Edge') >= 0);
1433
+ isEdge = ($.detectedBrowser.indexOf('Edg') >= 0);
1412
1434
  isSafari = ($.detectedBrowser.indexOf('Safari') >= 0);
1413
1435
  // mobile os
1414
1436
  isAndroid = ($._supportedMobileDetected && mobileOs === 'Android');
@@ -1456,13 +1478,9 @@ LacunaWebPKI = function (license) {
1456
1478
  command: command,
1457
1479
  request: request
1458
1480
  };
1459
- if (isChrome) {
1460
- var eventC = new CustomEvent('build', { 'detail': message });
1461
- eventC.initEvent(requestEventName);
1481
+ if (isChrome || isEdge) {
1482
+ var eventC = new CustomEvent(requestEventName, { 'detail': message });
1462
1483
  document.dispatchEvent(eventC);
1463
- } else if (isEdge) {
1464
- var eventE = new CustomEvent(requestEventName, { 'detail': message });
1465
- document.dispatchEvent(eventE);
1466
1484
  } else {
1467
1485
  window.postMessage({
1468
1486
  port: requestEventName,
@@ -1478,7 +1496,7 @@ LacunaWebPKI = function (license) {
1478
1496
 
1479
1497
  var pollExtension = function (context, tryCount) {
1480
1498
  $._log('polling extension');
1481
- var meta = document.getElementById($._chromeExtensionId) || document.getElementById($._firefoxExtensionId.replace(/[^A-Za-z0-9_]/g, '_')) || document.getElementById($._edgeExtensionId);
1499
+ var meta = document.getElementById($._chromeExtensionId) || document.getElementById($._firefoxExtensionId.replace(/[^A-Za-z0-9_]/g, '_')) || document.getElementById($._edgeExtensionId) || document.getElementById($._edgeLegacyProductId);
1482
1500
  if (meta === null) {
1483
1501
  if (tryCount > 1) {
1484
1502
  setTimeout(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-pki",
3
- "version": "2.14.6",
3
+ "version": "2.15.1",
4
4
  "description": "The Lacuna Web PKI component enables web applications to interact with digital certificates through javascript, without the need of Java.",
5
5
  "main": "lacuna-web-pki.js",
6
6
  "types": "lacuna-web-pki.d.ts",