This is a PHP Library to manage certificates in DSM / SRM
To use it, just clone it, rename and edit test.php.
The constructor "synoapi" needs 3 parameters:
- address of your DSM / SRM (example : 'http://localhost:5000')
- your username
- your password
The "UpdateCertificate" function need 4 more parameters:
- your domain name (example : 'yourdomain.com')
- the filename of your private key
- the filename of your certificate
- the filename of your chain of trust
Example for letsencrypt's directories: /etc/letsencrypt/live/yourdomain.com/privkey.pem /etc/letsencrypt/live/yourdomain.com/cert.pem /etc/letsencrypt/live/yourdomain.com/chain.pem
I use this code on a raspberry pi that renew a letsencrypt wildcard certificate (*.yourdomain.com). That way my raspberry pi is able to update every certificates of my peripherals (synology router and my ds216).