Added external CA support, fixes #27