I am not sure I understand how exactly your certificates are signed. But from xmlsec error it seems that you have a non-trusted self signed cert which is impossible in a valid certificates chain. Probably you should load this cert as "trusted" instead. Aleksey