Fix SSL handshake functions and SSL_clear() such that SSL_clear()
[openssl.git] / ssl / s3_srvr.c
index 9cea6e3..8c5b6e8 100644 (file)
@@ -180,8 +180,8 @@ int ssl3_accept(SSL *s)
                cb=s->ctx->info_callback;
 
        /* init things to blank */
                cb=s->ctx->info_callback;
 
        /* init things to blank */
-       if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
        s->in_handshake++;
        s->in_handshake++;
+       if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
 
        if (s->cert == NULL)
                {
 
        if (s->cert == NULL)
                {