node-opcua-crypto 4.3.1 → 4.4.0

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/README.md CHANGED
@@ -107,13 +107,8 @@ Thank you for considering NodeOPCUA Crypto for your OPCUA cryptography needs. We
107
107
 
108
108
 
109
109
 
110
- ## :heart: Supporting the development effort - Sponsors & Backers</span>
110
+ ## Supporting the development effort - Sponsors & Backers
111
111
 
112
- If you like node-opcua-pki and if you are relying on it in one of your projects, please consider becoming a backer and [sponsoring us](https://github.com/sponsors/node-opcua), this will help us to maintain a high-quality stack and constant evolution of this module.
112
+ If you like `node-opcua-pki` and if you are relying on it in one of your projects, please consider becoming a backer and [sponsoring us](https://github.com/sponsors/node-opcua), this will help us to maintain a high-quality stack and constant evolution of this module.
113
113
 
114
- If your company would like to participate and influence the development of future versions of node-opcua please contact [sterfive](mailto:contact@sterfive.com).
115
-
116
- <!--
117
- https://app.fossa.com/reports/489947c3-2e83-48e5-8351-192f553ded57
118
- https://linuxctl.com/2017/02/x509-certificate-manual-signature-verification/
119
- -->
114
+ If your company would like to participate and influence the development of future versions of `node-opcua` please contact [sterfive](mailto:contact@sterfive.com).
@@ -6,7 +6,7 @@ import {
6
6
  privateKeyToPEM,
7
7
  removeTrailingLF,
8
8
  toPem
9
- } from "./chunk-QSSIRHMR.mjs";
9
+ } from "./chunk-SYIFAIYT.mjs";
10
10
 
11
11
  // source_nodejs/read.ts
12
12
  import assert from "assert";
@@ -170,4 +170,4 @@ export {
170
170
  generatePrivateKeyFile,
171
171
  generatePrivateKeyFileAlternate
172
172
  };
173
- //# sourceMappingURL=chunk-KPKFYTZJ.mjs.map
173
+ //# sourceMappingURL=chunk-BZXAQ44Q.mjs.map
@@ -880,11 +880,23 @@ function _readAuthorityKeyIdentifier(buffer) {
880
880
  }
881
881
  function readBasicConstraint2_5_29_19(buffer, block) {
882
882
  const block_info = readTag(buffer, 0);
883
- const inner_blocks = _readStruct(buffer, block_info);
884
- const cA = inner_blocks.length > 0 ? _readBooleanValue(buffer, inner_blocks[0]) : false;
883
+ const inner_blocks = _readStruct(buffer, block_info).slice(0, 2);
884
+ let cA = false;
885
885
  let pathLengthConstraint = 0;
886
- if (inner_blocks.length > 1) {
887
- pathLengthConstraint = _readIntegerValue(buffer, inner_blocks[1]);
886
+ let breakControl = 0;
887
+ for (const inner_block of inner_blocks) {
888
+ switch (inner_block.tag) {
889
+ case 1 /* BOOLEAN */:
890
+ cA = _readBooleanValue(buffer, inner_block);
891
+ break;
892
+ case 2 /* INTEGER */:
893
+ pathLengthConstraint = _readIntegerValue(buffer, inner_block);
894
+ breakControl = 1;
895
+ break;
896
+ }
897
+ if (breakControl) {
898
+ break;
899
+ }
888
900
  }
889
901
  return { critical: true, cA, pathLengthConstraint };
890
902
  }
@@ -6240,4 +6252,4 @@ asn1js/build/index.es.js:
6240
6252
  *
6241
6253
  *)
6242
6254
  */
6243
- //# sourceMappingURL=chunk-QSSIRHMR.mjs.map
6255
+ //# sourceMappingURL=chunk-SYIFAIYT.mjs.map
package/dist/index.js CHANGED
@@ -824,11 +824,23 @@ function _readAuthorityKeyIdentifier(buffer) {
824
824
  }
825
825
  function readBasicConstraint2_5_29_19(buffer, block) {
826
826
  const block_info = readTag(buffer, 0);
827
- const inner_blocks = _readStruct(buffer, block_info);
828
- const cA = inner_blocks.length > 0 ? _readBooleanValue(buffer, inner_blocks[0]) : false;
827
+ const inner_blocks = _readStruct(buffer, block_info).slice(0, 2);
828
+ let cA = false;
829
829
  let pathLengthConstraint = 0;
830
- if (inner_blocks.length > 1) {
831
- pathLengthConstraint = _readIntegerValue(buffer, inner_blocks[1]);
830
+ let breakControl = 0;
831
+ for (const inner_block of inner_blocks) {
832
+ switch (inner_block.tag) {
833
+ case 1 /* BOOLEAN */:
834
+ cA = _readBooleanValue(buffer, inner_block);
835
+ break;
836
+ case 2 /* INTEGER */:
837
+ pathLengthConstraint = _readIntegerValue(buffer, inner_block);
838
+ breakControl = 1;
839
+ break;
840
+ }
841
+ if (breakControl) {
842
+ break;
843
+ }
832
844
  }
833
845
  return { critical: true, cA, pathLengthConstraint };
834
846
  }
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  readPublicKeyPEM,
15
15
  readPublicRsaKey,
16
16
  setCertificateStore
17
- } from "./chunk-KPKFYTZJ.mjs";
17
+ } from "./chunk-BZXAQ44Q.mjs";
18
18
  import "./chunk-5NV4OKIV.mjs";
19
19
  import {
20
20
  CertificatePurpose,
@@ -110,7 +110,7 @@ import {
110
110
  verifyChunkSignature,
111
111
  verifyChunkSignatureWithDerivedKeys,
112
112
  verifyMessageChunkSignature
113
- } from "./chunk-QSSIRHMR.mjs";
113
+ } from "./chunk-SYIFAIYT.mjs";
114
114
  export {
115
115
  CertificatePurpose,
116
116
  PaddingAlgorithm,
@@ -809,11 +809,23 @@ function _readAuthorityKeyIdentifier(buffer) {
809
809
  }
810
810
  function readBasicConstraint2_5_29_19(buffer, block) {
811
811
  const block_info = readTag(buffer, 0);
812
- const inner_blocks = _readStruct(buffer, block_info);
813
- const cA = inner_blocks.length > 0 ? _readBooleanValue(buffer, inner_blocks[0]) : false;
812
+ const inner_blocks = _readStruct(buffer, block_info).slice(0, 2);
813
+ let cA = false;
814
814
  let pathLengthConstraint = 0;
815
- if (inner_blocks.length > 1) {
816
- pathLengthConstraint = _readIntegerValue(buffer, inner_blocks[1]);
815
+ let breakControl = 0;
816
+ for (const inner_block of inner_blocks) {
817
+ switch (inner_block.tag) {
818
+ case 1 /* BOOLEAN */:
819
+ cA = _readBooleanValue(buffer, inner_block);
820
+ break;
821
+ case 2 /* INTEGER */:
822
+ pathLengthConstraint = _readIntegerValue(buffer, inner_block);
823
+ breakControl = 1;
824
+ break;
825
+ }
826
+ if (breakControl) {
827
+ break;
828
+ }
817
829
  }
818
830
  return { critical: true, cA, pathLengthConstraint };
819
831
  }
@@ -93,7 +93,7 @@ import {
93
93
  verifyChunkSignature,
94
94
  verifyChunkSignatureWithDerivedKeys,
95
95
  verifyMessageChunkSignature
96
- } from "../chunk-QSSIRHMR.mjs";
96
+ } from "../chunk-SYIFAIYT.mjs";
97
97
  export {
98
98
  CertificatePurpose,
99
99
  PaddingAlgorithm,
@@ -809,11 +809,23 @@ function _readAuthorityKeyIdentifier(buffer) {
809
809
  }
810
810
  function readBasicConstraint2_5_29_19(buffer, block) {
811
811
  const block_info = readTag(buffer, 0);
812
- const inner_blocks = _readStruct(buffer, block_info);
813
- const cA = inner_blocks.length > 0 ? _readBooleanValue(buffer, inner_blocks[0]) : false;
812
+ const inner_blocks = _readStruct(buffer, block_info).slice(0, 2);
813
+ let cA = false;
814
814
  let pathLengthConstraint = 0;
815
- if (inner_blocks.length > 1) {
816
- pathLengthConstraint = _readIntegerValue(buffer, inner_blocks[1]);
815
+ let breakControl = 0;
816
+ for (const inner_block of inner_blocks) {
817
+ switch (inner_block.tag) {
818
+ case 1 /* BOOLEAN */:
819
+ cA = _readBooleanValue(buffer, inner_block);
820
+ break;
821
+ case 2 /* INTEGER */:
822
+ pathLengthConstraint = _readIntegerValue(buffer, inner_block);
823
+ breakControl = 1;
824
+ break;
825
+ }
826
+ if (breakControl) {
827
+ break;
828
+ }
817
829
  }
818
830
  return { critical: true, cA, pathLengthConstraint };
819
831
  }
@@ -92,7 +92,7 @@ import {
92
92
  verifyChunkSignature,
93
93
  verifyChunkSignatureWithDerivedKeys,
94
94
  verifyMessageChunkSignature
95
- } from "../chunk-QSSIRHMR.mjs";
95
+ } from "../chunk-SYIFAIYT.mjs";
96
96
  export {
97
97
  CertificatePurpose,
98
98
  PaddingAlgorithm,
@@ -14,9 +14,9 @@ import {
14
14
  readPublicKeyPEM,
15
15
  readPublicRsaKey,
16
16
  setCertificateStore
17
- } from "../chunk-KPKFYTZJ.mjs";
17
+ } from "../chunk-BZXAQ44Q.mjs";
18
18
  import "../chunk-5NV4OKIV.mjs";
19
- import "../chunk-QSSIRHMR.mjs";
19
+ import "../chunk-SYIFAIYT.mjs";
20
20
  export {
21
21
  generatePrivateKeyFile,
22
22
  generatePrivateKeyFileAlternate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-crypto",
3
- "version": "4.3.1",
3
+ "version": "4.4.0",
4
4
  "description": "Crypto tools for Node-OPCUA",
5
5
  "types": "./dist-types/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -80,5 +80,5 @@
80
80
  "bugs": {
81
81
  "url": "https://github.com/node-opcua/node-opcua-crypto/issues"
82
82
  },
83
- "gitHead": "0aa3e491d5d63ce1e718aaf5fa6a4a7d4321d415"
83
+ "gitHead": "0178ec43b6c883df8221f306772b1a99060b2e20"
84
84
  }