diff --git a/ssl/test/ssltest.c b/ssl/test/ssltest.c index 32297abd1..328bbdca3 100644 --- a/ssl/test/ssltest.c +++ b/ssl/test/ssltest.c @@ -1352,8 +1352,12 @@ static int SSL_client_test( /* renegotiate client */ if (sess_resume && sess_resume->do_reneg) { - if ((ret = ssl_renegotiate(ssl)) < 0) - goto client_test_exit; + if (ssl_renegotiate(ssl) == -SSL_ALERT_NO_RENEGOTIATION) + ret = 0; + else + ret = -SSL_ALERT_NO_RENEGOTIATION; + + goto client_test_exit; } if (sess_resume) @@ -1450,16 +1454,13 @@ int SSL_client_tests(void) goto cleanup; // no client renegotiation - //sess_resume.do_reneg = 1; - //if ((ret = SSL_client_test("Client renegotiation", - // &ssl_ctx, NULL, &sess_resume, - // DEFAULT_CLNT_OPTION, NULL, NULL, NULL)) != - // -SSL_ALERT_NO_RENEGOTIATION) - //{ - // printf("*** Error: %d\n", ret); TTY_FLUSH(); - // goto cleanup; - //} - //sess_resume.do_reneg = 0; + sess_resume.do_reneg = 1; + // test relies on openssl killing the call + if ((ret = SSL_client_test("Client renegotiation", + &ssl_ctx, NULL, &sess_resume, + DEFAULT_CLNT_OPTION, NULL, NULL, NULL))) + goto cleanup; + sess_resume.do_reneg = 0; sess_resume.stop_server = 1; if ((ret = SSL_client_test("Client session resumption #2", @@ -1579,7 +1580,6 @@ static void do_basic(void) /* check the return status */ if (ssl_handshake_status(ssl_clnt) < 0) { - printf("YA YA\n"); ssl_display_error(ssl_handshake_status(ssl_clnt)); goto error; } diff --git a/ssl/tls1.c b/ssl/tls1.c index d9f147a09..94f413b53 100755 --- a/ssl/tls1.c +++ b/ssl/tls1.c @@ -1239,7 +1239,7 @@ int basic_read(SSL *ssl, uint8_t **in_data) ssl->dc->bm_proc_index = 0; ret = do_handshake(ssl, buf, read_len); } - else /* no client renogiation allowed */ + else /* no client renegotiation allowed */ { ret = SSL_ERROR_NO_CLIENT_RENOG; goto error; diff --git a/ssl/tls1_clnt.c b/ssl/tls1_clnt.c index beb0e278b..3289afa75 100644 --- a/ssl/tls1_clnt.c +++ b/ssl/tls1_clnt.c @@ -123,7 +123,7 @@ int do_clnt_handshake(SSL *ssl, int handshake_type, uint8_t *buf, int hs_len) case HS_FINISHED: ret = process_finished(ssl, hs_len); disposable_free(ssl); /* free up some memory */ - /* note: client renogiation is not allowed after this */ + /* note: client renegotiation is not allowed after this */ break; case HS_HELLO_REQUEST: @@ -146,7 +146,6 @@ int do_client_connect(SSL *ssl) ssl->bm_read_index = 0; ssl->next_state = HS_SERVER_HELLO; ssl->hs_status = SSL_NOT_OK; /* not connected */ - x509_free(ssl->x509_ctx); /* sit in a loop until it all looks good */ while (ssl->hs_status != SSL_OK)