No breaking changes.
- Fix: a corrupted or missing client certificate/key made
SHCAPIAsync
crash with a raw, crypticssl.SSLError: [SSL] PEM libinstead of a
catchable error. This only happened on the fallback path (no pre-built
ssl_contextpassed to the constructor — a direct library user, or a
caller predating thessl_contextparameter); callers that pre-build the
context off-loop (e.g.boschshc-hass) were already unaffected by this
specific crash shape via their own error handling.SHCAPIAsync.__init__
now catchesssl.SSLError/OSError/ValueErrorfrombuild_ssl_context()
and re-raises asSHCCertificateError, matching the existing convention
already used by the sync-sidecertificate.pyfor the same failure class.
Found while root-causing a community report of an integration setup
crashing after a corrupted PEM file on disk. - Hardening:
register_client.py'swrite_tls_asset()now calls
os.fsync()before closing the file handle. Without it, a crash or
power-loss in the narrow window between a successful pairing and the OS
flushing dirty pages to disk could leave a truncated/empty PEM file that
only surfaces as a cryptic failure much later, on some unrelated future
restart.