in reply to Net::SMTP::SSL connect failure

Did some stracing.

$Net::SSLeay::trace = 2;
DEBUG: .../IO/Socket/ socket not yet connected DEBUG: .../IO/Socket/ socket connected DEBUG: .../IO/Socket/ ssl handshake not started DEBUG: .../IO/Socket/ not using SNI because openssl is too +old DEBUG: .../IO/Socket/ set socket to non-blocking to enforce + timeout=120 DEBUG: .../IO/Socket/ ssl handshake in progress DEBUG: .../IO/Socket/ waiting for fd to become ready: SSL w +ants a read first DEBUG: .../IO/Socket/ socket ready, retrying connect DEBUG: .../IO/Socket/ SSL connect attempt failed DEBUG: .../IO/Socket/ SSL connect attempt failed error:140 +90086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify fai +led DEBUG: .../IO/Socket/ fatal SSL error: SSL connect attempt +failed error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certif +icate verify failed DEBUG: .../IO/Socket/ IO::Socket::IP configuration failed ERROR: Died at ./ line 11.

Replies are listed 'Best First'.
Re^2: Net::SMTP::SSL connect failure
by noxxi (Pilgrim) on Nov 21, 2014 at 20:34 UTC

    > I suspect this has to do with an invalid certification because my test program works fine for sending to gmail.
    > ...
    > my $s = Net::SMTP::SSL->new(''...
    > ...
    > ...SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

    I guess your certificate is not signed by any of the trusted CAs on the system. Thus the verification will fail, because there is not trust anchor. In old times (before 1.950, released 07/2013) the default was to not verify the certificate which is of course a bad idea for a default when doing security relevant stuff.

      Yep, I changed that code. These devices run on LANs with multiple interfaces.