User Tools

Site Tools


certs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

certs [2024/12/16 05:51] – created johnsonjohncerts [2024/12/16 05:54] (current) johnsonjohn
Line 147: Line 147:
 } }
 </code> </code>
 +----
 +
 +====CertReq2023====
 +<code>
 +# User CertReq in Powershell to create your cert using the SHA256 (SHA-256) signature algorithm and a 2048 bit key size (RSA)  ##
 +
 +<#
 +JWJ0215 2023
 +#>
 +
 +# This will create your inf and save to your personal folder  'C:\Users\your name\'
 +
 +$Date = (Get-Date).ToString('ddMMyyyy')
 +
 +$ReqFile = "Cert_Req-$CodeSigning-" + "$Date" + ".req"
 +$InfFile = @"
 +    [NewRequest]`r
 +    Subject = "CN=$CodeSigningCert"`r
 +    KeySpec = 1
 +    KeyLength = 2048
 +    Exportable = TRUE`r
 +    RequestType = CMC`r
 +"@
 +    Write-Host "Generating Certificate Request file..." -ForegroundColor Yellow;
 +    $FinalInfFile = "Cert_Req_Inf-JWJ0215" + "$Date" + ".inf"
 +    New-Item $FinalInfFile -type file -value $InfFile
 +    cmd /c "certreq -new $FinalInfFile $ReqFile"
 +    Write-Host " "
 +    Write-Host "Certificate request file for $WebsiteName successfully generated!" -foregroundcolor DarkGreen;
 +</code>
 +----
 +
 +=====Certs TEXT=====
 +
 +====Certs.txt====
 +<code>
 +C:\ServiceNow MID Server SNOW-MID-S02\agent\jre\bin>keytool -import -alias thedacaresandcert -file "C:\Users\jwj0215admin\Desktop\thedacaresand2.cer" -keystore "C:\ServiceNow MID Server SNOW-MID-S02\agent\jre\lib\security\cacerts"
 +
 +changeit
 +
 +Delete the Cert
 +keytool -delete -noprompt -alias ${thedacaresandcrt} -storepass ${changeit}
 +
 +</code>
 +
 +----
 +
certs.txt · Last modified: 2024/12/16 05:54 by johnsonjohn