Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Fixed SSL_WSAConnect_* not setting sent state when PostQueuedCompletionStatus is called.
  • Loading branch information
erickutcher committed Oct 29, 2018
1 parent 09fda6e commit 7c769b7
Show file tree
Hide file tree
Showing 30 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion HTTP_Proxy/connection.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/connection.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/doublylinkedlist.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/doublylinkedlist.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/file_operations.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/file_operations.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/globals.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/http.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/http.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_advapi32.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_advapi32.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_crypt32.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_crypt32.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_dlls.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_dlls.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_normaliz.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_normaliz.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_ntdll.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_ntdll.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_rpcrt4.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_rpcrt4.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_shell32.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_shell32.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_ws2_32.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/lite_ws2_32.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions HTTP_Proxy/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -1463,7 +1463,7 @@ int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL


EnterCriticalSection( &console_cs );
_wprintf( L"HTTP Proxy/Tunnel is made free under the GPLv3 license.\r\nVersion 1.0.0.1\r\nCopyright (c) 2016-2017 Eric Kutcher\r\n\r\n" );
_wprintf( L"HTTP Proxy/Tunnel is made free under the GPLv3 license.\r\nVersion 1.0.0.2\r\nCopyright (c) 2016-2018 Eric Kutcher\r\n\r\n" );
LeaveCriticalSection( &console_cs );


Expand Down
6 changes: 5 additions & 1 deletion HTTP_Proxy/ssl.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -775,6 +775,8 @@ SECURITY_STATUS SSL_WSAConnect_Response( SOCKET_CONTEXT *context, bool &sent )
}
else
{
sent = true;

// Do not post the ssl->cbIoBuffer size.
PostQueuedCompletionStatus( g_hIOCP, 0, ( ULONG_PTR )context, &context->overlapped_read );
}
Expand Down Expand Up @@ -924,6 +926,8 @@ SECURITY_STATUS SSL_WSAConnect_Reply( SOCKET_CONTEXT *context, bool &sent )
ssl->acd.OutBuffers[ 0 ].pvBuffer = NULL;
}

sent = true;

PostQueuedCompletionStatus( g_hIOCP, 0, ( ULONG_PTR )context, &context->overlapped_read );

return scRet;
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/ssl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/utilities.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion HTTP_Proxy/utilities.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
Copyright (C) 2016-2018 Eric Kutcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down

0 comments on commit 7c769b7

Please sign in to comment.