Certificates & appSettings - expanded variables Base64

Hi guys,

Having stored a Certificate in a variable I now need to use it to get it’s public certificate in Base64 printed into my config’s appsetting.

I’m aware of the variables at https://octopus.com/docs/deploying-applications/variables/certificate-variables but how I select the property when using the “Replace appSettings and connectionString entries in any .config files” feature with a certificate - it’s not an option within the editor?

What’s the easiest/cleanest way of accomplishing this?

Thanks,
James

Hi James,

Thanks for getting in touch! I’m sorry for the delay in getting back to you. Octopus stores this internally as a variable, so inside your .config file you should be able to cplace #{MyCertificate.Certificate}, which will evaluate to the Base64 certificate.

For replacing variables outside of appSettings, applicationSettings, or connectionStrings, you will need to specify “Substitute variables in files”.

Let me know if the above helps or if you have any further questions.

Best regards,
Daniel