Any chance of a Certbot port? https://certbot.eff.org/
They've got an install with Homebrew, but I'd rather do everything with MacPorts. (yeah, I know, I could learn to build ports myself and become the maintainer. And maybe I will at some point, but not right now)
