summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean Bullock <37306566+dcbullock@users.noreply.github.com>2019-08-15 14:04:32 -0700
committerGitHub <noreply@github.com>2019-08-15 14:04:32 -0700
commitcf81f87c1517aabb892f0ea29ab5b6f7d8a09d47 (patch)
tree57dc0afed8f9f9e74739844df9051492d1a27f90
parent5c74d64d6e8d72b54e4ab34204c1ba06539422f5 (diff)
parent1ef763fceb73914fdcabf4a85aa09c35c44427c9 (diff)
Merge pull request #12 from dcbullock/master
rel_2_10_34
-rw-r--r--configure.ac2
-rwxr-xr-xsrc/AS_DCP_MXF.cpp29
2 files changed, 29 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index d4a7459..be578c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ AC_PREREQ([2.59])
# For example, if asdcplib version 1.0.0 were modified to accomodate changes
# in file format, and if no changes were made to AS_DCP.h, the new version would be
# 1.0.1. If changes were also required in AS_DCP.h, the new version would be 1.1.1.
-AC_INIT([asdcplib], [2.10.34], [asdcplib@cinecert.com])
+AC_INIT([asdcplib], [2.10.35], [asdcplib@cinecert.com])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([src/KM_error.h])
diff --git a/src/AS_DCP_MXF.cpp b/src/AS_DCP_MXF.cpp
index e23fb86..d3606fe 100755
--- a/src/AS_DCP_MXF.cpp
+++ b/src/AS_DCP_MXF.cpp
@@ -36,6 +36,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ACES.h"
#include "MPEG.h"
#include "Wav.h"
+#include "KM_util.h"
#include <iostream>
#include <iomanip>
@@ -688,7 +689,33 @@ ASDCP::IntegrityPack::TestValues(const ASDCP::FrameBuffer& FB, const byte_t* Ass
HMAC->Update(FB.RoData(), FB.Size() - HMAC_SIZE);
HMAC->Finalize();
- return HMAC->TestHMACValue(p);
+ Result_t result = RESULT_OK;
+ result = HMAC->TestHMACValue(p);
+
+ if (KM_FAILURE(result))
+ {
+ Result_t r = RESULT_OK;
+ char hmac_str[HMAC_SIZE*10];
+ char found_str[HMAC_SIZE*10];
+ byte_t hmac_buf[HMAC_SIZE];
+
+
+ Kumu::bin2hex(p, HMAC_SIZE, found_str, HMAC_SIZE*10);
+
+ r = HMAC->GetHMACValue(hmac_buf);
+ if ( KM_SUCCESS( r ) )
+ {
+ Kumu::bin2hex(hmac_buf, HMAC_SIZE, hmac_str, HMAC_SIZE*10);
+ }
+ else
+ {
+ snprintf(hmac_str, HMAC_SIZE*10, " - read error - ");
+ }
+
+ DefaultLogSink().Error("IntegrityPack failure: HMAC is %s, expecting %s.\n", found_str, hmac_str);
+ }
+
+ return result;
}
//