Skip to content

Commit 491b282

Browse files
committed
RDKEMW-19048: Add vault_processor_release C wrapper to clientlibraries r4.4
1 parent a8f49ea commit 491b282

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
RDKEMW-18043: Add vault_processor_release() C wrapper to release the
2+
Cryptography Vault singleton's SecProcessor handle before deep-sleep entry.
3+
4+
The default Implementation::Vault is a process-lifetime singleton (static
5+
local in vault_instance()); its destructor never runs at deep sleep, so the
6+
SA2 SecProcessor handle stays open across S3. On BCM Dhruv with Network
7+
Standby OFF this triggers SOFTWARE_MASTER_RESET because SAGE refuses S3
8+
entry while the handle is held.
9+
10+
Implementation::Vault::ProcessorRelease() already exists (paired with
11+
ProcessorAcquire() added by 0001-SecAPI-Re-acquire-sec-handle-after-flush.patch).
12+
This wrapper exposes it via C ABI so the CryptographyExtAccess plugin can
13+
call it from onPowerModeChanged. Re-acquire on wake is automatic via the
14+
existing factory.
15+
16+
Index: git/Source/cryptography/implementation/SecApi/Vault.cpp
17+
===================================================================
18+
--- git.orig/Source/cryptography/implementation/SecApi/Vault.cpp
19+
+++ git/Source/cryptography/implementation/SecApi/Vault.cpp
20+
@@ -748,5 +748,13 @@ extern "C" {
21+
return (Thunder::Core::ERROR_UNAVAILABLE);
22+
}
23+
24+
}
25+
+
26+
+ void vault_processor_release(void)
27+
+ {
28+
+ VaultImplementation* impl = vault_instance(CRYPTOGRAPHY_VAULT_DEFAULT);
29+
+ if (impl != nullptr) {
30+
+ reinterpret_cast<Implementation::Vault*>(impl)->ProcessorRelease();
31+
+ }
32+
+ }
33+
} // extern "C"

recipes-extended/wpe-framework/wpeframework-clientlibraries_4.4.bb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SRC_URI = "git://github.com/rdkcentral/ThunderClientLibraries.git;protocol=https
2828
file://0001-error-handling-if-invalid-external-input.patch \
2929
file://r4.4/0001-Implement-IPersistent-interface-for-RPC-Vault.patch \
3030
file://r4.4/0001-SecAPI-Re-acquire-sec-handle-after-flush.patch \
31+
file://r4.4/0002-RDKEMW-18043-Add-vault_processor_release-C-wrapper.patch \
3132
file://r4.4/0001-DELIA-64727-Prealloc-secure-memory-before-decrypt.patch \
3233
file://r4.4/0001-RDKEMW-7064-Dont-decrypt-fake-buffer-is-revoke-has-b.patch \
3334
file://r4.4/0001-PowerManagerClient-library-implementation.patch \

0 commit comments

Comments
 (0)