in reply to SSL error TLSv1.2

Never mind: solved it. I was supplying the SSL_passwd_cb option as a variable instead of sub{$pass}.