[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SSL Connection using COMMSSLR4



Hi Friedhelm,

Yes, of course it supports TLS as well as SSL.

Th`e error message you're getting implies that your program has sent a 
request for the SSL handshake, but that the server isn't responding to 
it.  This is very common when you're connecting to an non-SSL 
connection, or when you're not following the protocol rules.

It's been a long time since I've written an SMTP-over-SSL routine, but 
if I recall correctly, you have to first connect as non-SSL and then 
exchange commands (I think STARTTLS?) to tell the other side that you 
will begin SSL.   Are you connecting to the right port?  (i.e. 587 
instead of 25) and are you sending the proper STARTTLS or whatever is 
required to initiate SSL?


On 6/16/2010 9:03 AM, Friedhelm Brügge wrote:
> Sorry, I forgot to send you the debug output:
>
> HTTPAPI Ver 1.23 released 2008-04-24
> OS/400 Ver V5R4M0
>
> New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
> DNS resolver retrans: 2
> DNS resolver retry  : 2
> DNS resolver options: x'00000136'
> DNS default domain: as400.BRUEGGE.BIZ
> DNS server found: 192.168.100.1
> https_init(): entered
> -------------------------------------------------------------------------------------
> Dump of local-side certificate information:
> -------------------------------------------------------------------------------------
> SetError() #32: Time out during SSL handshake
>
>
>
>
> Hi Scott,
>
> for my current project, I need to talk to SMTP and POP server over SSL. I noticed, that the HTTP library has the proper communication APIs in it, that allow my program to talk TCP and SSL.
>
> So I extended the export list of your HTTP lib a bit to export all the comm functions.
>
> So far, I'm able to connect to a POP server using SSL and do all the stuff I need.
>
> Connecting to the SMTP server over SSL gives me an error. My provider told me, that he only supports TLS and no SSL for SMTP.
>
> Reading your code, I found the function HTTPS_init, that sets up some SSL/TLS attributes for the connection. As far as I understand IBMs documentation, if these attributes aren't set, the default supports all versions of SSL and TLS.
>
> Do you have any idea, what's going wrong?
>
> This the the SMTP server I'm using: smtp.1und1.de   Port: 587
>
> The basic code:
>
> p_CommNew = %paddr('COMMSSL_NEW');
> p_CommDriver = comm_new;
> p_addr = comm_resolve( wwComm : %trimr(wwHost) : '' : wwPort : *OFF    );
> comm_Connect( wwComm : p_addr : wwTimeout );
> comm_Upgrade( wwComm : wwTimeout );
>
> The code fails on the UPGRADE.
>
> Thanks for any help
>
> Kind regards
>
> Friedhelm Brügge
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
>    

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------