Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/refusal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ function check(code, reason, entry, wantCode, wantText) {
check('118, -12', 'Check certificate error : :Package with the same id and different certificate has been already installed.:<-12>', { name: 'HackTV' }, 'CERT_MISMATCH', 'HackTV is already on this TV');
check('118012', '', { file: 'HackTV.wgt', installed: true }, 'CERT_MISMATCH', 'HackTV is already on this TV');
check('118012', '', { file: 'HackTV.wgt', installed: false }, 'CERT_REJECTED', 'internet during the install');
// A 2022 Tizen 6.5 set words the mismatch as [118, -11] (#45, Moonfin from a PC).
check('118, -11', 'Author certificate not match :', { name: 'Moonfin', installed: true }, 'CERT_MISMATCH', 'Moonfin is already on this TV');
check('118011', '', { file: 'Moonfin.wgt', installed: true }, 'CERT_MISMATCH', 'Moonfin is already on this TV');
check('118, -12', 'Check certificate error : :Invalid format of certificate in signature.:<-2>', { installed: true }, 'CERT_REJECTED', 'internet during the install');
check('118, -12', 'Check certificate error : :Certificate in signature is not valid yet.:<-7>', { installed: true }, 'CERT_REJECTED', 'clock is behind');
check('118, -12', 'certificate has expired', {}, 'CERT_REJECTED', 'expired');
Expand Down
2 changes: 1 addition & 1 deletion tizen-app/config.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets"
id="https://github.com/Apps2Samsung/TV-Store" version="0.3.12" viewmodes="maximized">
id="https://github.com/Apps2Samsung/TV-Store" version="0.3.13" viewmodes="maximized">
<name>Apps2Samsung TV-Store</name>
<icon src="icon.png"/>
<content src="index.html"/>
Expand Down
2 changes: 1 addition & 1 deletion tizen-app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
// TV's current IP and loopback too, and keeps whichever answers.
var BASE = 'http://127.0.0.1:8077';
var KOFI = 'https://ko-fi.com/patrickst';
var VERSION = '0.3.12';
var VERSION = '0.3.13';
var KEY = { LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, ENTER: 13, RETURN: 10009, ESC: 27, BACK: 8 };

// What the manifest providers are called; resolved.json carries only their ids.
Expand Down
14 changes: 8 additions & 6 deletions tizen-app/service/refusal.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
* [118, -12] the certificate check: with "same id and different certificate" (or, without a
* reason, when the page says the package is on the TV) the app was installed with
* another author certificate (from a phone or PC, or one since renewed), and the TV
* only updates an app with the certificate it came with: TV-Store can remove that
* copy and install again (CERT_MISMATCH). Otherwise the TV rejects the certificate
* itself: a set without internet during the install (it verifies online), a clock
* that is off, or a certificate past its dates (CERT_REJECTED).
* only updates an app with the certificate it came with: the service tries the other
* profiles it holds, then offers to remove that copy (CERT_MISMATCH). Otherwise the
* TV rejects the certificate itself: a set without internet during the install (it
* verifies online), a clock that is off, or a certificate past its dates (CERT_REJECTED).
* [118, -11] "Author certificate not match": the same mismatch as a 2022 Tizen 6.5 set words it
* (#45, Moonfin installed from a PC).
* [118, -19] the installer's "parsing error" on the manifest: in practice a package that asks for
* a newer Tizen than the set runs (#44); [118, -4] is the newer sets' spelling of that,
* next to "load archive info fail" for a bad package id.
Expand All @@ -31,8 +33,8 @@ function refusal(code, reason, entry) {
if (req) return { code: 'INSTALL_FAILED', message: m + '. It asks for Tizen ' + req + ' or newer' + (tv ? ', and this TV runs Tizen ' + tv : '') + '.' };
return { code: 'INSTALL_FAILED', message: m + '. The TV could not read the package, which usually means it asks for a newer Tizen than this set runs.' };
}
if (/^(118,-12|118012)$/.test(c)) {
if (/same id and different certificate/i.test(why) || (!why && entry.installed))
if (/^(118,-12|118012|118,-11|118011)$/.test(c)) {
if (/same id and different certificate|author certificate not match/i.test(why) || (!why && entry.installed))
return { code: 'CERT_MISMATCH', message: appName(entry) + ' is already on this TV, signed with another certificate: it was installed from a phone or PC, or with a certificate that has since been renewed. The TV only updates an app with the certificate it came with.' };
if (/not yet valid|not valid yet/i.test(why))
return { code: 'CERT_REJECTED', message: m + '. The TV says the certificate is not valid yet, so its clock is behind: set the TV’s date and time (Settings, General, System Manager, Time) or wait a few minutes, then try again.' };
Expand Down
Loading