added filename parameter

In cases when the certificate name may differ from the actual filename
Defaults to match existing behaviour