lib3mf 2.5 :

- aggiornamento versione
- utilizzate le nostre librerie esterne libzip e zlib e non quelle incluse in lib3mf.
This commit is contained in:
SaraP
2026-08-25 12:44:11 +02:00
parent ea6efc1e36
commit 513f08e691
544 changed files with 52634 additions and 30760 deletions
@@ -79,12 +79,12 @@ namespace NMR {
}
PModel const & model = m_pContext.model();
if (!model->hasCryptoRandCallbak())
if (!model->hasCryptoRandCallbak() && (keyStore->getResourceDataCount()>0))
m_pContext.warnings()->addWarning(NMR_ERROR_RNGCALLBACKNOTCRYPTOSTRONG, eModelWarningLevel::mrwInvalidOptionalValue);
for (nfUint64 i = 0; i < keyStore->getResourceDataCount(); ++i) {
PKeyStoreResourceData rd = keyStore->getResourceData(i);
if (rd->getGroup()->isOpen()) {
std::vector<nfByte> newIv(fnGetAlgorithmInitVectorSize(rd->getEncryptionAlgorithm()), 0);
std::vector<nfByte> newIv((size_t)fnGetAlgorithmInitVectorSize(rd->getEncryptionAlgorithm()), 0);
model->generateRandomBytes(newIv.data(), newIv.size());
rd->setInitVector(newIv);
}
@@ -139,7 +139,7 @@ namespace NMR {
ctx.m_sKekDecryptData.m_pAccessRight = ar;
std::vector<nfByte> closedKey;
//give consumer a chance to (re)encrypt this key
nfUint64 wrapped = ctx.m_fnWrap(key, closedKey, ctx.m_sKekDecryptData);
ctx.m_fnWrap(key, closedKey, ctx.m_sKekDecryptData);
ar->setCipherValue(closedKey);
} catch (CNMRException const & e) {
if (ar->isNew()) {