Skip to content

Commit

Permalink
remove sha512, move md5 to thirdparty (#1443)
Browse files Browse the repository at this point in the history
title.

Tested that Auth runs and I can login still.
  • Loading branch information
EmosewaMC authored Feb 9, 2024
1 parent d2aeebc commit 62b670d
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 231 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ set(INCLUDED_DIRECTORIES
"thirdparty/SQLite"
"thirdparty/cpplinq"
"thirdparty/cpp-httplib"
"thirdparty/MD5"

"tests"
"tests/dCommonTests"
Expand Down Expand Up @@ -320,7 +321,7 @@ add_subdirectory(dPhysics)
add_subdirectory(dServer)

# Create a list of common libraries shared between all binaries
set(COMMON_LIBRARIES "dCommon" "dDatabase" "dNet" "raknet" "mariadbConnCpp" "magic_enum")
set(COMMON_LIBRARIES "dCommon" "dDatabase" "dNet" "raknet" "mariadbConnCpp" "magic_enum" "MD5")

# Add platform specific common libraries
if(UNIX)
Expand Down
7 changes: 0 additions & 7 deletions dCommon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ set(DCOMMON_SOURCES
"Game.cpp"
"GeneralUtils.cpp"
"LDFFormat.cpp"
"MD5.cpp"
"Metrics.cpp"
"NiPoint3.cpp"
"NiQuaternion.cpp"
"SHA512.cpp"
"Demangler.cpp"
"ZCompression.cpp"
"BrickByBrickFix.cpp"
Expand Down Expand Up @@ -68,8 +66,3 @@ else ()
endif ()

target_link_libraries(dCommon ZLIB::ZLIB)

# Disable deprecation warnings on MD5.cpp and SHA512.cpp for Apple Clang
if (APPLE)
set_source_files_properties("MD5.cpp" "SHA512.cpp" PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
endif()
154 changes: 0 additions & 154 deletions dCommon/SHA512.cpp

This file was deleted.

68 changes: 0 additions & 68 deletions dCommon/SHA512.h

This file was deleted.

1 change: 0 additions & 1 deletion dNet/AuthPackets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "Database.h"
#include "ZoneInstanceManager.h"
#include "MD5.h"
#include "SHA512.h"
#include "GeneralUtils.h"

#include <bcrypt/BCrypt.hpp>
Expand Down
2 changes: 2 additions & 0 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ if(UNIX AND NOT APPLE)
include_directories(${backtrace_SOURCE_DIR})
endif()
endif()

add_subdirectory(MD5)
6 changes: 6 additions & 0 deletions thirdparty/MD5/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
add_library(MD5 "MD5.cpp")

# Disable deprecation warnings on MD5.cpp for Apple Clang
if (APPLE)
set_source_files_properties("MD5.cpp" PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
endif()
File renamed without changes.
File renamed without changes.

0 comments on commit 62b670d

Please sign in to comment.