Compare commits

...

2 Commits

Author SHA1 Message Date
b6dff4d2f3
included stddef in crypto header
All checks were successful
Codacy Scan / Codacy Security Scan (push) Successful in 16s
Build WHY2-chat / test-why2 (./out/why2-chat-client, ./configure.sh, ubuntu-latest, ./out/why2-chat-server) (push) Successful in 1m32s
Test WHY2-core / test-why2 (why2, ./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./out/why2-core-test, valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s) (push) Successful in 2m15s
Test WHY2-logger / test-why2 (why2-logger, ./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./out/why2-logger-test, valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s) (push) Successful in 2m27s
cause github actions are way too stupid...
2025-02-02 21:58:23 +01:00
44be9ad2f6
proccessing fread output on CA 2025-02-02 21:55:07 +01:00
2 changed files with 8 additions and 4 deletions

View File

@ -23,6 +23,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
extern "C" {
#endif
#include <stddef.h>
#include <openssl/types.h>
#include <why2/flags.h>

View File

@ -1152,10 +1152,12 @@ void *why2_authority_communicate_thread(void *arg)
//ALLOCATE
buffer = why2_calloc(buffer_size + 1, sizeof(char));
fread(buffer, buffer_size, 1, cert); //READ
//SEND STATUS
why2_send_socket_code(NULL, NULL, NULL, connection, strcmp(buffer, message) == 0 ? WHY2_CHAT_CODE_SUCCESS : WHY2_CHAT_CODE_FAILURE);
//READ
if (fread(buffer, buffer_size, 1, cert) == 1)
{
//SEND STATUS
why2_send_socket_code(NULL, NULL, NULL, connection, strcmp(buffer, message) == 0 ? WHY2_CHAT_CODE_SUCCESS : WHY2_CHAT_CODE_FAILURE);
}
//DEALLOCATION
why2_deallocate(buffer);