X509Certificate2 object

I want to access my ssl certificate through a X509Certificate2 object for creating a jwt token. I am unable to find a way to access my uploaded pfx file from octopus library. Can someone help me with this please?
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certificatePath,‘jwt’)

Thanks for getting in touch! If you have a certificate imported into your Octopus Certificates store (Library > Certificates), you can create a certificate variable type in your project and access it throughout your deployments.

We have some documentation on accessing the expanted properties of certificates in our documentation on Certificate Variables

There’s a property you can access the raw PFX output by using MyCertificate.Pfx, for example.
I’m interested to know if this is helpful.

Kind regards,