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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user