Commit 0c69f2e1 authored by Monty's avatar Monty

Fixed compiler warnings

parent d07a6e33
...@@ -295,6 +295,7 @@ int SSL_connect(SSL* ssl) ...@@ -295,6 +295,7 @@ int SSL_connect(SSL* ssl)
sendClientHello(*ssl); sendClientHello(*ssl);
if (!ssl->GetError()) if (!ssl->GetError())
ssl->useStates().UseConnect() = CLIENT_HELLO_SENT; ssl->useStates().UseConnect() = CLIENT_HELLO_SENT;
/* fall through */
case CLIENT_HELLO_SENT : case CLIENT_HELLO_SENT :
neededState = ssl->getSecurity().get_resuming() ? neededState = ssl->getSecurity().get_resuming() ?
...@@ -302,13 +303,14 @@ int SSL_connect(SSL* ssl) ...@@ -302,13 +303,14 @@ int SSL_connect(SSL* ssl)
while (ssl->getStates().getClient() < neededState) { while (ssl->getStates().getClient() < neededState) {
if (ssl->GetError()) break; if (ssl->GetError()) break;
processReply(*ssl); processReply(*ssl);
// if resumption failed, reset needed state // if resumption failed, reset needed state
if (neededState == serverFinishedComplete) if (neededState == serverFinishedComplete)
if (!ssl->getSecurity().get_resuming()) if (!ssl->getSecurity().get_resuming())
neededState = serverHelloDoneComplete; neededState = serverHelloDoneComplete;
} }
if (!ssl->GetError()) if (!ssl->GetError())
ssl->useStates().UseConnect() = FIRST_REPLY_DONE; ssl->useStates().UseConnect() = FIRST_REPLY_DONE;
/* fall through */
case FIRST_REPLY_DONE : case FIRST_REPLY_DONE :
if(ssl->getCrypto().get_certManager().sendVerify()) if(ssl->getCrypto().get_certManager().sendVerify())
...@@ -326,6 +328,7 @@ int SSL_connect(SSL* ssl) ...@@ -326,6 +328,7 @@ int SSL_connect(SSL* ssl)
if (!ssl->GetError()) if (!ssl->GetError())
ssl->useStates().UseConnect() = FINISHED_DONE; ssl->useStates().UseConnect() = FINISHED_DONE;
/* fall through */
case FINISHED_DONE : case FINISHED_DONE :
if (!ssl->getSecurity().get_resuming()) if (!ssl->getSecurity().get_resuming())
...@@ -335,6 +338,7 @@ int SSL_connect(SSL* ssl) ...@@ -335,6 +338,7 @@ int SSL_connect(SSL* ssl)
} }
if (!ssl->GetError()) if (!ssl->GetError())
ssl->useStates().UseConnect() = SECOND_REPLY_DONE; ssl->useStates().UseConnect() = SECOND_REPLY_DONE;
/* fall through */
case SECOND_REPLY_DONE : case SECOND_REPLY_DONE :
ssl->verifyState(serverFinishedComplete); ssl->verifyState(serverFinishedComplete);
...@@ -343,7 +347,7 @@ int SSL_connect(SSL* ssl) ...@@ -343,7 +347,7 @@ int SSL_connect(SSL* ssl)
if (ssl->GetError()) { if (ssl->GetError()) {
GetErrors().Add(ssl->GetError()); GetErrors().Add(ssl->GetError());
return SSL_FATAL_ERROR; return SSL_FATAL_ERROR;
} }
return SSL_SUCCESS; return SSL_SUCCESS;
default : default :
...@@ -371,7 +375,6 @@ int SSL_accept(SSL* ssl) ...@@ -371,7 +375,6 @@ int SSL_accept(SSL* ssl)
ssl->SetError(no_error); ssl->SetError(no_error);
if (ssl->GetError() == YasslError(SSL_ERROR_WANT_WRITE)) { if (ssl->GetError() == YasslError(SSL_ERROR_WANT_WRITE)) {
ssl->SetError(no_error); ssl->SetError(no_error);
ssl->SendWriteBuffered(); ssl->SendWriteBuffered();
if (!ssl->GetError()) if (!ssl->GetError())
...@@ -385,6 +388,7 @@ int SSL_accept(SSL* ssl) ...@@ -385,6 +388,7 @@ int SSL_accept(SSL* ssl)
processReply(*ssl); processReply(*ssl);
if (!ssl->GetError()) if (!ssl->GetError())
ssl->useStates().UseAccept() = ACCEPT_FIRST_REPLY_DONE; ssl->useStates().UseAccept() = ACCEPT_FIRST_REPLY_DONE;
/* fall through */
case ACCEPT_FIRST_REPLY_DONE : case ACCEPT_FIRST_REPLY_DONE :
sendServerHello(*ssl); sendServerHello(*ssl);
...@@ -401,9 +405,10 @@ int SSL_accept(SSL* ssl) ...@@ -401,9 +405,10 @@ int SSL_accept(SSL* ssl)
sendServerHelloDone(*ssl); sendServerHelloDone(*ssl);
ssl->flushBuffer(); ssl->flushBuffer();
} }
if (!ssl->GetError()) if (!ssl->GetError())
ssl->useStates().UseAccept() = SERVER_HELLO_DONE; ssl->useStates().UseAccept() = SERVER_HELLO_DONE;
/* fall through */
case SERVER_HELLO_DONE : case SERVER_HELLO_DONE :
if (!ssl->getSecurity().get_resuming()) { if (!ssl->getSecurity().get_resuming()) {
...@@ -414,6 +419,7 @@ int SSL_accept(SSL* ssl) ...@@ -414,6 +419,7 @@ int SSL_accept(SSL* ssl)
} }
if (!ssl->GetError()) if (!ssl->GetError())
ssl->useStates().UseAccept() = ACCEPT_SECOND_REPLY_DONE; ssl->useStates().UseAccept() = ACCEPT_SECOND_REPLY_DONE;
/* fall through */
case ACCEPT_SECOND_REPLY_DONE : case ACCEPT_SECOND_REPLY_DONE :
sendChangeCipher(*ssl); sendChangeCipher(*ssl);
...@@ -422,6 +428,7 @@ int SSL_accept(SSL* ssl) ...@@ -422,6 +428,7 @@ int SSL_accept(SSL* ssl)
if (!ssl->GetError()) if (!ssl->GetError())
ssl->useStates().UseAccept() = ACCEPT_FINISHED_DONE; ssl->useStates().UseAccept() = ACCEPT_FINISHED_DONE;
/* fall through */
case ACCEPT_FINISHED_DONE : case ACCEPT_FINISHED_DONE :
if (ssl->getSecurity().get_resuming()) { if (ssl->getSecurity().get_resuming()) {
...@@ -432,6 +439,7 @@ int SSL_accept(SSL* ssl) ...@@ -432,6 +439,7 @@ int SSL_accept(SSL* ssl)
} }
if (!ssl->GetError()) if (!ssl->GetError())
ssl->useStates().UseAccept() = ACCEPT_THIRD_REPLY_DONE; ssl->useStates().UseAccept() = ACCEPT_THIRD_REPLY_DONE;
/* fall through */
case ACCEPT_THIRD_REPLY_DONE : case ACCEPT_THIRD_REPLY_DONE :
ssl->useLog().ShowTCP(ssl->getSocket().get_fd()); ssl->useLog().ShowTCP(ssl->getSocket().get_fd());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment