Download and verify
Pick the file for your system and download SHA256SUMS too; select only the target file’s line, then verify. Stop and do not run it if the hash differs.
CDNCA_DOWNLOADS='https://developer.cdnca.com/downloads/cdnca-plugin'
CDNCA_CLI_FILE='cdnca-plugin-linux-amd64' # ARM64: cdnca-plugin-linux-arm64
curl --fail --location --show-error --output "$CDNCA_CLI_FILE" "$CDNCA_DOWNLOADS/$CDNCA_CLI_FILE" &&
curl --fail --location --show-error --output SHA256SUMS "$CDNCA_DOWNLOADS/SHA256SUMS" &&
awk -v name="$CDNCA_CLI_FILE" '$2 == name { print; found=1 } END { if (!found) exit 1 }' SHA256SUMS > SHA256SUMS.selected &&
sha256sum -c SHA256SUMS.selected &&
chmod +x "$CDNCA_CLI_FILE" &&
CDNCA_PLUGIN_CLI="$(pwd -P)/$CDNCA_CLI_FILE"CDNCA_DOWNLOADS='https://developer.cdnca.com/downloads/cdnca-plugin'
CDNCA_CLI_FILE='cdnca-plugin-darwin-arm64'
curl --fail --location --show-error --output "$CDNCA_CLI_FILE" "$CDNCA_DOWNLOADS/$CDNCA_CLI_FILE" &&
curl --fail --location --show-error --output SHA256SUMS "$CDNCA_DOWNLOADS/SHA256SUMS" &&
awk -v name="$CDNCA_CLI_FILE" '$2 == name { print; found=1 } END { if (!found) exit 1 }' SHA256SUMS > SHA256SUMS.selected &&
shasum -a 256 -c SHA256SUMS.selected &&
chmod +x "$CDNCA_CLI_FILE" &&
CDNCA_PLUGIN_CLI="$(pwd -P)/$CDNCA_CLI_FILE"$CdncaDownloads = 'https://developer.cdnca.com/downloads/cdnca-plugin'
$CdncaFile = 'cdnca-plugin-windows-amd64.exe'
Invoke-WebRequest "$CdncaDownloads/$CdncaFile" -OutFile $CdncaFile -ErrorAction Stop
Invoke-WebRequest "$CdncaDownloads/SHA256SUMS" -OutFile SHA256SUMS -ErrorAction Stop
$CdncaSumLines = @(Select-String -Path SHA256SUMS -Pattern '^[a-f0-9]{64}\s+\*?cdnca-plugin-windows-amd64\.exe#x27;)
if ($CdncaSumLines.Count -ne 1) { throw 'SHA256SUMS has no unique line for this file' }
$CdncaExpected = ($CdncaSumLines[0].Line -split '\s+')[0]
if ((Get-FileHash $CdncaFile -Algorithm SHA256).Hash.ToLower() -ne $CdncaExpected) { throw 'hash mismatch' }
$CdncaPluginCli = (Resolve-Path $CdncaFile).PathThe commands below use Linux/macOS. On Windows use the same subcommands and flags as & $CdncaPluginCli <subcommand> … in PowerShell. The tool has exactly four subcommands: keygen, pubkey, sign-challenge, sign-manifest; it exits 1 on failure and 2 on a usage error.