node-opcua-crypto-web 6.2.3 → 6.2.5

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.
Files changed (2) hide show
  1. package/dist/index_web.js +18 -26
  2. package/package.json +3 -3
package/dist/index_web.js CHANGED
@@ -47646,34 +47646,26 @@ function _readRevokedCertificates(buffer, block) {
47646
47646
  return revokedCertificate;
47647
47647
  });
47648
47648
  }
47649
+ function _isTime(block) {
47650
+ return block?.tag === 23 /* UTCTime */ || block?.tag === 24 /* GeneralizedTime */;
47651
+ }
47649
47652
  function _readTbsCertList(buffer, blockInfo) {
47650
47653
  const blocks = readStruct(buffer, blockInfo);
47651
- const hasOptionalVersion = blocks[0].tag === 2 /* INTEGER */;
47652
- if (hasOptionalVersion) {
47653
- const _version = readIntegerValue(buffer, blocks[0]);
47654
- const signature = readAlgorithmIdentifier(buffer, blocks[1]);
47655
- const issuer = readNameForCrl(buffer, blocks[2]);
47656
- const issuerFingerprint = formatBuffer2DigitHexWithColum(makeSHA1Thumbprint(getBlock(buffer, blocks[2])));
47657
- const thisUpdate = readTime(buffer, blocks[3]);
47658
- const nextUpdate = readTime(buffer, blocks[4]);
47659
- const revokedCertificates = [];
47660
- if (blocks[5] && blocks[5].tag < 128) {
47661
- revokedCertificates.push(..._readRevokedCertificates(buffer, blocks[5]));
47662
- }
47663
- const _ext0 = findBlockAtIndex(blocks, 0);
47664
- return { issuer, issuerFingerprint, thisUpdate, nextUpdate, signature, revokedCertificates };
47665
- } else {
47666
- const signature = readAlgorithmIdentifier(buffer, blocks[0]);
47667
- const issuer = readNameForCrl(buffer, blocks[1]);
47668
- const issuerFingerprint = formatBuffer2DigitHexWithColum(makeSHA1Thumbprint(getBlock(buffer, blocks[1])));
47669
- const thisUpdate = readTime(buffer, blocks[2]);
47670
- const nextUpdate = readTime(buffer, blocks[3]);
47671
- const revokedCertificates = [];
47672
- if (blocks[4] && blocks[4].tag < 128) {
47673
- revokedCertificates.push(..._readRevokedCertificates(buffer, blocks[4]));
47674
- }
47675
- return { issuer, issuerFingerprint, thisUpdate, nextUpdate, signature, revokedCertificates };
47676
- }
47654
+ let index = 0;
47655
+ if (blocks[index].tag === 2 /* INTEGER */) {
47656
+ index++;
47657
+ }
47658
+ const signature = readAlgorithmIdentifier(buffer, blocks[index++]);
47659
+ const issuerBlock = blocks[index++];
47660
+ const issuer = readNameForCrl(buffer, issuerBlock);
47661
+ const issuerFingerprint = formatBuffer2DigitHexWithColum(makeSHA1Thumbprint(getBlock(buffer, issuerBlock)));
47662
+ const thisUpdate = readTime(buffer, blocks[index++]);
47663
+ const nextUpdate = _isTime(blocks[index]) ? readTime(buffer, blocks[index++]) : void 0;
47664
+ const revokedCertificates = [];
47665
+ if (blocks[index]?.tag === 48 /* SEQUENCE */) {
47666
+ revokedCertificates.push(..._readRevokedCertificates(buffer, blocks[index++]));
47667
+ }
47668
+ return { issuer, issuerFingerprint, thisUpdate, nextUpdate, signature, revokedCertificates };
47677
47669
  }
47678
47670
  function exploreCertificateRevocationList(crl) {
47679
47671
  const blockInfo = readTag(crl, 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-crypto-web",
3
- "version": "6.2.3",
3
+ "version": "6.2.5",
4
4
  "type": "module",
5
5
  "description": "Pre-bundled, zero-config browser build of node-opcua-crypto",
6
6
  "//why": "This package exists so node-opcua-crypto can stay lean for Node. The pre-bundled browser build inlines its polyfills (crypto-browserify, stream-browserify, ...) and weighs ~344 KB gzip - more than the entire node-opcua-crypto tarball. Shipping it there would make every Node consumer download a browser bundle they never import. Browser consumers install this package explicitly, or let node-opcua-crypto's \"browser\" export condition redirect to it (see node-opcua-crypto/browser/index.js).",
@@ -44,7 +44,7 @@
44
44
  "crypto-browserify": "^3.12.1",
45
45
  "esbuild": "^0.28.2",
46
46
  "events": "^3.3.0",
47
- "node-opcua-crypto": "^6.2.3",
47
+ "node-opcua-crypto": "^6.2.5",
48
48
  "path-browserify": "^1.0.1",
49
49
  "process": "^0.11.10",
50
50
  "stream-browserify": "^3.0.0",
@@ -67,5 +67,5 @@
67
67
  "LICENSE",
68
68
  "README.md"
69
69
  ],
70
- "gitHead": "5cdfb5092ff52241b75542094458a4975e75e8e4"
70
+ "gitHead": "184487fc373b9f18f85870be7fd8871de1bcd9d9"
71
71
  }