redwax-tool(1)
redwax-tool π
okay bestie, welcome to redwax-tool(1) β the manual page for redwax-tool, and honestly? it's giving main character energy. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
redwax-tool β the Redwax tool. that's it, that's the name, periodt. π
π¦ SYNOPSIS π¦
redwax-tool [-v] [-h] [in options ...] [filter options ...] [out options ...]
πΈ DESCRIPTION πΈ
so the tea is: redwax-tool lets you read certificates and keys in a whole range of formats and convert them into other formats, whatever the common services need. it's the versatile icon of the group chat. π₯
here's the thing you actually gotta internalize: options are read in order, in three phases. first all the input options get read, then all the filter options, then all the output options. in order. no skipping, no reordering, no chaos. it's structured, and we respect that. π
π OPTIONS π
general vibes β¨
-h,--helpβ display this help message. the "help me bestie" button. π«Ά-v,--versionβ display the version number. show me the numbers. β-q,--quietβ be quiet. errors are suppressed. shy girlie mode. π-d,--debugβ be loud. prints extra details of our progress. main character announcement mode. π£
DNS stuff π§
--dns-server=ipβ if you specify it, it supplies the IP address of the upstream DNS server. you can specify it more than once, she's flexible. if you don't specify it, it reads from/etc/resolv.confinstead.--dns-trust-anchor=fileβ specify the file containing the DNSSEC trust anchor. if you don't specify it, the key may be read from an OS-specific default location. it'll find its own way home. π
secrets π€«
--secret-suffix-in=suffixβ if specified, secrets get read from a file with the same name as the source file plus the suffix you gave. so with the valuesecret, a filekey.pemhas its secret loaded fromkey.secretin the same directory. cute matching set, honestly. π--secret-suffix-out=suffixβ same deal but for the target file: if specified, secrets get read from a file with the same name as the target file plus the suffix. with the valuesecret, a filekey.pemhas the secret loaded fromkey.secretin the same directory. π--secret-token-in=fileβ if specified, secrets needed to read certificates and keys from tokens get read from a file, one secret per line. each secret is preceded by the name of the token and a colon, as per the NSSpwdfile.txtfile.--secret-token-out=fileβ if specified, secrets needed to write certificates and keys to tokens (PKCS11 and NSS) get read from a file, one secret per line. each secret is preceded by the name of the token and a colon, as per the NSSpwdfile.txtfile.
labels π·οΈ
--label-out=labelβ sets the name of the label applied to the leaf certificates. if you don't specify it, the label is set to the subject of the certificate. it picks for you, slay.
input options π₯
--pem-in=wildcardβ read pem files from here. use-for stdin.--trust-pem-in=wildcardβ read pem files containing trusted certificates from here. use-for stdin.--pkcs12-in=fileβ read certificates, intermediate certificates, root certificates, crls, and keys from a PKCS12 file. use-for stdin. provide the secret using--secret-suffix-in.--pkcs11-in=urlβ read certificates, intermediate certificates, root certificates, crls, and keys from a PKCS11 token identified by the given url.--pkcs11-module-in=modβ specify the name of the PKCS11 module to be used, overriding system defaults. if it's relative, use the default PKCS11 module path; otherwise specify the absolute path. include the extension of the module. don't forget the extension, bestie, it matters. β οΈ--keychain-in=keychainβ read certificates, intermediate certificates, root certificates, crls, and keys from a MacOS keychain identified by the given name.--tls-in=urlβ read certificates and intermediate certificates from a TLS or DTLS endpoint at the given url.
filter options π
--filter=typeβ apply the given filter to pass inputs through to the outputs."search"passes through all certificates matching the given hostname, email or ip address."verify"passes all leaf certificates that can be successfully verified through the certificate chain to a trusted root certificate. and with the default,"passthrough", all certificates, csrs, and keys are passed through. no gatekeeping. β¨--filter-email=addressβ search/verify by the given email address. leaf certificates matching the email address get included. can be specified more than once.--filter-hostname=domainβ search/verify by the given hostname. leaf certificates matching the hostname get kept, taking into account wildcards where present. wildcards are valid, ok?! π¦--filter-ip=addressβ search/verify by the given IP address. leaf certificates matching the IP address get included. can be specified more than once.--filter-currentβ match the top ranking leaf certificate and ignore all other leaf certificates. the top certificate is valid and has the longest time to expiry. only the winner survives, it's giving competitive. π--filter-verify-params=nameβ specify the name of the set of parameters used for verification. if unspecified, set to'default'.--filter-verify-tlsa=urlβ perform DANE verification on the server certificate. the parameter is an URL, with a hostname, an optional scheme defaulting totcp, and an optional port defaulting to443(example:tcp://example.com:443). if unspecified, no DANE verification is performed.--filter-date=dateβ set the date to be used for certificate verification. if unset, it defaults to the current time. date format is generalized time syntax as defined in RFC 4517 section 3.3.13. very specific, very demure. π--filter-expiry=[option]β verify certificate expiry.'check'does expiry verification.'ignore'allows expired certificates.'ignore-leaf'allows expired leaf certificates.'ignore-chain'allows expired chain certificates. default is'check'.--filter-dane=[option]β verify certificate DANE records.'check'does dane verification.'ignore'allows certificates with mismatched DANE TLSA or SMIMEA records. default is'check'.--filter-purpose=purposeβ set the purpose of the certificate to verify. if unset, it defaults to any purpose. she's open-minded like that. π
output toggles ποΈ
--text-outβ include additional text in certificate PEM and metadata output.--no-text-outβ exclude additional text in certificate PEM and metadata output.--cert-outβ include leaf certificates in certificate output.--no-cert-outβ exclude leaf certificates from certificate output.--chain-outβ search for and include intermediate certificates belonging to leaf certificates in certificate output. when verifying, if a chain can't be created through intermediate certificates to a trusted root certificate, the leaf certificate is ignored. no chain, no service. π--no-chain-outβ exclude intermediate certificates belonging to leaf certificates in certificate output.--root-outβ search for and include root certificates at the end of the certificate chain. when verifying, if a chain can't be created through intermediate certificates to a root certificate, the leaf certificate is ignored.--no-root-outβ exclude root certificates at the end of the certificate chain in output.--trust-outβ identical to the'root'option, however where supported the output certificates will be exported as a"TRUSTED CERTIFICATE"as recognised by OpenSSL.--no-trust-outβ exclude root certificates that would otherwise be output as OpenSSL"TRUSTED CERTIFICATE".--crl-outβ include certificate revocation lists in the output.--no-crl-outβ exclude certificate revocation lists from the output.--parameter-outβ include key parameters in the output.--no-parameter-outβ exclude key parameters from the output.--key-inβ read private keys in the input. this will trigger a login attempt if needed. π--no-key-inβ exclude keys from the input.--key-outβ include keys in the output.--no-key-outβ exclude keys from the output.--auto-outβ output selectively. if a key or a certificate already exists in a PKCS11 token, skip writing the key or certificate. a key is considered to already exist if the Subject Key Info of the incoming key matches the Subject Key Info field of an existing key on the token. a certificate is considered to already exist if another certificate with the same value is present on the token. when adding a certificate, look up the ID of any corresponding key and use that ID for the certificate (unless an ID is explicitly specified in a target URL). she's efficient, she's not doing duplicates. π--no-auto-outβ output everything as specified.
output destinations π€
--nss-out=directoryβ write certificates, intermediate certificates, root certificates, crls, and keys to an NSS database.--nss-token-out=tokenβ specify the token to which certificates, intermediate certificates, root certificates, crls, and keys will be written to an NSS database. must appear after the--nss-outoption. order matters, bestie, don't test her. β οΈ--der-out=prefixβ write certificates, intermediate certificates, root certificates, crls, and keys. each one is written to a file with a suffix indicating type and index. use-for stdout, and output will be concatenated.--pem-out=fileβ write certificates, intermediate certificates, root certificates, crls, and keys. use-for stdout.--pkcs12-out=fileβ write certificates, intermediate certificates, root certificates, crls, and keys into a PKCS12 file. use-for stdout.--pkcs11-out=urlβ write certificates, intermediate certificates, root certificates, crls, and keys into a PKCS11 token identified by the given url.--pkcs11-module-out=modβ specify the name of the PKCS11 module to be used, overriding system defaults. if it's relative, use the default PKCS11 module path; otherwise specify the absolute path. include the extension of the module. again: extension. include it. π«Ά--metadata-out=fileβ write metadata of each certificate and key to the given file in the format given by the format parameter.--metadata-threshold=daysβ set the threshold in days below which an expiry becomes a warning. if unset, defaults to no warning.--format-out=xml|json|yamlβ format of output metadata. pick your aesthetic. β¨--calendar-out=fileβ write a calendar containing entries until the expiry date of each certificate to the given file or directory. if a directory is specified, entries will be created in discrete ICS files. ποΈ
okay that's part 1 bestie, there's more coming β don't go anywhere π¦
--reminder-out=fileβ drops a whole calendar of reminders into the given file or directory, one reminder per certificate, all keyed to that cert's expiry date. Point it at a directory instead and it'll scatter the entries into separate little.ICSfiles, one vibe per file. ποΈ--calendar-alarm=durationβ say the word and every calendar entry gets an alarm slapped on it (only if it doesn't already have one, no double-dipping). The alarm wants an RFC5545DURATION, exactly as described in section 3.3.6. Example:-P1W= one whole week before expiry. β°--user-in=userβ read certificates and keys while wearing this user's privileges. β¨--user-out=userβ write certificates and keys while wearing this user's privileges. π--group-in=groupβ read certificates and keys with this group's privileges. Heads up bestie: if you already set a user before setting a group, you might not have permission to set the group anymore. So if you're doing both, set the group first. Order matters, fr fr. β οΈ--group-out=groupβ write certificates and keys with this group's privileges. Same deal: set a user before a group and you may lose the permission to set that group. Recommended: if user and group are both in play, group goes first. π--order-out=[all|key-first|key-last]β controls the order that keys and certs show up in the output. The tea:allβ every leaf certificate, then all intermediates, then all roots, then all the keys. Grouped by type, very tidy, very organised.key-firstβ outputs all certificates that have a matching private key, with the private key first, then the certificate, then intermediates and roots, then the private key of the next certificate, and so on down the line.key-lastβ same matching-private-key certificates, but the certificate comes first, then intermediates and roots, then that certificate's key, and finally the next certificate-with-a-private-key, and so on. Basically the mirror ofkey-first. πͺ
--ssh-public-out=fileβ writes an SSH public key out to the given file. π
π RETURN VALUE π
okay so when the redwax tool finishes, it tells you exactly how it went with one of these numbers:
- 0 β we completed our task successfully. ate and left no crumbs. π
- 1 β we failed to initialise. rough start. π
- 2 β the command line options were not valid. bestie the flags... π¬
- 3 β no certificates were passed through the filter. empty handed. π
- 4 β could not become user or group. the privilege glow-up did not happen. π
- 5 β capability not implemented on this platform. not a thing here, sorry. π«Ά
- 6 β processing of certificates failed. it's giving error energy. π₯
β¨ EXAMPLES β¨
okay so in this one: we read every PEM file matching the wildcard, we pass all the certificates through the filter, and then we write chain certificates only to the file intermediates.pem in PEM format. slay.
~$ redwax-tool --pem-in *.pem --filter passthrough --chain-out
--pem-out intermediates.pem
π AUTHOR π
Graham Leggett <minfrin@sharp.fm> β the icon, the legend, the main character who wrote this whole thing. π«Ά
and that's the page bestie!! this was redwax-tool-1.0.0, dated 23 June 2025, and the manual page is redwax-tool(1) π
β¨ go forth and wrangle those certificates, no cap ππ¦
π¦ where this page comes from
- epel 10: redwax-tool 1.0.0-1.el10_1 Β· Apache-2.0
- fedora 43: redwax-tool 1.0.0-2.fc43 Β· Apache-2.0
- fedora 43: redwax-tool 1.0.0-7.fc43 Β· Apache-2.0
- fedora 44: redwax-tool 1.0.0-7.fc44 Β· Apache-2.0
- nixos 26.05: redwax-tool 1.0.0
- nixpkgs unstable: redwax-tool 1.0.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms