Loading Makefile +3 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,9 @@ UTIL_EXEC = $(BIN_DIR)/$(PROJECT)-util CC = gcc OPTIMIZE = -O3 WARN = -Wall -Wextra -pedantic #CDEFS += # This is necessary because the library depends on # both C99 _and_ POSIX (for the BSD sockets API). CDEFS += -D_POSIX_C_SOURCE=1 CFLAGS += -std=c99 -g ${WARN} ${CDEFS} ${OPTIMIZE} LIB_INCS = -I$(LIB_DIR) -I$(PUB_INC) -I$(PBC_INC) -I$(VND_INC) Loading project.yml +2 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,8 @@ :test_preprocess: - *common_defines - TEST :release: - *common_defines :flags: :release: Loading src/lib/kinetic_pdu.c +6 −3 Original line number Diff line number Diff line Loading @@ -80,7 +80,8 @@ bool KineticPDU_Send(KineticPDU* request) request->connection->socketDescriptor); // Populate the HMAC for the protobuf KineticHMAC_Init(&request->hmac, KINETIC_PROTO_SECURITY_ACL_HMACALGORITHM_HmacSHA1); KineticHMAC_Init(&request->hmac, KINETIC_PROTO_SECURITY_ACL_HMACALGORITHM_HmacSHA1); KineticHMAC_Populate(&request->hmac, &request->protoData.message.proto, request->connection->key); Loading Loading @@ -182,8 +183,10 @@ bool KineticPDU_Receive(KineticPDU* const response) if (!KineticHMAC_Validate(response->proto, response->connection->key)) { LOG("Received PDU protobuf message has invalid HMAC!"); response->protoData.message.proto.command = &response->protoData.message.command; response->protoData.message.command.status = &response->protoData.message.status; response->protoData.message.proto.command = &response->protoData.message.command; response->protoData.message.command.status = &response->protoData.message.status; response->protoData.message.status.code = KINETIC_PROTO_STATUS_STATUS_CODE_DATA_ERROR; Loading src/lib/kinetic_socket.c +0 −3 Original line number Diff line number Diff line Loading @@ -41,9 +41,6 @@ #include <netdb.h> #include <signal.h> #include <unistd.h> #include <string.h> #include <stdio.h> #include <string.h> #include "socket99/socket99.h" Loading test/integration/test_kinetic_socket.c +2 −1 Original line number Diff line number Diff line Loading @@ -30,9 +30,10 @@ #include <unistd.h> #include <fcntl.h> #include <sys/socket.h> #include <netdb.h> #include <sys/select.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <signal.h> #include "socket99/socket99.h" Loading Loading
Makefile +3 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,9 @@ UTIL_EXEC = $(BIN_DIR)/$(PROJECT)-util CC = gcc OPTIMIZE = -O3 WARN = -Wall -Wextra -pedantic #CDEFS += # This is necessary because the library depends on # both C99 _and_ POSIX (for the BSD sockets API). CDEFS += -D_POSIX_C_SOURCE=1 CFLAGS += -std=c99 -g ${WARN} ${CDEFS} ${OPTIMIZE} LIB_INCS = -I$(LIB_DIR) -I$(PUB_INC) -I$(PBC_INC) -I$(VND_INC) Loading
project.yml +2 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,8 @@ :test_preprocess: - *common_defines - TEST :release: - *common_defines :flags: :release: Loading
src/lib/kinetic_pdu.c +6 −3 Original line number Diff line number Diff line Loading @@ -80,7 +80,8 @@ bool KineticPDU_Send(KineticPDU* request) request->connection->socketDescriptor); // Populate the HMAC for the protobuf KineticHMAC_Init(&request->hmac, KINETIC_PROTO_SECURITY_ACL_HMACALGORITHM_HmacSHA1); KineticHMAC_Init(&request->hmac, KINETIC_PROTO_SECURITY_ACL_HMACALGORITHM_HmacSHA1); KineticHMAC_Populate(&request->hmac, &request->protoData.message.proto, request->connection->key); Loading Loading @@ -182,8 +183,10 @@ bool KineticPDU_Receive(KineticPDU* const response) if (!KineticHMAC_Validate(response->proto, response->connection->key)) { LOG("Received PDU protobuf message has invalid HMAC!"); response->protoData.message.proto.command = &response->protoData.message.command; response->protoData.message.command.status = &response->protoData.message.status; response->protoData.message.proto.command = &response->protoData.message.command; response->protoData.message.command.status = &response->protoData.message.status; response->protoData.message.status.code = KINETIC_PROTO_STATUS_STATUS_CODE_DATA_ERROR; Loading
src/lib/kinetic_socket.c +0 −3 Original line number Diff line number Diff line Loading @@ -41,9 +41,6 @@ #include <netdb.h> #include <signal.h> #include <unistd.h> #include <string.h> #include <stdio.h> #include <string.h> #include "socket99/socket99.h" Loading
test/integration/test_kinetic_socket.c +2 −1 Original line number Diff line number Diff line Loading @@ -30,9 +30,10 @@ #include <unistd.h> #include <fcntl.h> #include <sys/socket.h> #include <netdb.h> #include <sys/select.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <signal.h> #include "socket99/socket99.h" Loading