Package: ssmtp

On Sat, Jun 04, 2005 at 05:52:36PM +0200, Bernd Wachter wrote:
>Hi,
>there's a bug in ssmtp regarding authentification using client
>certificates in case the server tries a reauthentification with
>certificates when it becomes clear that he'll need to rely the incoming
>mail (i.e. on rcpt to, like most servers do).
>
>SSL_Read (an SSL_Write) do support automatic reauth, in that case
>they'll return an error (SSL_ERROR_WANT_READ respectively
>SSL_ERROR_WANT_WRITE) which means `try to read/write again till it fails
>with another error or is successful'.
>
>You might want to replace SSL_Read (and SSL_Write) with something an own
>function which might look like
>
>int netsslread(SSL *ssl_handle, char *buf, int len){
>       int i=0;
>       while (i<0){
>               i=SSL_read(ssl_handle, buf, len);
>               switch (i){
>               case SSL_ERROR_WANT_READ:
>                       continue;
>               default:
>                       return i;
>               }
>       }
>       return i;
>}
>
>int netsslwrite(SSL *ssl_handle, char *buf, int len){
>       int i=0;
>       while (i<0){
>               i=SSL_write(ssl_handle, buf, len);
>               switch (i){
>               case SSL_ERROR_WANT_WRITE:
>                       continue;
>               default: 
>                       return i;
>               }
>       }
>       return i;
>}
>
>This function takes the same arguments as SSL_read (SSL_write),
>returning the same values (except for retrying on SSL_ERROR_WANT_READ),
>thus making it a drop-in replacement for SSL_read by supporting
>reauthentification.
>
>I won't send a patch since I dropped ssmtp after discovering that
>problem in favour of a clean rewrite adding some other features.
>
>Bernd
>
>-- 
>100 kleine Haushaltstips:
>Zwiebeln statt Kiwis kaufen! Sie sind laenger haltbar und ausserdem
>laenger haltbar.

Mit freundlichen Grüßen,

Anibal Monsalve Salazar
--
 .''`. Debian GNU/Linux
: :' : Free Operating System
`. `'  http://debian.org/
  `-   http://v7w.com/anibal

Attachment: signature.asc
Description: Digital signature

Reply via email to