Live Update signature not working #506
Unanswered
paul-splendidgolf
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
I have Live Update working, now I want to enable signature verification, but it is failing. How can I narrow down the source of the problem?
I'm using a key pair generated using openssl:
openssl genrsa -out Bundle.key 2048
openssl rsa -in Bundle.key -out Bundle.publickey -outform PEM -pubout
The public key is added to capacitor.config.ts for the LiveUpdate plugin.
Then I build, zip, hash, sign, verify and encode.
call npm run build
del build-%1.zip
call "C:\Program Files\7-Zip\7z.exe" a -tzip build-%1.zip ./build/*
call openssl dgst -sha256 -out build-%1.zip.hash build-%1.zip
call openssl dgst -sha256 -sign ..\Bundle.key -out build-%1.zip.sig build-%1.zip.hash
call openssl dgst -sha256 -verify ..\Bundle.publickey -signature build-%1.zip.sig build-%1.zip.hash
call openssl enc -base64 -A -in build-%1.zip.sig -out build-%1.zip.txt
Download fails with signature issue:
await LiveUpdate.downloadBundle(
{
url : bundleUrl,
bundleId : bundleId,
signature: bundleSignature
});
Any suggestions as to where the problem might be?
Beta Was this translation helpful? Give feedback.
All reactions