Posts

Showing posts from June, 2021

Additions to the CPolydorou.Security Powershell Module

This post has been triggered by a project that I'm currently working on that involves nginx and containers. As part of the nginx configuration, I had to create a certificate key pair that was going to be used in order to secure traffic towards nginx. The challenge I faced was to convert the PFX certificate that was handed to me by the Certificate Authority team to the format nginx understood. Considering that this was a process that I'd followed many times in the past (and also blogged about), I decided to update a Powershell module of mine named CPolydorou.Security in order to make the use of OpenSSL friendlier to the Windows administrator.  The four new functions that are included in the latest version ( 1.2.0 ) are: Export-ServerCertificateFromPFX Export-CertificateChainFromPFX Export-PrivateKeyFromPFX Decrypt-PrivateKey Let's go through them one-by-one to see how they can help! For the examples demostrated below, I've created secure string objects for the passphras