Create a self signed SSL Certificate for GCP use on Windows using OpenSSL

Note: open your command prompts and powershell as an “administrator”.

Path environment line

@”%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe” -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command “iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1'))" && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1'))

openssl genrsa -des3 -out “C:\Users\egusi\gcp\udoyen-server.key” 2048

openssl req -new -key “C:\Users\egusi\gcp\spikey-server.key” -out “C:\Users\egusi\gcp\spikey-server.csr”

Copy-Item C:\Users\egusi\gcp\spikey-server.key C:\Users\egusi\gcp\spikey-server.key.org

openssl rsa -in C:\Users\egusi\gcp\spikey-server.key.org -out C:\Users\egusi\gcp\spikey-server.key

openssl x509 -req -days 365 -in C:\Users\egusi\gcp\spikey-server.csr -signkey C:\Users\egusi\gcp\spikey-server.key -out C:\Users\egusi\gcp\spikey-server.crt

gcloud compute ssl-certificates create udoyen-server-cert — certificate=”C:\Users\egusi\gcp\spikey-server.crt” — private-key=”C:\Users\egusi\gcp\spikey-server.key”

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
george udosen

george udosen

45 Followers

DevOps | FullStack developer | Python::Flask | GCP Cloud Certified | AWS & AZURE Cloud Savy | Linux Sysadmin | Google IT Support