Skip to main content

Function: resignUpdateManifest()

resignUpdateManifest(manifest, privateKeys, file): object

Re-signs an existing latest*.yml, parsed with parseUpdateManifestYaml (backing the sign-update-manifest CLI command): drops its signature/signatures fields, checks the shape the updater requires of a signed manifest (validateSignedManifestShape), signs it with every key, and serializes it the way a build writes it — every other field kept as parsed and in its order, signature (first key) and signatures (one entry per key) last. Throws an InvalidConfigurationError naming file when the manifest cannot be signed; never includes key material.

Parameters​

manifest​

UpdateInfo

privateKeys​

(string | KeyObject)[]

file​

string

Returns​

object

content​

content: string

info​

info: UpdateInfo

signatures​

signatures: UpdateManifestSignature[]