fix: чтение SSLCertificateSHA1Hash через Registry API + версия 1.0.3

Усилена нормализация byte[]/Object[] из реестра; в логе версия модуля
для проверки git pull; RestoreTls нормализует thumbprint.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
PTah
2026-06-12 21:13:56 +10:00
parent 27c1f49be1
commit f35e2e2d96
3 changed files with 53 additions and 22 deletions
+4 -3
View File
@@ -45,7 +45,7 @@ function Show-RdpRepairClientCacheHint {
try {
Assert-RdpRepairAdministrator
Write-RdpRepairLog "=== Fix-RdpTls start $(Get-Date -Format o) ===" 'STEP' $logPath
Write-RdpRepairLog "=== Fix-RdpTls start $(Get-Date -Format o) (RdpRepair $($script:RdpRepairModuleVersion)) ===" 'STEP' $logPath
Write-RdpRepairLog "Компьютер: $env:COMPUTERNAME" 'INFO' $logPath
$report = Export-RdpRepairDiagnosticReport -LogPath $logPath
@@ -76,9 +76,10 @@ try {
Write-RdpRepairLog 'Все cert просрочены' 'ERROR' $logPath
exit 2
}
$thumb = $valid.Thumbprint
$thumb = ConvertTo-RdpRepairThumbprintHex -HashValue $valid.Thumbprint
if (-not $thumb) { throw 'Invalid certificate thumbprint' }
if (-not (Get-RdpRepairSslCertificateHash)) {
Write-RdpRepairLog "Привязка $($valid.Thumbprint)..." 'INFO' $logPath
Write-RdpRepairLog "Привязка $thumb..." 'INFO' $logPath
Set-RdpRepairCertificateBinding -Thumbprint $thumb -LogPath $logPath | Out-Null
}
$bind = Test-RdpRepairCertificateBindingPersisted -ExpectedThumbprint $thumb -LogPath $logPath