From 0e1e8e06debc4d7b00670eaa981ca5b382d90591 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 16 Sep 2015 16:49:00 +0200 Subject: Set X.509 certificate purpose to 'SSL Server' for SSL_verify=YES. --- lib/Net/IMAP/InterIMAP.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Net/IMAP') 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()); -- cgit v1.2.3