#!/bin/bash
# feedproxy.google.com/~r/Command-line-fu/~3/7S2kmevHeL0/download-certificate-chain-from-ftp
echo | openssl s_client -showcerts -connect ftp.domain.com:ftp -starttls ftp 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
