According to XML Signature Specification (3.2.2 "Signature Validation"), KeyInfo element may be signed:
"Note, KeyInfo (or some transformed version thereof) may be signed via a Reference element."
Here we can see an example of xml with such signature.
Are there any reasons to sign the certificate by itself?
What security risks does it eliminate?
Take a look at this clarifying section about attribute
signingCertificate
in XAdES. ETSI XAdES is built on top of XMLDSig to stablish the requirements of advanced signatures that remain valid over long periodssigningCertificate
is mandatory whends:KeyInfo
is not present or does not contain the certificate used to sign, and serves the same purpose