forderud / WindowsClientAuth

Windows examples of certificates for client authentication in web and TLS socket scenarios
MIT License
3 stars 0 forks source link

Convert cert generation script to PowerShell (get rid of OpenSSL) #14

Closed forderud closed 1 year ago

forderud commented 1 year ago

Associated branch: https://github.com/forderud/WindowsClientAuth/tree/ps-gen

Script stub for generating a clientAuth certificate:

$signer = Get-ChildItem "Cert:\CurrentUser\My" | Where-Object {$_.Subject -eq "CN=TestRootCertificate"}

New-SelfSignedCertificate -Type Custom -Subject "CN= ClientCert" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2") -KeyUsage DigitalSignature -KeyAlgorithm RSA -KeyLength 2048 -CertStoreLocation "Cert:\CurrentUser\My" -Signer $signer -NotAfter (Get-Date).AddMonths(12)

Challenge:

Links:

Certificate baseline

CA baseline

image image image

ClientAuth baseline

image image image

localhost baseline

image image image

forderud commented 1 year ago

Completed in https://github.com/forderud/WindowsClientAuth/pull/15