Skip to content

Commit aff90ae

Browse files
committed
feat: mumod 签名验证
1 parent 9daa48a commit aff90ae

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

MaiChartManager/Controllers/Mod/InstallationController.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,17 @@ public GameModInfo GetGameModInfo()
5555

5656
var aquaMaiBuiltinVersion = FileVersionInfo.GetVersionInfo(ModPaths.AquaMaiDllBuiltinPath).ProductVersion;
5757

58+
var muModInstalled = muModService.IsMuModInstalled();
59+
5860
AquaMaiSignatureV2.VerifyResult? sig = null;
5961
if (aquaMaiInstalled)
6062
{
6163
sig = AquaMaiSignatureV2.VerifySignature(System.IO.File.ReadAllBytes(ModPaths.AquaMaiDllInstalledPath));
6264
}
63-
64-
var muModInstalled = muModService.IsMuModInstalled();
65+
else if (muModInstalled)
66+
{
67+
sig = AquaMaiSignatureV2.VerifySignature(System.IO.File.ReadAllBytes(ModPaths.MuModDllInstalledPath));
68+
}
6569
var muModVersion = muModInstalled ? muModService.GetMuModVersion() : null;
6670
string? muModChannel = null;
6771
string? muModCacheVersion = null;

MaiChartManager/Front/src/views/ModManager/ConfigEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default defineComponent({
147147
) : (
148148
<span class="max-[450px]:hidden">{modInfo.value.aquaMaiVersion !== 'N/A' && 'v'}{modInfo.value.aquaMaiVersion}</span>
149149
)}
150-
{!isMuModMode.value && <AquaMaiSignatureStatusDisplay/>}
150+
<AquaMaiSignatureStatusDisplay/>
151151
<span class="max-[1060px]:hidden">{t('mod.availableVersion')}:</span>
152152
<span class={[shouldShowUpdate.value && "c-orange", "max-[1060px]:hidden"]}>{latestVersion.value.version}{isMuModMode.value && ` (${t('mod.loaded')})`}</span>
153153
<Button onClick={() => api.KillGameProcess()}>
144 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)