XMLSEC1(1)
β¨ NAME β¨
xmlsec1 β sign, verify, encrypt and decrypt XML documents π
ngl bestie, that's the whole job description and she does all of it. also hi, you're reading the User Commands manual, section 1. ok let's go π¦
πΈ SYNOPSIS πΈ
xmlsec <command> [<options>] [<files>]
so like. command first. then options. then files. very demure, very mindful π
π DESCRIPTION π
ok so xmlsec is a command line tool for signing, verifying, encrypting and decrypting XML documents. that's it, that's the vibe. she's the main character of XML crypto and she knows it π
the allowed <command> values are, and I'm gonna list literally all of them because I love a complete list:
--helpβ displays this help information and then exits. iconic, no notes π«--help-allβ displays help information for all commands/options and exits. yes, every single one. she's thorough π--help-<cmd>β displays help information for command<cmd>and exits. plug in whichever command you're curious about π§--versionβ prints version information and exits. always worth a peek π--keysβ keys XML file manipulation. yes bestie, you're messing with the keys file π--signβ sign data and output XML document. go off, sign it βοΈ--verifyβ verify signed document. vibe check on that signature π--encryptβ encrypt data and output XML document. secrets stay secret π€«--decryptβ decrypt data from XML document. unlock it, queen ποΈ
fr fr, if you're confused literally just run --help and she'll walk you through it π«Ά
β¨ OPTIONS β¨
okay bestie, deep breath, because this is THE section π it's long, it's iconic, and every single one of these flags is here because someone needed it at 3am. we're going in order, no skips, no shortcuts. drink some water. π«Ά
--ignore-manifestsβ do not process<dsig:Manifest>elements. just. leave them alone. π--store-referencesβ store and print the result of<dsig:Reference/>element processing, right before the digest gets calculated. for when you need receipts π--store-signaturesβ store and print the result of<dsig:Signature>processing, right before the signature gets calculated.--enabled-reference-uris <list>β a comma separated list, and it can only be made of these values:"empty","same-doc","local","remote". it restricts the possible URI attribute values for the<dsig:Reference>element. basically a vibe check for URIs β--enable-visa3d-hackβ enables the Visa3D protocol specific hack for URI attribute processing, for when we're trying not to use the XPath/XPointer engine. and listen: the docs are very honest here β this is a hack and the original dev straight up does not know what else might get broken in your application when you use it π also go check the--id-attroption because you might need it.--enable-asn1-signatures-hackβ enables support for ASN1 signature values generated by some XMLDsig implementations.--hmac-min-out-len <bits>β sets the minimum HMAC output length to bits.--binary-data <file>β binary file to encrypt.--xml-data <file>β XML file to encrypt.--enabled-cipher-reference-uris <list>β comma separated list, same vibes as before, values limited to"empty","same-doc","local","remote", and it restricts possible URI attribute values for the<enc:CipherReference>element. π--session-key <keyKlass>-<keySize>β generate a brand new session key of class keyKlass with a size of keySize bits. for example,--session des-192generates a new 192 bits DES key for DES3 encryption. slay π--output <filename>β write the result document to file filename. the filename can be a template and include'{inputfile}', which will be repaced with the input filename (yes, "repaced", that's the doc's own typo and we love her anyway π).--print-debugβ print debug information to stdout.--print-xml-debugβ print debug information to stdout in xml format.--dtd-file <file>β load the specified file as the DTD.--node-id <id>β set the operation start point to the node with the given id.--node-name [<namespace-uri>:]<name>β set the operation start point to the first node with the given name and namespace URI.--node-xpath <expr>β set the operation start point to the first node selected by the specified XPath expression. main character node selection, honestly π--id-attr[:<attr-name>] [<node-namespace-uri>:]<node-name>β adds the attributes attr-name (default value is"id") from all nodes matching node-name and namespace node-namespace-uri to the list of known ID attributes. heads up: this is a hack, and if you can, you should use DTD or schema to declare ID attributes instead (see the--dtd-fileoption).--add-id-attr <id-attribute-name>β adds the attribute id-attribute-name to all nodes in the document. also a hack! if you can declare ID attributes with DTD or schema instead, pls do (again: see--dtd-file).--enabled-key-data <list>β a comma-separated list of key-data types to enable. example time β¨:
rsa,key-value,x509
-> populates <RSAKeyValue> and keeps <X509Data>
when the <KeyValue/> and <X509Data/> placeholders are present in the template. use --list-key-data to view the full list of registered key data klasses. by default, all registered key data are enabled.
--enabled-retrieval-method-uris <list>β comma separated list, values:"empty","same-doc","local","remote". restricts possible URI attribute values for the<dsig:RetrievalMethod>element.--enabled-key-info-reference-uris <list>β yep, same list again ("empty","same-doc","local","remote"), this time restricting possible URI attribute values for the<dsig11:KeyInfoReference>element.--gen-key[:<name>] <keyKlass>-<keySize>β generate a new keyKlass key of keySize bits, set the key name to name, and drop the result into the keys manager. for example--gen:MyKeyName rsa-1024generates a new 1024 bits RSA key and sets its name to"MyKeyName". (yes, the doc example uses--gen:β cute, we're keeping it exactly as written π«Ά)--keys-file <file>β load keys from an XML file.--privkey-pem[:<name>] <file>[,<cafile>[,<cafile>[...]]]β load a private key from a PEM file, plus the certificates that verify this key.--privkey-der[:<name>] <file>[,<cafile>[,<cafile>[...]]]β load a private key from a DER file, plus the certificates that verify this key.--pkcs8-pem[:<name>] <file>[,<cafile>[,<cafile>[...]]]β load a private key from a PKCS8 PEM file, plus PEM certificates that verify this key.--pkcs8-der[:<name>] <file>[,<cafile>[,<cafile>[...]]]β load a private key from a PKCS8 DER file, plus DER certificates that verify this key.--privkey-openssl-store[:<name>] <uri>β load a private key and certs through the OpenSSL ossl_store interface (e.g. from an HSM).--privkey-openssl-engine[:<name>] <openssl-engine>;<openssl-key-id>[,<crtfile>[,<crtfile>[...]]]β load a private key via the OpenSSL ENGINE interface. specify the name of the engine (like you would with-engineparams), the key specs (like with-inkeyor-keyparams), and optionally certificates that verify this key.--pubkey-pem[:<name>] <file>β load a public key from a PEM file.--pubkey-der[:<name>] <file>β load a public key from a DER file.--pubkey-openssl-store[:<name>] <uri>β load a pubkey key and certs through the OpenSSL ossl_store interface (e.g. from an HSM).--pubkey-openssl-engine[:<name>] <openssl-engine>;<openssl-key-id>[,<crtfile>[,<crtfile>[...]]]β load a public key via the OpenSSL ENGINE interface. name the engine (like with-engineparams), the key specs (like with-inkeyor-keyparams), and optionally the certificates that verify this key.--pwd <password>β the password to use for reading keys and certs. π€«--lax-key-searchβ enable lax key search (e.g. by key type like"rsa"), as opposed to the default strict key search mode which uses only information from the<dsig:KeyInfo/>node (e.g. the key name).--verify-keysβ force verification of public/private keys loaded from the command: keys are required to have a key certificate that will be verified against the certificates in the key store.--aes-key[:<name>] <file>β load an AES key from the binary file file.--camellia-key[:<name>] <file>β load a Camellia key from the binary file file.--chacha20-key[:<name>] <file>β load a ChaCha20 key from the binary file file.--concatkdf-key[:<name>] <file>β load a ConcatKDF key from the binary file file.--des-key[:<name>] <file>β load a DES key from the binary file file.--hmac-key[:<name>] <file>β load an HMAC key from the binary file file.--pbkdf2-key[:<name>] <file>β load a Pbkdf2 key from the binary file file.--hkdf-key[:<name>] <file>β load an HKDF key (IKM) from the binary file file.--pkcs12[:<name>] <file>β load a private key from the pkcs12 file file.--pkcs12-persistβ persist the loaded private key.--pubkey-cert-pem[:<name>] <file>β load a public key from a PEM cert file.--pubkey-cert-der[:<name>] <file>β load a public key from a DER cert file.--trusted-pem <file>β load a trusted (root) certificate from the PEM file file.--untrusted-pem <file>β load an untrusted certificate from the PEM file file.--trusted-der <file>β load a trusted (root) certificate from the DER file file.--untrusted-der <file>β load an untrusted certificate from the DER file file.--crl-pem <file>β load CRLs from the PEM file file.--crl-der <file>β load CRLs from the DER file file.--verify-crlsβ force verification of the loaded CRLs: CRLs are required to have a valid signature from an issuer certificate in the trusted or untrusted certificate store, and must be within their validity period (thisUpdate/nextUpdate).--verification-time <time>β the local time in"YYYY-MM-DD HH:MM:SS"format used for certificate verification.--verification-gmt-time <time>β the GMT time in"YYYY-MM-DD HH:MM:SS"format used for certificate verification.--X509-skip-time-checksβ skip time checking of X509 certificates and CLRs.--depth <number>β maximum certificates chain depth.--X509-skip-strict-checksβ skip strict checking of X509 data.--insecureβ do not verify certificates or CRLs.
ok bestie, the next two lines are giving "yolo" energy and I need you to hear me:--X509-skip-time-checks,--X509-skip-strict-checksand especially--insecureall turn off real security checks. they're right there in the list because sometimes you genuinely need them, and that's between you and your threat model. but do not just sprinkle them on top like glitter β¨
--crypto <name>β the name of the crypto engine to use, from this list:openssl,mscrypto,nss,gnutls,gcrypt. if no crypto engine is specified, then the default one is used.--crypto-config <path>β path to crypto engine configuration.--verboseβ print detailed error messages. your best friend when everything is on fire π--print-crypto-library-errorsβ print errors from the crypto library (OpenSSL only).--repeat <number>β repeat the operation number times.--base64-line-size <size>β sets the max line size for base64 encodings to size.--transform-binary-chunk-size <size>β sets the transform's binary processing chunk size to size. increasing the chunk size might improve performance, at the expense of increased memory usage. classic tradeoff, no cap βοΈ--transform-max-depth <depth>β sets the max depth for transforms execution to depth. set it to0to disable the max depth check.--xxeβ enable External Entity resolution.
β οΈ WARNING: this may allow the reading of arbitrary files and URLs, controlled by the input XML document. use with caution! like, genuinely. if you don't know why you'd need this, you don't need this. π¨
--url-map:<url> <file>β maps a given url to the given file for loading external resources.--helpβ print help information about the command. always valid, always free, always there for you π«Ά
π AUTHOR
Written by Aleksey Sanin <aleksey@aleksey.com>.
π REPORTING BUGS
Report bugs to http://www.aleksey.com/xmlsec/bugs.html.
Β©οΈ COPYRIGHT
Copyright Β© 2002-2026 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
This is free software: see the source for copying information.
and that's a wrap on the whole page, bestie π this one came from xmlsec1 1.3.12 (openssl), dated June 2026, and in full manual-page style she's filed under XMLSEC1(1). go forth and sign things correctly πβ¨
π¦ where this page comes from
- arch rolling: xmlsec 1.3.12-1 Β· MIT
- nixpkgs unstable: xmlsec 1.3.12
- ubuntu stonking: xmlsec1 1.3.12-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms