Opps I meant to add that, I need to setup WANT_WRITE condition, marked below:


Darryl Miles wrote:
diff -u -r -N -x '*~' openssl-0.9.8b/ssl/s3_pkt.c openssl-0.9.8b-me/ssl/s3_pkt.c
--- openssl-0.9.8b/ssl/s3_pkt.c 2005-10-01 00:38:20.000000000 +0100
+++ openssl-0.9.8b-me/ssl/s3_pkt.c      2006-06-22 17:45:46.000000000 +0100
@@ -1258,13 +1258,13 @@
        return(1);
        }
-void ssl3_send_alert(SSL *s, int level, int desc)
+int ssl3_send_alert(SSL *s, int level, int desc)
        {
        /* Map tls/ssl alert value to correct one */
        desc=s->method->ssl3_enc->alert_value(desc);
        if (s->version == SSL3_VERSION && desc == SSL_AD_PROTOCOL_VERSION)
                desc = SSL_AD_HANDSHAKE_FAILURE; /* SSL 3.0 does not have 
protocol_version alerts */
-       if (desc < 0) return;
+       if (desc < 0) return -1;
        /* If a fatal one, remove from cache */
        if ((level == 2) && (s->session != NULL))
                SSL_CTX_remove_session(s->ctx,s->session);
@@ -1273,9 +1273,10 @@
        s->s3->send_alert[0]=level;
        s->s3->send_alert[1]=desc;
        if (s->s3->wbuf.left == 0) /* data still being written out? */
-               s->method->ssl_dispatch_alert(s);
+               return s->method->ssl_dispatch_alert(s);
        /* else data is still being written out, we will get written
         * some time in the future */

[NEED TO SETUP WANT_WRITE CONDITION JUST HERE (and maybe the return -1 above need some throught), maybe we can call ssl_dispatch_alert(s) no matter what, since it must already setup WANT_WRITE ? Dont do the wbuf.left==0 check ? ]

+       return -1;
        }
int ssl3_dispatch_alert(SSL *s)
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to