xml: T5738: improve PKI building blocks for CLI
(cherry picked from commit d4278cde2b153e163fe41e1bc461891397336bc3)