You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
809 B

  1. param (
  2. [Parameter(Mandatory = $true)]
  3. [string]$Password
  4. )
  5. # Import into current user root CA store
  6. $CertPassword = ConvertTo-SecureString -String "$Password" -Force -AsPlainText
  7. Import-PfxCertificate -Exportable -FilePath .\docker-self-signed.pfx -CertStoreLocation Cert:\CurrentUser\Root\ -Password $CertPassword
  8. # Copy to user profile to use as HTTPS certificate in server containers
  9. mkdir $env:USERPROFILE\.aspnet\https -Force
  10. Copy-Item docker-self-signed.pem $env:USERPROFILE\.aspnet\https -Force
  11. Copy-Item docker-self-signed.key $env:USERPROFILE\.aspnet\https -Force
  12. Copy-Item docker-self-signed.pfx $env:USERPROFILE\.aspnet\https -Force
  13. # Copy to src folder to register as a root CA in client containers
  14. Copy-Item docker-self-signed.pem ..\..\src\certificates\docker-self-signed.crt -Force