@it-enterprise/digital-signature 1.2.7 → 1.2.8

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.
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Client registration token.
3
+ */
4
+ export declare class EndUserClientRegistrationToken {
5
+ version: number;
6
+ type: number;
7
+ serverId: string;
8
+ serverName: string;
9
+ clientType: number;
10
+ clientName: string;
11
+ rawSign: string;
12
+ expiration: Date;
13
+ token: string;
14
+ qrCode: string;
15
+ }
@@ -279,10 +279,14 @@ export declare enum EndUserXAdESSignLevel {
279
279
  export declare const EU_PADES_SIGN_LEVEL_UNKNOWN = 0;
280
280
  export declare const EU_PADES_SIGN_LEVEL_B_B = 1;
281
281
  export declare const EU_PADES_SIGN_LEVEL_B_T = 4;
282
+ export declare const EU_PADES_SIGN_LEVEL_B_LT = 16;
283
+ export declare const EU_PADES_SIGN_LEVEL_B_LTA = 32;
282
284
  export declare enum EndUserPAdESSignLevel {
283
285
  Unknown,
284
286
  B_B,
285
- B_T
287
+ B_T,
288
+ B_LT,
289
+ B_LTA
286
290
  }
287
291
  export declare enum EndUserEventType {
288
292
  None = 0,
@@ -39,6 +39,7 @@ export declare class CASettings {
39
39
  * @property <number | null> pollingInterval - KSP server polling interval in seconds.
40
40
  * @property <string | null> systemId - System identifier (website, system name, etc).
41
41
  * @property <EndUserKSPClientIdType | null> clientIdType - Client ID type (name, phone, email).
42
+ * @property <string | null> registrationURL - KSP server user registration URL.
42
43
  */
43
44
  export declare class KSPSettings {
44
45
  name: string;
@@ -52,6 +53,7 @@ export declare class KSPSettings {
52
53
  pollingInterval?: number;
53
54
  systemId?: string;
54
55
  clientIdType?: EndUserKSPClientIdType;
56
+ registrationURL?: string;
55
57
  }
56
58
  /**
57
59
  * Settings to configure EndUser library.
@@ -61,9 +63,10 @@ export declare class KSPSettings {
61
63
  * @property <boolean> directAccess - A boolean value that specifies whether library supports direct access without Proxy-handler for CAs that support direct access.
62
64
  * @property <Array<CASettings> | string> CAs - An array or URL with CAs configurations.
63
65
  * @property <Uint8Array | string> CACertificates - A binary array or URL with CAs certificates.
66
+ * @property <string> TSLAddress - A string that contains TSLs URLs in format "2-letter_country_code:url;", e.x. "UA:https://czo.gov.ua/download/tl/TL-UA-DSTU.xml;UA:https://czo.gov.ua/download/tl/TL-UA-EC.xml;EU:https://ec.europa.eu/tools/lotl/eu-lotl.xml".
64
67
  * @property <Array<string> | null> allowedKeyMediaTypes - A string array with allowed key media types. Using by SignWeb library.
65
68
  * @property <Array<{type:string, devices:Array<string>}> | null> allowedKeyMediaDevices - A string array with allowed key media devices. Using by SignWeb library.
66
- * @property <string> mssServiceURL - The URL of the mobile signature service (mss). Using by MobileID and KSP library.
69
+ * @property <string> mssServiceURL - The URL of the mobile signature service (mss). Using by MobileID and KSP library (deprecated).
67
70
  * @property <string> passwordRequirements - The string with regular expression with private key password requirements.
68
71
  * @property <Array<KSPSettings>> KSPs - An array with KSPs configurations.
69
72
  * @property <boolean> allowMakeNewCertOnNewKeyMedia - A boolean value that specifies whether allow make new certificate on new key media.
@@ -71,7 +74,9 @@ export declare class KSPSettings {
71
74
  * @property <string> downloadsURL - The URL of the SignWeb library downloads location. Allows override default SignWeb downloads location.
72
75
  * @property <boolean> supportAdvancedCertificates - A boolean value that specifies whether library support advanced certificates (not implemented).
73
76
  * @property <boolean> signInfoTmpl - An object or URL with sign info template (not implemented).
74
- */
77
+ * @property <number> connectionTimeout - Timeout for connections to CA servers in ms. Affects only for SW library type. By default set to 60s.
78
+ * @property <number> ocspResponseExpireTime - The time interval during which the cryptolibrary trust for the response from the OCSP server in seconds. By default set to 0s, recomended 30s (used on the https://czo.gov.ua/verify), max value 3600s.
79
+ */
75
80
  export declare class EndUserSettings {
76
81
  language: string;
77
82
  encoding: string;
@@ -79,6 +84,7 @@ export declare class EndUserSettings {
79
84
  directAccess: boolean;
80
85
  CAs: Array<CASettings> | string;
81
86
  CACertificates: Uint8Array | string;
87
+ TSLAddress?: string;
82
88
  allowedKeyMediaTypes?: Array<string>;
83
89
  allowedKeyMediaDevices?: Array<{
84
90
  type: string;
@@ -92,6 +98,8 @@ export declare class EndUserSettings {
92
98
  downloadsURL?: string;
93
99
  supportAdvancedCertificates?: boolean;
94
100
  signInfoTmpl?: any | string;
101
+ connectionTimeout?: number;
102
+ ocspResponseExpireTime?: number;
95
103
  }
96
104
  /**
97
105
  * Settings to configure EndUser library proxy server.
package/euscp/euscp.d.ts CHANGED
@@ -18,6 +18,7 @@ import { EndUserParams } from "./EndUserParams";
18
18
  import { EndUserInfo } from "./EndUserInfo";
19
19
  import { EndUserRequestInfo } from "./EndUserRequestInfo";
20
20
  import { EndUserEventListener } from "./EndUserEvents";
21
+ import { EndUserClientRegistrationToken } from "./EndUserClientRegistrationToken";
21
22
  import * as EndUserEvents from "./EndUserEvents";
22
23
  declare type NamedData = {
23
24
  name: string;
@@ -117,6 +118,11 @@ declare class EndUser {
117
118
  * @returns A Promise for the completion of which ever callback is executed.
118
119
  */
119
120
  ResetPrivateKey(): Promise<void>;
121
+ /**
122
+ * Reset running KSP operation
123
+ * @returns A Promise for the completion of which ever callback is executed.
124
+ */
125
+ ResetOperationKSP(): Promise<void>;
120
126
  /**
121
127
  * Read private key from key media
122
128
  * @param keyMedia The key media.
@@ -186,9 +192,11 @@ declare class EndUser {
186
192
  * @param caCN The CA common name that issued private key certificates.
187
193
  * @param euParams The user information for new certificate (CA`s limited support).
188
194
  * @param onReadedKey The boolean value that specifies to make certificate for readed key
195
+ * @param newUserId The user identifier for new key
196
+ * @param newKSP The key service provider identifier or name for new key
189
197
  * @returns A Promise for the completion of which ever callback is executed.
190
198
  */
191
- MakeNewCertificate(oldKeyMedia: EndUserKeyMedia, oldPrivateKey: Uint8Array, oldPrivateKeyPassword: string, uaKeysType: EndUserKeysType | number, uaDSKeysSpec: EndUserKeysLengthDSUA | number, useDSKeyAsKEP: boolean, uaKEPKeysSpec: EndUserKeysLengthKEPUA | number, uaParamsPath: string, internationalKeysType: EndUserKeysType | number, internationalKeysSpec: EndUserKeysLengthDSRSA | number, internationalParamsPath: string, newKeyMedia: EndUserKeyMedia, newPrivateKeyPassword: string, caCN?: string, euParams?: EndUserParams, onReadedKey?: boolean): Promise<{
199
+ MakeNewCertificate(oldKeyMedia: EndUserKeyMedia, oldPrivateKey: Uint8Array, oldPrivateKeyPassword: string, uaKeysType: EndUserKeysType | number, uaDSKeysSpec: EndUserKeysLengthDSUA | number, useDSKeyAsKEP: boolean, uaKEPKeysSpec: EndUserKeysLengthKEPUA | number, uaParamsPath: string, internationalKeysType: EndUserKeysType | number, internationalKeysSpec: EndUserKeysLengthDSRSA | number, internationalParamsPath: string, newKeyMedia: EndUserKeyMedia, newPrivateKeyPassword: string, caCN?: string, euParams?: EndUserParams, onReadedKey?: boolean, newUserId?: string, newKSP?: EndUserKSP | number | string): Promise<{
192
200
  key?: Uint8Array;
193
201
  certs: Array<EndUserCertificate>;
194
202
  }>;
@@ -268,6 +276,12 @@ declare class EndUser {
268
276
  * @returns A Promise for the completion of which ever callback is executed.
269
277
  */
270
278
  GetKeyInfoBinary(privateKey: Uint8Array, password: string): Promise<Uint8Array>;
279
+ /**
280
+ * Get client registration token to register on the KSP
281
+ * @param ksp The key service provider identifier or name
282
+ * @returns A Promise for the completion of which ever callback is executed.
283
+ */
284
+ GetClientRegistrationTokenKSP(ksp: EndUserKSP | number | string): Promise<EndUserClientRegistrationToken>;
271
285
  /**
272
286
  * Hash data using specified hash algorithm
273
287
  * @param hashAlgo The hash algorithm.
@@ -644,4 +658,4 @@ declare class EndUser {
644
658
  */
645
659
  GetSignContainerInfo(signedData: Uint8Array | string): Promise<EndUserSignContainerInfo>;
646
660
  }
647
- export { NamedData, CASettings, KSPSettings, EndUserError, EndUserConstants, EndUserEvents, EndUserLibraryInfoJS, EndUserLibraryInfoSW, EndUserSettings, EndUserProxySettings, EndUserOwnerInfo, EndUserCertificateInfoEx, EndUserCertificate, EndUserKeyMedia, EndUserJKSPrivateKeyInfo, EndUserContext, EndUserPrivateKeyContext, EndUserTimeInfo, EndUserSignContainerInfo, EndUserSignInfo, EndUserSenderInfo, EndUserParams, EndUserInfo, EndUserRequestInfo, EndUserTaxReport, EndUserTaxReceipt, EndUser };
661
+ export { NamedData, CASettings, KSPSettings, EndUserError, EndUserConstants, EndUserEvents, EndUserLibraryInfoJS, EndUserLibraryInfoSW, EndUserSettings, EndUserProxySettings, EndUserOwnerInfo, EndUserCertificateInfoEx, EndUserCertificate, EndUserKeyMedia, EndUserJKSPrivateKeyInfo, EndUserContext, EndUserPrivateKeyContext, EndUserTimeInfo, EndUserSignContainerInfo, EndUserSignInfo, EndUserSenderInfo, EndUserParams, EndUserInfo, EndUserRequestInfo, EndUserClientRegistrationToken, EndUserTaxReport, EndUserTaxReceipt, EndUser };