joe-elliott / cert-exporter

A Prometheus exporter that publishes cert expirations on disk and in Kubernetes secrets
Apache License 2.0
313 stars 88 forks source link

Support for pfx format #123

Closed EnriqueJoseSanjuaneloRobles-TomTom closed 1 year ago

EnriqueJoseSanjuaneloRobles-TomTom commented 1 year ago

Is it possible to add PFX/ PKCS#12 format support? I guess it can be done using this library https://pkg.go.dev/golang.org/x/crypto/pkcs12 ?

joe-elliott commented 1 year ago

I'm not opposed to it. Perhaps if the current decode method fails we attempt to decode using the format you have linked?

A change somewhere in here: https://github.com/joe-elliott/cert-exporter/blob/master/src/exporters/certHelpers.go#L38

Do you want to take a crack at it?