summaryrefslogtreecommitdiff
path: root/src/phdr-wrap.cpp
diff options
context:
space:
mode:
authorJohn Hurst <jhurst@cinecert.com>2021-02-12 08:24:11 -0800
committerGitHub <noreply@github.com>2021-02-12 08:24:11 -0800
commitfc2f92cb883da9f5bd94a50033c2e99e141653a1 (patch)
tree32592b449be218bbf41efbc1afbd82a8f6cae3d7 /src/phdr-wrap.cpp
parent15d1d022d02d8782379dafac81fb51a9e6f5a157 (diff)
parentb5e47e45509ce3a1a696ef06583ef86a5e1e8223 (diff)
Merge pull request #70 from cinecert/sha1_builtin
Sha1 builtin
Diffstat (limited to 'src/phdr-wrap.cpp')
-rwxr-xr-xsrc/phdr-wrap.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/phdr-wrap.cpp b/src/phdr-wrap.cpp
index b919b96..1632508 100755
--- a/src/phdr-wrap.cpp
+++ b/src/phdr-wrap.cpp
@@ -471,9 +471,6 @@ write_JP2K_file(CommandOptions& Options)
AESEncContext* Context = 0;
HMACContext* HMAC = 0;
- byte_t IV_buf[CBC_BLOCK_SIZE];
- Kumu::FortunaRNG RNG;
-
ASDCP::MXF::FileDescriptor *essence_descriptor = 0;
ASDCP::MXF::InterchangeObject_list_t essence_sub_descriptors;
@@ -545,9 +542,12 @@ write_JP2K_file(CommandOptions& Options)
else
Kumu::GenRandomUUID(Info.AssetUUID);
+#ifdef HAVE_OPENSSL
// configure encryption
if( Options.key_flag )
{
+ byte_t IV_buf[CBC_BLOCK_SIZE];
+ Kumu::FortunaRNG RNG;
Kumu::GenRandomUUID(Info.ContextID);
Info.EncryptedEssence = true;
@@ -569,6 +569,7 @@ write_JP2K_file(CommandOptions& Options)
result = HMAC->InitKey(Options.key_value, Info.LabelSetType);
}
}
+#endif // HAVE_OPENSSL
if ( ASDCP_SUCCESS(result) )
{