sign(8)
πΈ sign(8) β the girlies' guide to signing files π
okay bestie, buckle up, because we're doing sign from the System Manager's Manual and it's genuinely iconic. β¨
β¨ NAME β¨
sign β sign files or rpms π
π¦ SYNOPSIS π¦
sign [-c|-d|-r|-a] [-u user] [-h hash] [file]
sign -k|-p [-u user] [-h hash]
sign -g type expire name email
sign -x expire pubkey
sign -C pubkey
sign -t
π DESCRIPTION π
okay so sign literally adds a cryptographic signature to a file. that's the whole vibe. π«Ά
it can do a clearsign signature (that's the -c option), create a detached signature (-d), or slap a signature block onto a rpm package (-r). no mode specified? then sign does a rpm sign if the file name ends in .rpm, and otherwise it does a clearsign. no file name at all? then it reads from stdin and writes to stdout. main character behaviour, honestly. π
you can pick a specific user or hash method with the -u and -h options. rn sign understands sha1, sha256, and sha512 hashes. no cap.
here's the thing tho β sign does not create signatures by itself. it needs a running signing daemon (called signd) to do the actual work. the host and port info gets read from the /etc/sign.conf file. so like, it's the middleman. the hype girl. the liaison. π
the -k option makes sign print the keyid instead of signing a file, and -p makes it print the public key.
brand new keys? yes bestie, use the -g option. in that case you need to provide a file name to store the private key with the -P option. that private key can be used for signing by also using the -P option with the other modes. the pubkey of the generated key gets printed to stdout. periodt. β¨
need an X509 certificate (like, for linux kernel modules for example)? the key can be converted to a (self-signed) certificate with the -C option. π
and the expire time of existing keys can be extended with the -x option. keeping it fresh. π¦
π₯ SIGNING MODES π₯
-cβ Clearsign β¨-rβ Sign RPM package π¦-dβ Create a detached gpg signature-Dβ Create a unarmored detached gpg signature-Oβ Create a raw X509 signature. Enforces RSA unless the-Aoption is used.-aβ Sign AppImage container π--appxβ Sign a windows appx container--pesignβ Sign a PE/COFF file--kosignβ Sign a linux kernel object--cmssignβ Create a detached pkcs7/CMS signature
π COMMON OPTIONS π
in some cases it's useful to specify the signature time. you can do that with the -T option. π
the -S option specifies a checksum file β it makes sign append a line containing the checksum of the signed rpms. this can be used to speed up repository metadata generation. efficiency queen. π
-vβ Verbose mode π£οΈ-u usernameβ Specify the key to use. The user must be in the keyring used bysignd.-h hashβ Eithersha1,sha256, orsha512. The default issha1, because some old distributions, e.g., RHEL 7, cannot handlesha256. On modern systems you should usesha256.-T unixtimeβ Explicit sign time. If RPM mode (-r) is used also accepts the string"buildtime".-P keyfileβ Private key file. This file must contain the encrypted privatekey generated with the-goption.-S checksumfileβ Usable only with-roption: appends checksums into the file.-4β Create a pgp v4 signature instead of v3-A pubkeyalgoβ Enforce that the specified algorithm (rsa,dsa,ecdsa,eddsa) is used for signing--cert certfileβ Speficy a x509 certificate to use. A certificate is needed by some of the signing modes, like appx signing or kernel object signing.--cms-nocertsβ Do not include certificates in the pkcs7/cms signature--cms-keyidβ Identify the certificate with the keyid instead of the issuer/serial--bulk-cpioβ The input is a cpio archive in newc format. Each file in the archive is signed. All the signatures are packed into a new cpio archive which filenames consisting of the original files plus a".sig"suffix. This mode is currently only supported for raw X509 signature creation (-O).
π§ KEY GENERATION π§
-g [-P privkey] type expire name emailβ Generate new key-pair. Where:type: one of{dsa,rsa}@{1024,2048,4096}ed25519nistp256nistp384expire: integer, days before expirename: real nameemail: email
Write pubkey and the encrypted private key to stdout. If the -P option isused, the private key will be written to the specified file and only the pubkey goes to stdout. β¨
-x expire pubkeyβ Extend key. Requires a private key to be specified with the-Poption.-C pubkeyβ Convert a gpg pubkey to a self-signed X509 certificate π
π OTHER MODES π
-tβ Pingsignd. If ping was successful, return exit code 0. π-kβ Print the keyid of the key used for signing (root key or defined by-u)-pβ Print the pubkey of of the key used for signing (root key or defined by-u)
π¨ SECURITY π¨
unless theallow-unprivileged-portsoption has been set to true forsignd,signneeds to bind to a reserved port, in which case it works only for user root or needs to be installed suid-root. if the latter is the case,signgrants the users specified in the"allowuser"lines of the configuration the right to sign files.
signandsigndare supposed to run in isolated networks only. no cap, this is not a drill bestie. π
π EXIT STATUS π
sign returns 0 if everything worked, otherwise it returns 1 and prints an error message to stderr. so like, 0 = slay, 1 = not slay. π
π«Ά SEE ALSO π«Ά
and that's the whole page, bestie!! π this lil gem comes from the System Manager's Manual, dated Apr 2007. go forth and sign responsibly. mwah. π β¨π
π¦ where this page comes from
- fedora 43: obs-signd 2.8.4-5.fc43 Β· GPL-2.0-only
- fedora 44: obs-signd 2.8.4-6.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms