PR: 2144
authorDr. Stephen Henson <steve@openssl.org>
Tue, 19 Jan 2010 19:10:03 +0000 (19:10 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 19 Jan 2010 19:10:03 +0000 (19:10 +0000)
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>

Better fix for PR#2144

apps/apps.c
ssl/d1_srvr.c

index 35b62b8b096e17898b01877de3988624f3a8ccf0..fbe05f958802187ca385a770dbc163a27e06d2a4 100644 (file)
@@ -1137,6 +1137,7 @@ int set_cert_ex(unsigned long *flags, const char *arg)
                { "no_subject", X509_FLAG_NO_SUBJECT, 0},
                { "no_issuer", X509_FLAG_NO_ISSUER, 0},
                { "no_pubkey", X509_FLAG_NO_PUBKEY, 0},
+               { "extensions", ~X509_FLAG_NO_EXTENSIONS, 0xffffffffl},
                { "no_extensions", X509_FLAG_NO_EXTENSIONS, 0},
                { "no_sigdump", X509_FLAG_NO_SIGDUMP, 0},
                { "no_aux", X509_FLAG_NO_AUX, 0},
index a7a9599d0f8316af9ba5b8c48d6664678e42891c..499e2bba519e823278ba9976df494cef74e5cf5a 100644 (file)
@@ -264,7 +264,6 @@ int dtls1_accept(SSL *s)
                        ret=ssl3_get_client_hello(s);
                        if (ret <= 0) goto end;
                        dtls1_stop_timer(s);
-                       s->new_session = 2;
 
                        if (ret == 1 && (SSL_get_options(s) & SSL_OP_COOKIE_EXCHANGE))
                                s->state = DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A;
@@ -290,7 +289,6 @@ int dtls1_accept(SSL *s)
                        ret = dtls1_send_hello_verify_request(s);
                        if ( ret <= 0) goto end;
                        s->state=SSL3_ST_SW_FLUSH;
-                       s->new_session = 0;
                        s->s3->tmp.next_state=SSL3_ST_SR_CLNT_HELLO_A;
 
                        /* HelloVerifyRequests resets Finished MAC */
@@ -300,6 +298,7 @@ int dtls1_accept(SSL *s)
                        
                case SSL3_ST_SW_SRVR_HELLO_A:
                case SSL3_ST_SW_SRVR_HELLO_B:
+                       s->new_session = 2;
                        dtls1_start_timer(s);
                        ret=dtls1_send_server_hello(s);
                        if (ret <= 0) goto end;