fix for item 7 report by Ivan Fratric of the Google Security Team
This commit is contained in:
parent
23300a201f
commit
86ebc48032
@ -4927,6 +4927,11 @@ int ProcessReply(CYASSL* ssl)
|
|||||||
atomicUser = 1;
|
atomicUser = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (ssl->error != 0 && ssl->error != WANT_READ && ssl->error != WANT_WRITE){
|
||||||
|
CYASSL_MSG("ProcessReply retry in error state, not allowed");
|
||||||
|
return ssl->error;
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
switch (ssl->options.processReply) {
|
switch (ssl->options.processReply) {
|
||||||
|
|
||||||
@ -5956,6 +5961,11 @@ int ReceiveData(CYASSL* ssl, byte* output, int sz, int peek)
|
|||||||
if (ssl->error == WANT_READ)
|
if (ssl->error == WANT_READ)
|
||||||
ssl->error = 0;
|
ssl->error = 0;
|
||||||
|
|
||||||
|
if (ssl->error != 0 && ssl->error != WANT_WRITE) {
|
||||||
|
CYASSL_MSG("User calling CyaSSL_read in error state, not allowed");
|
||||||
|
return ssl->error;
|
||||||
|
}
|
||||||
|
|
||||||
if (ssl->options.handShakeState != HANDSHAKE_DONE) {
|
if (ssl->options.handShakeState != HANDSHAKE_DONE) {
|
||||||
int err;
|
int err;
|
||||||
CYASSL_MSG("Handshake not complete, trying to finish");
|
CYASSL_MSG("Handshake not complete, trying to finish");
|
||||||
|
Loading…
Reference in New Issue
Block a user