Installer ou retirer les racines de test
Ouvrez PowerShell dans le dossier où vous avez téléchargé le fichier. Les commandes ciblent le magasin racine de votre compte Windows et demandent une confirmation. Le retrait de confiance est local à ce compte. Il ne modifie ni le certificat du serveur ni UbiX Trusted Platform.
UbiX-Trust-Test-Valid
Télécharger le certificat
Empreinte SHA-256 30EDCF9D7A38B9CC285AD8EB740C2D1847E1A4C14A87492FFA3EB4503B1BA2DC
Installer sur Windows
$cert = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new(
(Join-Path $PWD.Path 'UbiX-Trust-Test-Valid.cer'))
if ($cert.GetCertHashString('SHA256') -ne '30EDCF9D7A38B9CC285AD8EB740C2D1847E1A4C14A87492FFA3EB4503B1BA2DC') {
throw 'Empreinte inattendue. Installation annulée.'
}
if ((Read-Host 'Installer UbiX-Trust-Test-Valid pour cet utilisateur ? OUI pour confirmer') -ceq 'OUI') {
Import-Certificate -FilePath (Join-Path $PWD.Path 'UbiX-Trust-Test-Valid.cer') -CertStoreLocation 'Cert:\CurrentUser\Root'
}
Retirer du magasin Windows
$path = 'Cert:\CurrentUser\Root\D2955A40237850CB48CA66466A60D00D421D3343'
$cert = Get-Item -LiteralPath $path -ErrorAction SilentlyContinue
if ($cert -and $cert.GetCertHashString('SHA256') -eq '30EDCF9D7A38B9CC285AD8EB740C2D1847E1A4C14A87492FFA3EB4503B1BA2DC') {
Remove-Item -LiteralPath $path -Confirm
}
UbiX-Trust-Test-Invalid
Télécharger le certificat
Empreinte SHA-256 D35F816AF2A1030B8EBE149B77DE7DCA29435A5798C43D33C5A86E0F39CC6338
Installer sur Windows
$cert = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new(
(Join-Path $PWD.Path 'UbiX-Trust-Test-Invalid.cer'))
if ($cert.GetCertHashString('SHA256') -ne 'D35F816AF2A1030B8EBE149B77DE7DCA29435A5798C43D33C5A86E0F39CC6338') {
throw 'Empreinte inattendue. Installation annulée.'
}
if ((Read-Host 'Installer UbiX-Trust-Test-Invalid pour cet utilisateur ? OUI pour confirmer') -ceq 'OUI') {
Import-Certificate -FilePath (Join-Path $PWD.Path 'UbiX-Trust-Test-Invalid.cer') -CertStoreLocation 'Cert:\CurrentUser\Root'
}
Retirer du magasin Windows
$path = 'Cert:\CurrentUser\Root\95D7F30CCFC59211ADD55739B3564EE5B5233041'
$cert = Get-Item -LiteralPath $path -ErrorAction SilentlyContinue
if ($cert -and $cert.GetCertHashString('SHA256') -eq 'D35F816AF2A1030B8EBE149B77DE7DCA29435A5798C43D33C5A86E0F39CC6338') {
Remove-Item -LiteralPath $path -Confirm
}
Certificats présents sur votre poste
Une page web ne peut pas lire le magasin de confiance de votre appareil. Exécutez ce bloc dans PowerShell pour afficher le résultat localement. Les deux magasins sont interrogés en lecture seule et aucun résultat n’est envoyé au serveur.
$hashes = @('D2955A40237850CB48CA66466A60D00D421D3343', 'IND2955A40237850CB48CA66466A60D00D421D3343')
foreach ($scope in 'CurrentUser','LocalMachine') {
foreach ($hash in $hashes) {
$cert = Get-Item "Cert:\$scope\Root\$hash" -ErrorAction SilentlyContinue
if ($cert) {
[pscustomobject]@{
Magasin = "$scope\Root"
Nom = $cert.Subject
Emetteur = $cert.Issuer
Serie = $cert.SerialNumber
Debut = $cert.NotBefore
Expiration = $cert.NotAfter
Empreinte_SHA256 = $cert.GetCertHashString('SHA256')
} | Format-List
} else { "$scope\Root : $hash absent" }
}
}