Repository navigation
Description
Device
X3
Affected Version
2.0.0
EPUB Optimization
No / Not Applicable
Cache State
No / Not Applicable
Describe the Bug
Device
Xteink X3
Affected Version
2.0.0
Describe the Bug
Was testing out the protected content plugin. Ran into a couple issues. 1st was solved, added that here as well. Claude helped me narrow down some stuff so I'm going to copy and past that. I tried a couple different books and wasn't able to get the plugin to work.
Title: Protected Content: device activation fails with wc_PKCS12_parse rc=-133 (ALGO_ID_E); also needs Show Hidden Files to get past HTTP 403
Device / versions
- Device: Xteink X3
- Firmware: CrossInk [version — check Settings > About]
- Plugin: Protected Content (installed from Plugin Hub) [version, e.g. 1.0.5]
- Account: DTS ByteBooks (new account)
- Browser: Chrome on Windows, File Transfer started in Join a Network mode
Problem 1 — "Activate device" greyed out (HTTP 403)
On the plugin's web page, under Protected Content:
Could not check account state: could not inspect the credential folder (HTTP 403)
The Activate device button stayed disabled, even after typing the credentials by hand, restarting File Transfer in Join Network mode, rebooting the reader, and hard-refreshing the page.
Workaround that fixed it: turn on Settings > System > Files & Cache > Show Hidden Files.
isProtectedPath() in src/network/CrossPointWebServer.cpp returns 403 for any path segment starting with . unless showHiddenFiles is on. The plugin's credential folder appears to live under a hidden path, so the account check fails and the page disables activation.
Suggestion: let the plugin access its own folder whatever the hidden-files setting is, or show a hint telling the user to enable the setting.
Problem 2 — Activation fails at the PKCS#12 step
After enabling hidden files, the 403 went away and activation ran, but it failed with:
Error: crypto pkcs12: pkcs12 failed: wc_PKCS12_parse rc=-133 keyLen=0 certLen=0 pwLen=24
Analysis (from reading the source):
- The error comes from the
pkcs12op insrc/network/CrossPointPluginServer.cpp, which callsWolfsslCrypto::pkcs12Extract()in freeink-sdk (libs/book/ContentProtection/src/WolfsslCrypto.cpp), which callswc_PKCS12_parse. -133is wolfSSL'sALGO_ID_E. Inwolfcrypt/src/wc_encrypt.c, that is returned when the bag's PBE algorithm isn't compiled in. Notably,PBE_SHA1_40RC2_CBCis only handled#ifdef WC_RC2.wc_d2i_PKCS12succeeded and the error is not a MAC failure, so the bundle and the 24-char device-key password seem fine. Decryption fails because of the cipher.- Adobe/ADEPT activation PKCS#12 bundles typically encrypt the certificate bag with pbeWithSHAAnd40BitRC2-CBC. Neither
scripts/patch_wolfssl.pynor Arduino-wolfSSL 5.7.2'suser_settings.hdefinesWC_RC2, so RC2 bags can't be decrypted. Upstream CrossPoint uses the same freeink-sdk and wolfSSL setup, so it likely has the same problem.
Likely fix: add #define WC_RC2 to the wolfSSL overrides in scripts/patch_wolfssl.py, and make sure 3DES stays enabled (no NO_DES3) for the key bag.
A .acsm from Libby (via Common Stacks) is already on the card but can't be fetched, because the device never activates.
Steps to Reproduce
Install the Protected Content plugin from Plugin Hub; create a DTS ByteBooks account.
Start File Transfer in Join a Network mode; open the reader's web page.
With Show Hidden Files off: the account check fails with HTTP 403 and Activate device stays disabled.
Turn Show Hidden Files on, reload, enter the ByteBooks credentials, click Activate device: you get wc_PKCS12_parse rc=-133.
Expected Behavior
Expect the device to convert the protected content into something readable.
File Provided
Not Applicable
Activity
thefamousmoe commentedon Nov 25, 2026
thefamousmoe commentedon Nov 25, 2026
Update: confirmed fix. I forked the repo, added the following to the wolfSSL overrides in
scripts/patch_wolfssl.py(right after#define FP_MAX_BITS 8192), and built the X3/X4 firmware with the Compile Release Candidate workflow:After flashing that build, activation succeeded ("Activation saved. You can now fetch uploaded content below.") with no other changes. So the
wc_PKCS12_parse rc=-133failure is the missing RC2 support. Please consider addingWC_RC2to the official build.Fork/branch for reference: https://github.com/thefamousmoe/CrossInk-2.0.0fix/tree/release/2.0.0-fix — the change is in commit thefamousmoe@22565c3
uxjulia commentedon Nov 26, 2026
Here are builds with the fix for anyone else that runs into this.
firmware-eego-a4-v2.0.0-hotfix-976.zip
firmware-picco-v2.0.0-hotfix-976.zip
firmware-sticky-v2.0.0-hotfix-976.zip
firmware-x3-x4-v2.0.0-hotfix-976.zip
firmware-x4-classic-v2.0.0-hotfix-976.zip
firmware-x4-pro-v2.0.0-hotfix-976.zip
itsthisjustin commentedon Nov 26, 2026
@uxjulia does this regression exist on crosspoint?
uxjulia commentedon Nov 26, 2026
Nah, I ported the plugins feature in chunks, and missed the platformio.ini requirement
hansen1015 commentedon Nov 27, 2026
X4 Pro hard-froze after flashing the hotfix-976 x4-pro build (display froze, no reset/power response)
Thanks for the hotfix. I'm reporting a possible serious problem on the X4 Pro in case it helps others.
Device: Xteink X4 Pro (China-locked unit, bought on Taobao, so USB flashing is not available)
Firmware:
hotfix-976x4-pro build posted in this issue (CrossInk 2.0.0 base)What happened
What I tried (none worked)
Notes
Questions
Happy to test anything that doesn't need USB access, or answer questions.
itsthisjustin commentedon Nov 27, 2026
Even a crash wouldn't brick the device. The reset button on the Pro is hardware level. It completely reboots the chip
fix: restore Protected Content activation (#976)
fix: restore Protected Content activation (#976)