node-red-contrib-s7-rust 1.2.0 → 1.2.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,19 @@ All notable changes to this project are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.2.1] - 2026-11-12
10
+
11
+ ### Fixed
12
+
13
+ - `s7 endpoint` editor, *Read from the PLC*: when the check of the deployed endpoint refused the
14
+ PLC certificate, the button showed only the error, so a new PLC certificate could not be taken
15
+ over with *Use this certificate*. It now shows the refused certificate with a warning. `s7 info`
16
+ action `certificate` returns it with `refused: true` and `error`; a trusted certificate has
17
+ `refused: false`.
18
+ - Rust crate `s7plus`: a refused certificate gives `Error::CertificateRefused { reason, cert }`
19
+ (before: `Error::Certificate`, which now means a wrong check setting only) and
20
+ `Error::refused_certificate()`.
21
+
9
22
  ## [1.2.0] - 2026-11-12
10
23
 
11
24
  ### Added
@@ -162,7 +175,8 @@ First release: the next generation of `@oriolrius/node-red-contrib-s7`.
162
175
  - CI: tests on Node-RED 4 and 5, gitleaks, GitGuardian, RustSec and npm audit, CodeQL,
163
176
  OpenSSF Scorecard, Dependabot. License LGPL-3.0-only.
164
177
 
165
- [Unreleased]: https://github.com/oriolrius/node-red-contrib-s7-rust/compare/v1.2.0...HEAD
178
+ [Unreleased]: https://github.com/oriolrius/node-red-contrib-s7-rust/compare/v1.2.1...HEAD
179
+ [1.2.1]: https://github.com/oriolrius/node-red-contrib-s7-rust/compare/v1.2.0...v1.2.1
166
180
  [1.2.0]: https://github.com/oriolrius/node-red-contrib-s7-rust/compare/v1.1.0...v1.2.0
167
181
  [1.1.0]: https://github.com/oriolrius/node-red-contrib-s7-rust/compare/v1.0.5...v1.1.0
168
182
  [1.0.5]: https://github.com/oriolrius/node-red-contrib-s7-rust/compare/v1.0.4...v1.0.5
package/README.md CHANGED
@@ -188,7 +188,9 @@ Node-RED and the PLC can show its own certificate). In the endpoint, set "PLC ce
188
188
 
189
189
  *Read from the PLC* in the endpoint editor (or `s7 info` action `certificate`) shows the
190
190
  certificate of the deployed endpoint: compare it with TIA Portal before you trust it. When the
191
- check fails, the endpoint stays disconnected and the error shows the fingerprint it got.
191
+ check fails, the endpoint stays disconnected and the error shows the fingerprint it got; *Read
192
+ from the PLC* then shows the refused certificate with a warning (`refused: true`), so a new PLC
193
+ certificate can be checked and taken over.
192
194
 
193
195
  ## Addresses
194
196
 
Binary file
Binary file
@@ -30,7 +30,9 @@
30
30
  <p><i>Read from the PLC</i> shows the certificate of the deployed endpoint, and
31
31
  <i>Use this certificate</i> copies its fingerprint and PEM to the fields. Compare it with the
32
32
  certificate in TIA Portal before you trust it. When the check fails, the endpoint stays
33
- disconnected and the error shows the fingerprint of the certificate it got.</p>
33
+ disconnected and the error shows the fingerprint of the certificate it got; <i>Read from the
34
+ PLC</i> then shows the refused certificate with a warning (for example after a new PLC
35
+ certificate).</p>
34
36
  <p>Some CPUs accept only TLS sessions (for example PLCSIM Advanced V8, FW S4.1). If the
35
37
  connection fails with "the PLC refused the session without TLS", turn on TLS.</p>
36
38
  <h4>Log</h4>
@@ -39,7 +39,8 @@
39
39
  "use": "Use this certificate",
40
40
  "reading": "reading…",
41
41
  "issuer": "issuer",
42
- "notDeployed": "deploy the endpoint with TLS first"
42
+ "notDeployed": "deploy the endpoint with TLS first",
43
+ "refused": "NOT TRUSTED by the check of the deployed endpoint. Compare it with the certificate in TIA Portal before you use it."
43
44
  },
44
45
  "link": {
45
46
  "default": "CPU default",
@@ -32,8 +32,9 @@
32
32
  <li><code>info</code>: session, PAOM string, limits</li>
33
33
  <li><code>certificate</code>: the PLC certificate of the TLS session: <code>subject</code>,
34
34
  <code>issuer</code>, <code>notBefore</code>, <code>notAfter</code>, <code>altNames</code>,
35
- <code>fingerprint</code> (SHA-256), <code>pem</code>, and <code>check</code> (the check
36
- of the endpoint)</li>
35
+ <code>fingerprint</code> (SHA-256), <code>pem</code>, <code>check</code> (the check
36
+ of the endpoint), and <code>refused</code>: true when the check refused this certificate
37
+ (then <code>error</code> has the reason)</li>
37
38
  <li><code>dbs</code>: data blocks; <code>browse</code>: all symbols with their types</li>
38
39
  <li><code>alarms {all}</code>: active alarms; <code>limits</code>: system limits</li>
39
40
  </ul>
@@ -53,13 +53,16 @@
53
53
  const out = $('#s7rs-cert-info').text(node._('s7rs-endpoint.cert.reading'));
54
54
  $.getJSON(`s7rs/call/${encodeURIComponent(node.id)}/certificate`)
55
55
  .done((c) => {
56
- out.text(`${c.subject}\n${node._('s7rs-endpoint.cert.issuer')}: ${c.issuer}\n${c.notBefore} - ${c.notAfter}\n${(c.altNames || []).join(', ')}\nSHA-256 ${c.fingerprint}`);
56
+ const warn = c.refused ? `${node._('s7rs-endpoint.cert.refused')}\n${c.error}\n\n` : '';
57
+ out.text(`${warn}${c.subject}\n${node._('s7rs-endpoint.cert.issuer')}: ${c.issuer}\n${c.notBefore} - ${c.notAfter}\n${(c.altNames || []).join(', ')}\nSHA-256 ${c.fingerprint}`);
58
+ out.css('color', c.refused ? 'var(--red-ui-text-color-error, #d00)' : '');
57
59
  $('#s7rs-cert-use').show().off('click').on('click', () => {
58
60
  $('#node-config-input-certFingerprint').val(c.fingerprint);
59
61
  $('#node-config-input-certTrusted').val(c.pem);
60
62
  });
61
63
  })
62
64
  .fail((x) => {
65
+ out.css('color', '');
63
66
  out.text((x.responseJSON && x.responseJSON.error) || node._('s7rs-endpoint.cert.notDeployed'));
64
67
  $('#s7rs-cert-use').hide();
65
68
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-s7-rust",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Siemens S7 nodes for Node-RED: S7comm and S7CommPlus (S7-1200/1500 symbolic access) clients written in Rust, running in-process (Node-API). Linux x64.",
5
5
  "keywords": [
6
6
  "node-red",