If you are writing C++ program then you can set the RSA key and certificate into the xmlSecEncCtx directly instead of placing it into the template. Unfortunately, command line tool does not support this :( Aleksey