Commit graph

2 commits

Author SHA1 Message Date
dtrentin
4cd7715594 fix(robustness): null guard WMI reads, dispose SHA256, abort LSV2 timeout (ISS-001, ISS-005, ISS-006)
ISS-001: MachineFingerprint.GetFingerprint() — null-safe WMI property reads
  - processorID and SerialNumber accessed with ?. and ?? string.Empty
  - prevents NullReferenceException on machines with missing WMI properties

ISS-005: LicenseValidator.Validate() — SHA256CryptoServiceProvider in using block
  - disposed on all code paths (success and failure)

ISS-006: Lsv2Client.Connect() — close TcpClient on timeout
  - _tcp.Close() called when ConnectAsync.Wait() times out
  - aborts pending socket task instead of leaking thread-pool slot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 23:00:08 +02:00
dtrentin
39a9566858 feat(07-license-core): RSA offline license core
Phase 07 complete:
- IMachineFingerprint + ILicenseValidator interfaces
- MachineFingerprint: WMI CPU ProcessorID + BaseBoard SerialNumber
- LicenseValidator: RSACryptoServiceProvider + SHA256, injectable public key
- LicenseFile.TryRead: out-param bool, no exceptions from file I/O
- 6 NUnit tests (valid/wrong-machine/tampered/empty/not-base64/missing-file)
- 118 tests total, 116 pass, 2 Fanuc FOCAS ignored (Windows DLL)
- Fix: missing 'using System' in CncMachineFactoryTests.cs
- Fix: Dockerfile.test updated for NcProgramManager rename

PublicKeyXml = PLACEHOLDER until Phase 09 generates real key pair.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 22:58:14 +02:00