Hi,

I'd like to be able to store the certificates outside the webroot and also be able to have different certificate names for different environments. i.e. I dont want to call the certificates apns-production.pem and apns-development.pem as I have several sites and environments sharing a common codebase and would just like to be able to specify absolute paths to the pem files in the settings.php file for each site.

I see its possible to change the file name with a hidden variable but would also like to change the path.

I'm putting together a patch that shouldn't break the current model but will allow optional overriding of the certification location to an absolute path.

Kind regards,

John

Comments

johnennew’s picture

Status: Active » Needs review
StatusFileSize
new4.9 KB

Hi,

This patch suggestion adds a new variable called push_notifications_apns_certificate_folder. If empty the certificates folder in the module is used. It also adds a text field on the configuration screen to specify this folder location. The variable folder location is relative to the site root

For example, you may specify your certificates folder to be sites/example.org/certificates/

Kind regards,

John

haagendazs’s picture

StatusFileSize
new4.75 KB

Hi John,

Thanks for writing this patch. I reviewed it and made a few changes:

  • Absolute path vs. relative to site root: I had a request from a different user that wanted to store his certificates completely outside the any folder that is accessible from the web, so I think it would make more sense to let a user specify the absolute path when they want to store the certificate in a custom location
  • When a user removes a custom path from the admin interface, the variable wasn't cleared out
  • I changed the wording of the field description a bit

See attached patch and let me know your thoughts.
Danny

haagendazs’s picture

Assigned: Unassigned » haagendazs
johnennew’s picture

Hi Danny,

Looks great to me!

Rgds,
John

haagendazs’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.