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

Multiple subdomains with lets encrypt

Prior to support for wildcards I found it necessary to explicitly list each domain on a certificate in the form … -d example.com -d www.example.com -d blog.example.com -d www.blog.example.com … (which due to complexities in the odd mix of redirected domains I’m using worked best with the –webroot authentication). Thanks to Trojan’s explanation and documentation … Read more

Python Requests with wincertstore

I had a similar issue and fixed it using the python-certifi-win32 package (now out of maintenance): As of 2022 (as mentioned by Briareos386 in the comments) pip install pip-system-certs Original answer (out of maintenance) pip install python-certifi-win32 now you can just use: requests.get(url, verify=True) and the certificate is checked using the Windows Certificate Store. Note: … Read more

How to force Visual Studio to re-create the SSL certificate for a .NET Core Web Application running Kestrel?

I finally figured it out. For anyone else who runs into this, the steps to fix it are: All localhost certificates must be deleted in certificate manager. They can be found in Personal and Trusted Root The secrets.json file must be deleted. This can be found in \Users\[user]\AppData\Roaming\Microsoft\UserSecrets\ In powershell, re-run dotnet dev-certs https –trust … Read more

How to convert a .cer to a .p12 file

What works for me dealing with Push Notification certifies has been: Open the certificate: open my_filename.cer and click “View Certificates” to see the certificate’s name Go to Applications -> Utilities -> Keychain Access Ensure you have selected the “login” keychain, not the “system” one (thanks to @Matt Flettcher ) Go to “Certificates” Look for the … Read more

Within a web browser, is it possible for JavaScript to obtain information about the HTTPS Certificate being used for the current page?

You can use the opensource Forge project to do this. It implements SSL/TLS in JavaScript. You can make an ajax call to the server and use a callback to inspect the certificate. Keep in mind that the server is the one sending the JavaScript so this shouldn’t be used to determine whether or not you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)