From 0b6febadb714c3d5a62779fef076d88f066a61ba Mon Sep 17 00:00:00 2001 From: jhurst Date: Wed, 15 Jul 2020 13:23:19 -0700 Subject: replaced openssl dependency with internal SHA-1 API --- src/AS_02_ACES.cpp | 5 ++--- src/KM_sha1.h | 2 +- src/Makefile.am | 4 +++- src/ST2052_TextParser.cpp | 4 ++-- src/asdcp-test.cpp | 4 ++-- src/asdcp-util.cpp | 4 ++-- src/fips-186-rng-test.cpp | 1 - 7 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/AS_02_ACES.cpp b/src/AS_02_ACES.cpp index 876af18..c8eeca3 100644 --- a/src/AS_02_ACES.cpp +++ b/src/AS_02_ACES.cpp @@ -28,12 +28,11 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include "AS_02_ACES.h" -//#include "info.h" #include "AS_02_internal.h" #include #include -#include #ifdef min #undef min @@ -256,7 +255,7 @@ AS_02::ACES::CreateTargetFrameAssetId(Kumu::UUID& rID, const std::string& target static Kumu::UUID AS_02::ACES::create_4122_type5_id(const byte_t* subject_name, Kumu::fsize_t size, const byte_t* ns_id) { - SHA_CTX ctx; + SHA1_CTX ctx; SHA1_Init(&ctx); SHA1_Update(&ctx, ns_id, NS_ID_LENGTH); SHA1_Update(&ctx, subject_name, size); diff --git a/src/KM_sha1.h b/src/KM_sha1.h index 9bc165c..b68341c 100644 --- a/src/KM_sha1.h +++ b/src/KM_sha1.h @@ -50,5 +50,5 @@ namespace Kumu { #endif // _KM_SHA1_H_ // -// end +// end KM_sha1.h // diff --git a/src/Makefile.am b/src/Makefile.am index 7768b39..b205871 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -50,6 +50,7 @@ include_HEADERS = \ KM_mutex.h \ KM_platform.h \ KM_prng.h \ + KM_sha1.h \ KM_util.h \ KM_tai.h \ KM_xml.h \ @@ -102,7 +103,8 @@ endif # sources for kumu library libkumu_la_SOURCES = KM_error.h KM_fileio.cpp KM_fileio.h KM_log.cpp KM_log.h \ KM_memio.h KM_mutex.h KM_platform.h KM_prng.cpp KM_prng.h KM_util.cpp \ - KM_util.h KM_xml.cpp KM_xml.h KM_tai.h KM_tai.cpp + KM_util.h KM_xml.cpp KM_xml.h KM_tai.h KM_tai.cpp \ + KM_sha1.cpp KM_sha1.h # linker flags (*not* including libraries to link against) for a library libkumu_la_LDFLAGS = -release @VERSION@ diff --git a/src/ST2052_TextParser.cpp b/src/ST2052_TextParser.cpp index 305f46f..75c0e86 100644 --- a/src/ST2052_TextParser.cpp +++ b/src/ST2052_TextParser.cpp @@ -31,7 +31,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "AS_02_internal.h" #include "KM_xml.h" -#include +#include "KM_sha1.h" using namespace Kumu; using namespace ASDCP; @@ -66,7 +66,7 @@ static byte_t s_font_id_prefix[NS_ID_LENGTH] = { static Kumu::UUID create_4122_type5_id(const std::string& subject_name, const byte_t* ns_id) { - SHA_CTX ctx; + SHA1_CTX ctx; SHA1_Init(&ctx); SHA1_Update(&ctx, ns_id, NS_ID_LENGTH); SHA1_Update(&ctx, (byte_t*)subject_name.c_str(), subject_name.size()); diff --git a/src/asdcp-test.cpp b/src/asdcp-test.cpp index df108c3..fbb952d 100755 --- a/src/asdcp-test.cpp +++ b/src/asdcp-test.cpp @@ -49,11 +49,11 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include #include #include #include #include -#include #include #include @@ -1889,7 +1889,7 @@ digest_file(const char* filename) ASDCP_TEST_NULL_STR(filename); FileReader Reader; - SHA_CTX Ctx; + SHA1_CTX Ctx; SHA1_Init(&Ctx); ByteString Buf(8192); diff --git a/src/asdcp-util.cpp b/src/asdcp-util.cpp index a3c891d..3f70a0a 100755 --- a/src/asdcp-util.cpp +++ b/src/asdcp-util.cpp @@ -35,8 +35,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include #include -#include using namespace Kumu; @@ -182,7 +182,7 @@ Result_t digest_file(const std::string& filename) { FileReader Reader; - SHA_CTX Ctx; + SHA1_CTX Ctx; SHA1_Init(&Ctx); ByteString Buf(8192); diff --git a/src/fips-186-rng-test.cpp b/src/fips-186-rng-test.cpp index 08a1665..8c94595 100755 --- a/src/fips-186-rng-test.cpp +++ b/src/fips-186-rng-test.cpp @@ -31,7 +31,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include using namespace Kumu; -- cgit v1.2.3