web-pki 2.14.8 → 2.15.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.
- package/lacuna-web-pki.d.ts +133 -9
- package/lacuna-web-pki.js +30 -7
- package/package.json +1 -1
package/lacuna-web-pki.d.ts
CHANGED
|
@@ -343,7 +343,7 @@ export declare class LacunaWebPKI {
|
|
|
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
344
|
digestAlgorithm: string,
|
|
345
345
|
/** Set to be able to call [[preauthorizeSignatures]] in order to call [[signHashBatch]] multiple times.*/
|
|
346
|
-
usePreauthorizedSignatures
|
|
346
|
+
usePreauthorizedSignatures?: boolean
|
|
347
347
|
}): Promise<SignHashBatchResponse>;
|
|
348
348
|
|
|
349
349
|
/**************************************************************
|
|
@@ -650,7 +650,7 @@ export declare class LacunaWebPKI {
|
|
|
650
650
|
idResolutionTable?: XmlIdResolutionTableModel
|
|
651
651
|
|
|
652
652
|
/** The selected XML [[FileModel.id]], as returned by [[showFileBrowser]] method. */
|
|
653
|
-
fileId
|
|
653
|
+
fileId?: string,
|
|
654
654
|
|
|
655
655
|
/** The signer certificate thumbprint. Available in [[CertificateModel.thumbprint]] property returned by [[listCertificates]] method. */
|
|
656
656
|
certificateThumbprint: string,
|
|
@@ -692,7 +692,10 @@ export declare class LacunaWebPKI {
|
|
|
692
692
|
*/
|
|
693
693
|
openPades(args: {
|
|
694
694
|
/** The signed PDF [[FileModel.id]], as returned by [[showFileBrowser]] method. */
|
|
695
|
-
signatureFileId
|
|
695
|
+
signatureFileId?: string,
|
|
696
|
+
|
|
697
|
+
/** The signed PDF content (Base64 encoded bytes) to open. It can be passed optionally to `signatureFileId`. */
|
|
698
|
+
signatureContent?: string,
|
|
696
699
|
|
|
697
700
|
/** Whether or not to validate the PDF sinatures. */
|
|
698
701
|
validate: boolean,
|
|
@@ -716,7 +719,10 @@ export declare class LacunaWebPKI {
|
|
|
716
719
|
*/
|
|
717
720
|
openCades(args: {
|
|
718
721
|
/** The signed document (.p7s) [[FileModel.id]], as returned by [[showFileBrowser]] method. */
|
|
719
|
-
signatureFileId
|
|
722
|
+
signatureFileId?: string,
|
|
723
|
+
|
|
724
|
+
/** The signed PDF content (Base64 encoded bytes) to open. It can be passed optionally to `signatureFileId`. */
|
|
725
|
+
signatureContent?: string,
|
|
720
726
|
|
|
721
727
|
/** The original file. Only applies if the passed `signatureFileId` does not have the encapsulated content. */
|
|
722
728
|
originalFileId?: string,
|
|
@@ -748,7 +754,7 @@ export declare class LacunaWebPKI {
|
|
|
748
754
|
/** The signed XML [[FileModel.id]], as returned by [[showFileBrowser]] method. */
|
|
749
755
|
signatureFileId?: string,
|
|
750
756
|
|
|
751
|
-
/**
|
|
757
|
+
/** The signed XML content (UTF-8 string or Base64 encoded bytes) to open. It can be passed optionally to `signatureFileId`. */
|
|
752
758
|
signatureContent?: string,
|
|
753
759
|
|
|
754
760
|
/** Whether or not to validate the CAdES sinatures. */
|
|
@@ -935,7 +941,9 @@ export namespace LacunaWebPKI {
|
|
|
935
941
|
v1_5_1 = '1.5.1',
|
|
936
942
|
v1_5_2 = '1.5.2',
|
|
937
943
|
v1_6 = '1.6.0',
|
|
938
|
-
v1_6_1 = '1.6.1'
|
|
944
|
+
v1_6_1 = '1.6.1',
|
|
945
|
+
v1_7_0 = '1.7.0',
|
|
946
|
+
v1_7_2 = '1.7.2'
|
|
939
947
|
}
|
|
940
948
|
|
|
941
949
|
/**************************************************************
|
|
@@ -1030,6 +1038,11 @@ export namespace LacunaWebPKI {
|
|
|
1030
1038
|
Unknown = 'Unknown'
|
|
1031
1039
|
}
|
|
1032
1040
|
|
|
1041
|
+
export const enum CertificatePolicyQualifierTypes {
|
|
1042
|
+
Cps = 'Cps',
|
|
1043
|
+
UserNotice = 'UserNotice'
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1033
1046
|
export const enum MobileIntegrationModes {
|
|
1034
1047
|
/** Redirects and continue execution inside Web PKI App. Direct integration without bouncing between Browser App and Web PKI App. */
|
|
1035
1048
|
AppIntegration = 'appIntegration',
|
|
@@ -1055,14 +1068,27 @@ export namespace LacunaWebPKI {
|
|
|
1055
1068
|
/** PAdES-BES policy */
|
|
1056
1069
|
Basic = 'basic',
|
|
1057
1070
|
/** ICP-Brasil AD-RB policy */
|
|
1058
|
-
BrazilAdrBasica = 'brazilAdrBasica'
|
|
1071
|
+
BrazilAdrBasica = 'brazilAdrBasica',
|
|
1072
|
+
PadesT = 'padesT',
|
|
1073
|
+
BrazilAdrTempo = 'brazilAdrTempo'
|
|
1059
1074
|
}
|
|
1060
1075
|
|
|
1061
1076
|
export const enum CadesPolicies {
|
|
1077
|
+
Cms = 'cms',
|
|
1062
1078
|
/** CAdES-BES policy */
|
|
1063
1079
|
Bes = 'cadesBes',
|
|
1080
|
+
/** CAdES-T policy */
|
|
1081
|
+
CadesT = 'cadesT',
|
|
1064
1082
|
/** ICP-Brasil AD-RB policy */
|
|
1065
|
-
BrazilAdrBasica = 'brazilAdrBasica'
|
|
1083
|
+
BrazilAdrBasica = 'brazilAdrBasica',
|
|
1084
|
+
/** ICP-Brasil AD-RT policy */
|
|
1085
|
+
BrazilAdrTempo = 'brazilAdrTempo',
|
|
1086
|
+
/** ICP-Brasil AD-RV policy */
|
|
1087
|
+
BrazilAdrValidacao = 'brazilAdrValidacao',
|
|
1088
|
+
/** ICP-Brasil AD-RC policy */
|
|
1089
|
+
BrazilAdrCompleta = 'brazilAdrCompleta',
|
|
1090
|
+
/** ICP-Brasil AD-RA policy */
|
|
1091
|
+
BrazilAdrArquivamento = 'brazilAdrArquivamento',
|
|
1066
1092
|
}
|
|
1067
1093
|
|
|
1068
1094
|
export const enum XmlPolicies {
|
|
@@ -1071,9 +1097,11 @@ export namespace LacunaWebPKI {
|
|
|
1071
1097
|
/** XAdES-BES policy */
|
|
1072
1098
|
XadesBes = 'xadesBes',
|
|
1073
1099
|
/** Brazil national NFe policy */
|
|
1100
|
+
XadesT = 'xadesT',
|
|
1074
1101
|
BrazilNFe = 'brazilNFe',
|
|
1075
1102
|
/** ICP-Brasil AD-RB policy */
|
|
1076
1103
|
BrazilAdrBasica = 'brazilAdrBasica',
|
|
1104
|
+
BrazilAdrTempo = 'brazilAdrTempo',
|
|
1077
1105
|
}
|
|
1078
1106
|
|
|
1079
1107
|
export const enum XmlSignedEntityTypes {
|
|
@@ -1255,10 +1283,14 @@ export interface ExceptionModel {
|
|
|
1255
1283
|
* Each property on the [[PkiBrazilModel]] and [[PkiItalyModel]] objects may be null, but the objects themselves (`cert.pkiBrazil` or `cert.pkiItaly`) are **never** null.
|
|
1256
1284
|
*/
|
|
1257
1285
|
export interface CertificateModel {
|
|
1258
|
-
/** The Common Name (CN) part of the certificate's subject name field. */
|
|
1286
|
+
/** The Common Name (CN) part of the certificate's subject DN name field. */
|
|
1259
1287
|
subjectName: string,
|
|
1288
|
+
/** The subject Distinguished Name (DN) formatted string */
|
|
1289
|
+
subjectDN: string,
|
|
1260
1290
|
/** The Common Name (CN) part of the certificate's issuer name field. */
|
|
1261
1291
|
issuerName: string,
|
|
1292
|
+
/** The issuer Distinguished Name (DN) formatted string */
|
|
1293
|
+
issuerDN: string,
|
|
1262
1294
|
/** `true` if the certificate is stored on Web PKI mobile app. `null` or `false` otherwise. */
|
|
1263
1295
|
isRemote?: boolean,
|
|
1264
1296
|
/** The subject e-mail address. */
|
|
@@ -1267,10 +1299,20 @@ export interface CertificateModel {
|
|
|
1267
1299
|
thumbprint: string,
|
|
1268
1300
|
/** Object with boolean properties indicating wether each possible key usage is set on the certificate. */
|
|
1269
1301
|
keyUsage: KeyUsagesModel,
|
|
1302
|
+
/** Array with certificate policies info */
|
|
1303
|
+
certificatePolicies: CertificatePolicyModel[],
|
|
1270
1304
|
/** Object with Brazil-specific fields. */
|
|
1271
1305
|
pkiBrazil: PkiBrazilModel,
|
|
1306
|
+
/** Object with Argentina-specific fields. */
|
|
1307
|
+
pkiArgentina: PkiArgentinaModel,
|
|
1308
|
+
/** Object with Ecuador-specific fields. */
|
|
1309
|
+
pkiEcuador: PkiEcuadorModel,
|
|
1272
1310
|
/** Object with Italy-specific fields. */
|
|
1273
1311
|
pkiItaly: PkiItalyModel,
|
|
1312
|
+
/** Object with Paraguay-specific fields. */
|
|
1313
|
+
pkiParaguay: PkiParaguayModel,
|
|
1314
|
+
/** Object with Peru-specific fields. */
|
|
1315
|
+
pkiPeru: PkiPeruModel,
|
|
1274
1316
|
/** The not before field of the certificate. */
|
|
1275
1317
|
validityStart: Date,
|
|
1276
1318
|
/** The not after field of the certificate. */
|
|
@@ -1334,6 +1376,81 @@ export interface PkiItalyModel {
|
|
|
1334
1376
|
codiceFiscale: string
|
|
1335
1377
|
}
|
|
1336
1378
|
|
|
1379
|
+
/**************************************************************
|
|
1380
|
+
* Object with PKI Argentina specific fields.
|
|
1381
|
+
*/
|
|
1382
|
+
export interface PkiArgentinaModel {
|
|
1383
|
+
/** Clave Única de Identificación Laboral */
|
|
1384
|
+
cuil: string,
|
|
1385
|
+
/** Clave Única de Identificación Tributaria */
|
|
1386
|
+
cuit: string
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
/**************************************************************
|
|
1390
|
+
* Object with PKI Ecuador specific fields.
|
|
1391
|
+
*/
|
|
1392
|
+
export interface PkiEcuadorModel {
|
|
1393
|
+
/** */
|
|
1394
|
+
certificateType: string,
|
|
1395
|
+
cedulaDeIdentidad: string,
|
|
1396
|
+
pasaporte: string,
|
|
1397
|
+
/** Registro Único de Proveedores */
|
|
1398
|
+
rup: string,
|
|
1399
|
+
/** Registro Único de Contribuyentes */
|
|
1400
|
+
ruc: string,
|
|
1401
|
+
nombres: string,
|
|
1402
|
+
apellidos: string,
|
|
1403
|
+
razonSocial: string
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/**************************************************************
|
|
1407
|
+
* Object with PKI Paraguay specific fields.
|
|
1408
|
+
*/
|
|
1409
|
+
export interface PkiParaguayModel {
|
|
1410
|
+
personCertificateType: string,
|
|
1411
|
+
certificateType: string,
|
|
1412
|
+
/** Cédula de identidad */
|
|
1413
|
+
ci: string,
|
|
1414
|
+
/** Cédula de identidad para extranjero */
|
|
1415
|
+
cie: string,
|
|
1416
|
+
/** Registro Único de Contribuyente. Número de Cédula Tributaria correspondiente al Titular */
|
|
1417
|
+
ruc: string,
|
|
1418
|
+
pasaporte: string,
|
|
1419
|
+
/** Nombre y apellido del responsable del certificado */
|
|
1420
|
+
responsable: string
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/**************************************************************
|
|
1424
|
+
* Object with PKI Peru specific fields.
|
|
1425
|
+
*/
|
|
1426
|
+
export interface PkiPeruModel {
|
|
1427
|
+
/** Documento Nacional de Identidad */
|
|
1428
|
+
dni: string,
|
|
1429
|
+
/** Registro Único de Contribuyentes */
|
|
1430
|
+
ruc: string
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
/**************************************************************
|
|
1434
|
+
* Object with certificate policy info
|
|
1435
|
+
*/
|
|
1436
|
+
export interface CertificatePolicyModel {
|
|
1437
|
+
/** Certificate Policy Identifier */
|
|
1438
|
+
id: string,
|
|
1439
|
+
/** Certificate Policy Qualifiers */
|
|
1440
|
+
qualifiers: CertificatePolicyQualifierModel[]
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
/**************************************************************
|
|
1444
|
+
* Object with certificate policy qualifier
|
|
1445
|
+
*/
|
|
1446
|
+
export interface CertificatePolicyQualifierModel {
|
|
1447
|
+
type: LacunaWebPKI.CertificatePolicyQualifierTypes,
|
|
1448
|
+
cpsUri: string,
|
|
1449
|
+
unOrganization: string,
|
|
1450
|
+
unExplicitText: string,
|
|
1451
|
+
unNoticeNumbers: number[],
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1337
1454
|
// Common Functions
|
|
1338
1455
|
|
|
1339
1456
|
export interface SuccessCallback<T> {
|
|
@@ -1740,4 +1857,11 @@ export interface TimestampRequester {
|
|
|
1740
1857
|
authentication?: AuthenticationParameters
|
|
1741
1858
|
}
|
|
1742
1859
|
|
|
1860
|
+
export interface GeolocationInfo {
|
|
1861
|
+
accuracy: number,
|
|
1862
|
+
latitude: number,
|
|
1863
|
+
longitude: number,
|
|
1864
|
+
timestamp: Date
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1743
1867
|
|
package/lacuna-web-pki.js
CHANGED
|
@@ -126,20 +126,20 @@ LacunaWebPKI = function (license) {
|
|
|
126
126
|
|
|
127
127
|
$._installUrl = 'https://get.webpkiplugin.com/';
|
|
128
128
|
$._chromeExtensionId = 'dcngeagmmhegagicpcmpinaoklddcgon';
|
|
129
|
-
$._firefoxExtensionId = 'webpki@lacunasoftware.com';
|
|
129
|
+
$._firefoxExtensionId = 'webpki-beta@lacunasoftware.com';
|
|
130
130
|
$._edgeExtensionId = 'nedeegdmhlnmboboahchfpkmdnnemapd';
|
|
131
131
|
$._edgeLegacyProductId = 'd2798a85-9698-425a-add7-3db79a39ca8a';
|
|
132
132
|
$._chromeExtensionFirstVersionWithSelfUpdate = '2.0.20';
|
|
133
|
-
$._jslibVersion = '2.
|
|
133
|
+
$._jslibVersion = '2.15.2';
|
|
134
134
|
$._mobileSupported = 'true' === 'true';
|
|
135
135
|
$._buildChannel = 'stable';
|
|
136
136
|
|
|
137
137
|
// latest components version ----------------------
|
|
138
|
-
$._extensionRequiredVersion = '2.
|
|
139
|
-
$._chromeNativeWinRequiredVersion = '2.
|
|
140
|
-
$._chromeNativeLinuxRequiredVersion = '2.
|
|
141
|
-
$._chromeNativeMacRequiredVersion = '2.
|
|
142
|
-
$._ieAddonRequiredVersion = '2.
|
|
138
|
+
$._extensionRequiredVersion = '2.16.0';
|
|
139
|
+
$._chromeNativeWinRequiredVersion = '2.11.0';
|
|
140
|
+
$._chromeNativeLinuxRequiredVersion = '2.12.1';
|
|
141
|
+
$._chromeNativeMacRequiredVersion = '2.12.1';
|
|
142
|
+
$._ieAddonRequiredVersion = '2.8.0';
|
|
143
143
|
$._mobileRequiredVersion = '3.0.0';
|
|
144
144
|
// ------------------------------------------------
|
|
145
145
|
|
|
@@ -175,6 +175,8 @@ LacunaWebPKI = function (license) {
|
|
|
175
175
|
v1_5_2: '1.5.2',
|
|
176
176
|
v1_6: '1.6.0',
|
|
177
177
|
v1_6_1: '1.6.1',
|
|
178
|
+
v1_7_0: '1.7.0',
|
|
179
|
+
v1_7_2: '1.7.2',
|
|
178
180
|
latest: 'latest'
|
|
179
181
|
};
|
|
180
182
|
|
|
@@ -199,6 +201,8 @@ LacunaWebPKI = function (license) {
|
|
|
199
201
|
$._apiMap.nativeWin[$.apiVersions.v1_5_2] = '2.9.0';
|
|
200
202
|
$._apiMap.nativeWin[$.apiVersions.v1_6] = '2.10.0';
|
|
201
203
|
$._apiMap.nativeWin[$.apiVersions.v1_6_1] = '2.10.1';
|
|
204
|
+
$._apiMap.nativeWin[$.apiVersions.v1_7_0] = '2.11.0';
|
|
205
|
+
$._apiMap.nativeWin[$.apiVersions.v1_7_2] = '2.11.0';
|
|
202
206
|
|
|
203
207
|
// IE
|
|
204
208
|
$._apiMap.ieAddon[$.apiVersions.v1_0] = '2.0.4';
|
|
@@ -212,6 +216,8 @@ LacunaWebPKI = function (license) {
|
|
|
212
216
|
$._apiMap.ieAddon[$.apiVersions.v1_5_2] = '2.6.0';
|
|
213
217
|
$._apiMap.ieAddon[$.apiVersions.v1_6] = '2.7.0';
|
|
214
218
|
$._apiMap.ieAddon[$.apiVersions.v1_6_1] = '2.7.2';
|
|
219
|
+
$._apiMap.ieAddon[$.apiVersions.v1_7_0] = '2.8.0';
|
|
220
|
+
$._apiMap.ieAddon[$.apiVersions.v1_7_2] = '2.8.0';
|
|
215
221
|
|
|
216
222
|
// Linux
|
|
217
223
|
$._apiMap.nativeLinux[$.apiVersions.v1_0] = '2.0.0';
|
|
@@ -225,6 +231,8 @@ LacunaWebPKI = function (license) {
|
|
|
225
231
|
$._apiMap.nativeLinux[$.apiVersions.v1_5_2] = '2.9.5';
|
|
226
232
|
$._apiMap.nativeLinux[$.apiVersions.v1_6] = '2.10.0';
|
|
227
233
|
$._apiMap.nativeLinux[$.apiVersions.v1_6_1] = '2.10.0';
|
|
234
|
+
$._apiMap.nativeLinux[$.apiVersions.v1_7_0] = '2.12.0';
|
|
235
|
+
$._apiMap.nativeLinux[$.apiVersions.v1_7_2] = '2.12.1';
|
|
228
236
|
|
|
229
237
|
// Mac
|
|
230
238
|
$._apiMap.nativeMac[$.apiVersions.v1_0] = '2.3.0';
|
|
@@ -238,6 +246,8 @@ LacunaWebPKI = function (license) {
|
|
|
238
246
|
$._apiMap.nativeMac[$.apiVersions.v1_5_2] = '2.9.5';
|
|
239
247
|
$._apiMap.nativeMac[$.apiVersions.v1_6] = '2.10.0';
|
|
240
248
|
$._apiMap.nativeMac[$.apiVersions.v1_6_1] = '2.10.0';
|
|
249
|
+
$._apiMap.nativeMac[$.apiVersions.v1_7_0] = '2.12.0';
|
|
250
|
+
$._apiMap.nativeMac[$.apiVersions.v1_7_2] = '2.12.1';
|
|
241
251
|
|
|
242
252
|
// WebExtension
|
|
243
253
|
$._apiMap.extension[$.apiVersions.v1_0] = '2.3.2';
|
|
@@ -251,6 +261,8 @@ LacunaWebPKI = function (license) {
|
|
|
251
261
|
$._apiMap.extension[$.apiVersions.v1_5_2] = '2.14.2';
|
|
252
262
|
$._apiMap.extension[$.apiVersions.v1_6] = '2.15.0';
|
|
253
263
|
$._apiMap.extension[$.apiVersions.v1_6_1] = '2.15.0';
|
|
264
|
+
$._apiMap.extension[$.apiVersions.v1_7_0] = '2.16.0';
|
|
265
|
+
$._apiMap.extension[$.apiVersions.v1_7_2] = '2.16.0';
|
|
254
266
|
|
|
255
267
|
// Mobile
|
|
256
268
|
$._apiMap.mobile[$.apiVersions.v1_0] = '1.1.0';
|
|
@@ -264,6 +276,8 @@ LacunaWebPKI = function (license) {
|
|
|
264
276
|
$._apiMap.mobile[$.apiVersions.v1_5_2] = '1.1.0';
|
|
265
277
|
$._apiMap.mobile[$.apiVersions.v1_6] = '2.7.0';
|
|
266
278
|
$._apiMap.mobile[$.apiVersions.v1_6_1] = '2.7.0';
|
|
279
|
+
$._apiMap.mobile[$.apiVersions.v1_7_0] = '3.0.0';
|
|
280
|
+
$._apiMap.mobile[$.apiVersions.v1_7_2] = '3.0.0';
|
|
267
281
|
|
|
268
282
|
// All latest
|
|
269
283
|
$._apiMap.nativeWin [$.apiVersions.latest] = $._chromeNativeWinRequiredVersion;
|
|
@@ -1325,6 +1339,15 @@ LacunaWebPKI = function (license) {
|
|
|
1325
1339
|
return context.promise;
|
|
1326
1340
|
};
|
|
1327
1341
|
|
|
1342
|
+
$.getGeolocation = function (args) {
|
|
1343
|
+
var context = this._createContext(args);
|
|
1344
|
+
var request = {
|
|
1345
|
+
certificateThumbprint: args.certificateThumbprint
|
|
1346
|
+
};
|
|
1347
|
+
$._requestHandler.sendCommand(context, 'getGeolocation', request);
|
|
1348
|
+
return context.promise;
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1328
1351
|
|
|
1329
1352
|
// -------------------- Browser detection --------------------
|
|
1330
1353
|
// Based on http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-pki",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.2",
|
|
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",
|