El tema de la KEY al ser un certificado hay que hacerlo así:
Código PHP:
/* Crear el objeto de seguridad, establece y carga la clave */
$objKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, array ('type'=>'public'));
$objKey->loadKey(CERT_FILE, TRUE, TRUE);//Este ultimo TRUE indica que es un certificado
Me salen estos warnings pero me creo el XML
Warning: DOMNode::C14N() [domnode.c14n]: Relative namespace UR is invalid here : (null) in /web/WSF/xmlseclibs2010.php on line 744
Warning: DOMNode::C14N() [domnode.c14n]: Internal error : checking for relative namespaces in /web/WSF/xmlseclibs2010.php on line 744
Warning: DOMNode::C14N() [domnode.c14n]: Internal error : processing docs children list in /web/WSF/xmlseclibs2010.php on line 744
Warning: openssl_sign() [function.openssl-sign]: supplied key param is a public key in /web/WSF/xmlseclibs2010.php on line 452
Warning: openssl_sign() [function.openssl-sign]: supplied key param cannot be coerced into a private key in /web/WSF/xmlseclibs2010.php on line 452
Sigo indagando