diff --git a/SHiNE-server/src/test/java/test/it/IT_DeployBackupCleanAndRunRemoteMain.java b/SHiNE-server/src/test/java/test/it/IT_DeployBackupCleanAndRunRemoteMain.java index 88350f7..5db7df1 100644 --- a/SHiNE-server/src/test/java/test/it/IT_DeployBackupCleanAndRunRemoteMain.java +++ b/SHiNE-server/src/test/java/test/it/IT_DeployBackupCleanAndRunRemoteMain.java @@ -19,10 +19,10 @@ import java.util.jar.JarFile; */ public class IT_DeployBackupCleanAndRunRemoteMain { - private static final String REMOTE_HOST = System.getProperty("it.remoteHost", "194.87.0.247"); - private static final String REMOTE_USER = System.getProperty("it.remoteUser", "user"); + private static final String REMOTE_HOST = System.getProperty("it.remoteHost", "shineup.me"); + private static final String REMOTE_USER = System.getProperty("it.remoteUser", "player"); - private static final String REMOTE_DIR = System.getProperty("it.remoteDir", "/home/user/docker/shine-server"); + private static final String REMOTE_DIR = System.getProperty("it.remoteDir", "/home/player/SHiNE/shine-server"); private static final String REMOTE_JAR = REMOTE_DIR + "/shine-server.jar"; private static final String REMOTE_DATA = System.getProperty("it.remoteDataDir", REMOTE_DIR + "/data"); private static final String REMOTE_BACKUP_DIR = System.getProperty("it.remoteBackupDir", REMOTE_DIR + "/backup"); diff --git a/SHiNE-server/src/test/java/test/it/IT_DeployRestartAndRunRemoteMain.java b/SHiNE-server/src/test/java/test/it/IT_DeployRestartAndRunRemoteMain.java index 2ed0afe..253367a 100644 --- a/SHiNE-server/src/test/java/test/it/IT_DeployRestartAndRunRemoteMain.java +++ b/SHiNE-server/src/test/java/test/it/IT_DeployRestartAndRunRemoteMain.java @@ -11,10 +11,10 @@ import java.util.Objects; public class IT_DeployRestartAndRunRemoteMain { // ====== НАСТРОЙКИ (можно переопределять systemProperty) ====== - private static final String REMOTE_HOST = System.getProperty("it.remoteHost", "194.87.0.247"); - private static final String REMOTE_USER = System.getProperty("it.remoteUser", "user"); + private static final String REMOTE_HOST = System.getProperty("it.remoteHost", "shineup.me"); + private static final String REMOTE_USER = System.getProperty("it.remoteUser", "player"); - private static final String REMOTE_DIR = System.getProperty("it.remoteDir", "/home/user/docker/shine-server"); + private static final String REMOTE_DIR = System.getProperty("it.remoteDir", "/home/player/SHiNE/shine-server"); private static final String REMOTE_JAR = REMOTE_DIR + "/shine-server.jar"; private static final String REMOTE_DATA = System.getProperty("it.remoteDataDir", REMOTE_DIR + "/data"); diff --git a/VERSION.properties b/VERSION.properties index ab54975..85efee4 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.111 -server.version=1.2.103 +client.version=1.2.112 +server.version=1.2.104 diff --git a/shine-UI/js/pages/registration-draft-keys-view.js b/shine-UI/js/pages/registration-draft-keys-view.js index a6ba325..cb18a05 100644 --- a/shine-UI/js/pages/registration-draft-keys-view.js +++ b/shine-UI/js/pages/registration-draft-keys-view.js @@ -1,6 +1,6 @@ import { renderHeader } from '../components/header.js'; import { state } from '../state.js'; -import { bytesToBase64 } from '../services/crypto-utils.js'; +import { base64ToBytes, bytesToBase58 } from '../services/crypto-utils.js'; import { extractSeed32FromPkcs8B64 } from '../services/device-key-utils.js'; export const pageMeta = { id: 'registration-draft-keys-view', title: 'Сгенерированные ключи', showAppChrome: false }; @@ -17,7 +17,7 @@ function makeSecretField({ label, value }) { row.className = 'inline-input-row'; const input = document.createElement('input'); - input.className = 'input'; + input.className = 'input key-input'; input.type = 'password'; input.readOnly = true; input.value = value; @@ -50,7 +50,7 @@ function makePublicField({ label, value }) { labelEl.textContent = label; const input = document.createElement('input'); - input.className = 'input'; + input.className = 'input key-input'; input.type = 'text'; input.readOnly = true; input.value = value; @@ -82,38 +82,56 @@ export function render({ navigate }) { card.append(warning); // Секрет (root key seed) - let secretB64 = ''; + let secretB58 = ''; try { const rootSeed32 = extractSeed32FromPkcs8B64(keyBundle.rootPair.privatePkcs8B64); - secretB64 = bytesToBase64(rootSeed32); + secretB58 = bytesToBase58(rootSeed32); } catch { - secretB64 = '(не удалось извлечь)'; + secretB58 = '(не удалось извлечь)'; } - card.append(makeSecretField({ label: 'Секрет (root seed, 32 байта)', value: secretB64 })); + card.append(makeSecretField({ label: 'Секрет (root seed, base58, 32 байта)', value: secretB58 })); // Root key const rootSep = document.createElement('p'); rootSep.className = 'field-label'; rootSep.textContent = 'Root key'; card.append(rootSep); - card.append(makePublicField({ label: 'Root — публичный', value: keyBundle.rootPair.publicKeyB64 })); - card.append(makeSecretField({ label: 'Root — приватный (PKCS8)', value: keyBundle.rootPair.privatePkcs8B64 })); + card.append(makePublicField({ + label: 'Root — публичный (base58)', + value: bytesToBase58(base64ToBytes(keyBundle.rootPair.publicKeyB64)), + })); + card.append(makeSecretField({ + label: 'Root — приватный (seed base58, 32 байта)', + value: bytesToBase58(extractSeed32FromPkcs8B64(keyBundle.rootPair.privatePkcs8B64)), + })); // Blockchain key const bchSep = document.createElement('p'); bchSep.className = 'field-label'; bchSep.textContent = 'Blockchain key'; card.append(bchSep); - card.append(makePublicField({ label: 'Blockchain — публичный', value: keyBundle.blockchainPair.publicKeyB64 })); - card.append(makeSecretField({ label: 'Blockchain — приватный (PKCS8)', value: keyBundle.blockchainPair.privatePkcs8B64 })); + card.append(makePublicField({ + label: 'Blockchain — публичный (base58)', + value: bytesToBase58(base64ToBytes(keyBundle.blockchainPair.publicKeyB64)), + })); + card.append(makeSecretField({ + label: 'Blockchain — приватный (seed base58, 32 байта)', + value: bytesToBase58(extractSeed32FromPkcs8B64(keyBundle.blockchainPair.privatePkcs8B64)), + })); // Device key const devSep = document.createElement('p'); devSep.className = 'field-label'; devSep.textContent = 'Device key (= Solana wallet)'; card.append(devSep); - card.append(makePublicField({ label: 'Device — публичный', value: keyBundle.devicePair.publicKeyB64 })); - card.append(makeSecretField({ label: 'Device — приватный (PKCS8)', value: keyBundle.devicePair.privatePkcs8B64 })); + card.append(makePublicField({ + label: 'Device — публичный (base58)', + value: bytesToBase58(base64ToBytes(keyBundle.devicePair.publicKeyB64)), + })); + card.append(makeSecretField({ + label: 'Device — приватный (seed base58, 32 байта)', + value: bytesToBase58(extractSeed32FromPkcs8B64(keyBundle.devicePair.privatePkcs8B64)), + })); } const actions = document.createElement('div'); diff --git a/shine-UI/js/pages/show-keys-view.js b/shine-UI/js/pages/show-keys-view.js index d73f07d..29a1273 100644 --- a/shine-UI/js/pages/show-keys-view.js +++ b/shine-UI/js/pages/show-keys-view.js @@ -1,5 +1,7 @@ import { renderHeader } from '../components/header.js'; import { state } from '../state.js'; +import { bytesToBase58 } from '../services/crypto-utils.js'; +import { extractSeed32FromPkcs8B64 } from '../services/device-key-utils.js'; import { loadEncryptedUserSecrets } from '../services/key-vault.js'; export const pageMeta = { id: 'show-keys-view', title: 'Показать ключи' }; @@ -43,15 +45,15 @@ export function render({ navigate }) { ${label} -