Added support for key pair, thanks to less-awful-ssl library. Thunderbird still doesn't seem to like it