probably wouldn't have been possible previously..
although pure-ftp had support for SNI, the required pure-certd binary was never included in the install package..
has been for a while now though, so adding in the configuration to actually use SNI in pure-ftpd should be straightforward and quick to implement, especially since the certificate is already going to exist for the website anyway...
*** note : not tested..
create /usr/local/bin/pureftpd-cert-handler.sh
#!/bin/sh
# Strip "ftp." or "www." prefix to match the root domain filename
DOMAIN=$(echo "$CERTD_SNI_NAME" | sed -E 's/^(ftp|www)\.//')
CERT_PATH="/var/local/enhance/website_ssl/${DOMAIN}.cert"
KEY_PATH="/var/local/enhance/website_ssl/${DOMAIN}.key"
if [ -f "$CERT_PATH" ] && [ -f "$KEY_PATH" ]; then
echo "action:strict"
echo "cert_file:${CERT_PATH}"
echo "key_file:${KEY_PATH}"
else
# Fallback to the default self-signed cert if no domain match is found
echo "action:fallback"
fi
echo "end"
chmod +x /usr/local/bin/pureftpd-cert-handler.sh
Create /etc/systemd/system/pure-certd.service
[Unit]
Description=Pure-FTPd SNI Certificate Daemon
Before=pure-ftpd.service
[Service]
Type=simple
ExecStart=/usr/sbin/pure-certd -s /var/run/pure-certd.sock -r /usr/local/bin/pureftpd-cert-handler.sh
Restart=always
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable --now pure-certd
echo "/var/run/pure-certd.sock" > /etc/pure-ftpd/conf/ExtCert
echo "1" > /etc/pure-ftpd/conf/TLS
systemctl restart pure-ftpd