aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Net/IMAP/InterIMAP.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Net/IMAP/InterIMAP.pm')
-rw-r--r--lib/Net/IMAP/InterIMAP.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm
index a0be91e..53fddec 100644
--- a/lib/Net/IMAP/InterIMAP.pm
+++ b/lib/Net/IMAP/InterIMAP.pm
@@ -1398,6 +1398,8 @@ sub _start_ssl($$) {
or $self->_ssl_error("Can't load verify locations");
}
Net::SSLeay::CTX_set_verify($ctx, Net::SSLeay::VERIFY_PEER());
+ Net::SSLeay::CTX_set_purpose($ctx, Net::SSLeay::X509_PURPOSE_SSL_SERVER())
+ or $self->_ssl_error("Can't set purpose");
}
else {
Net::SSLeay::CTX_set_verify($ctx, Net::SSLeay::VERIFY_NONE());