feat: 회의 파일 가져오기와 입력 엔진 배포 보완
This commit is contained in:
parent
5a8c5cd792
commit
b3519e5da7
54 changed files with 1129 additions and 116 deletions
|
|
@ -64,6 +64,12 @@ function requireAllowedReleaseCertificate(value, label) {
|
|||
return normalized
|
||||
}
|
||||
|
||||
function parseApkSignerCertificate(signature) {
|
||||
return signature.match(
|
||||
/(?:Signer #\d+|V\d+(?:\.\d+)? Signer:)\s+certificate SHA-256 digest:\s*([0-9a-f:]+)/i,
|
||||
)?.[1]
|
||||
}
|
||||
|
||||
function stableStatValue(stat, key, fallbackKey) {
|
||||
if (key in stat) return stat[key]
|
||||
return BigInt(Math.trunc(Number(stat[fallbackKey]) * 1_000_000))
|
||||
|
|
@ -1078,6 +1084,18 @@ function runSigningPolicySelfTest() {
|
|||
if (requireAllowedReleaseCertificate(safe, 'self_test_safe') !== safe.replaceAll(':', '').toLowerCase()) {
|
||||
fail('self_test_safe_certificate_mismatch')
|
||||
}
|
||||
for (const signerLine of [
|
||||
`Signer #1 certificate SHA-256 digest: ${safe}`,
|
||||
`V2 Signer: certificate SHA-256 digest: ${safe}`,
|
||||
`V3.1 Signer: certificate SHA-256 digest: ${safe}`,
|
||||
]) {
|
||||
if (parseApkSignerCertificate(signerLine) !== safe) {
|
||||
fail('self_test_apk_signer_format_mismatch')
|
||||
}
|
||||
}
|
||||
if (parseApkSignerCertificate('Signer #1 certificate MD5 digest: 00') !== undefined) {
|
||||
fail('self_test_apk_signer_unexpected_match')
|
||||
}
|
||||
let compromisedRejected = false
|
||||
try {
|
||||
requireAllowedReleaseCertificate(COMPROMISED_SIGNER_SHA256, 'self_test')
|
||||
|
|
@ -1467,8 +1485,7 @@ try {
|
|||
: options['expected-upload-cert-sha256']
|
||||
? normalizeCertificateSha256(options['expected-upload-cert-sha256'], 'expected_upload_certificate')
|
||||
: null
|
||||
const actualCertificateText = signature
|
||||
.match(/Signer #1 certificate SHA-256 digest:\s*([0-9a-f:]+)/i)?.[1]
|
||||
const actualCertificateText = parseApkSignerCertificate(signature)
|
||||
if (!actualCertificateText) fail('signer_sha256_missing')
|
||||
const actualCertificate = mode === 'release'
|
||||
? requireAllowedReleaseCertificate(actualCertificateText, 'release_signer_sha256')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue