How to create a self-signed certificate for a domain name for development

Using PowerShell From Windows 8.1 and Windows Server 2012 R2 (Windows PowerShell 4.0) and upwards, you can create a self-signed certificate using the new New-SelfSignedCertificate cmdlet: Examples: New-SelfSignedCertificate -DnsName www.mydomain.example -CertStoreLocation cert:\LocalMachine\My New-SelfSignedCertificate -DnsName subdomain.mydomain.example -CertStoreLocation cert:\LocalMachine\My New-SelfSignedCertificate -DnsName *.mydomain.example -CertStoreLocation cert:\LocalMachine\My Using the IIS Manager Note that IIS certificates use SHA-1 hashing, which isn’t … Read more

Nginx – Only enable SSL if SSL Certificates Exist

You can create an additional file ssl.conf and put here ssl configs: ssl_certificate /etc/nginx/certs/atvcap_cabundle.crt; ssl_certificate_key /etc/nginx/certs/atvcap.key; Then include from the main config: server_name atvcap.server.com; include /somepath/ssl.conf*; Make sure to include * symbol – this will not break when the file does not exist at development mode.

SSL Pinning and certificate expiry

Note: I’m more familiar with browser to server pinning (HTTP Public Key Pinning – HPKP) rather than app to server pinning, but I presume the principal is the same. In HPKP the pinning policy is provided by the server as a HTTP header but understand this is often built into the app rather than read … Read more

TLS with selfsigned certificate

It finally worked with the go built in x509.CreateCertificate, the problem was that I did not set the IsCA:true flag, I only set the x509.KeyUsageCertSign which made creating the self signed certificate work, but crashed while verifying the cert chain.

HTTP to HTTPS Nginx too many redirects

Since you are using cloudflare flexible SSL your nginx config file wll look like this:- server { listen 80 default_server; listen [::]:80 default_server; server_name mydomain.com www.mydomain.com; if ($http_x_forwarded_proto = “http”) { return 301 https://$server_name$request_uri; } root /var/www/html; index index.php index.html index.htm index.nginx-debian.html; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include … Read more

tech