This is the script I used to sign:
unsigned_xml = File.read("/home/path/unsigned.xml"); 0
private_key = OpenSSL::PKey::RSA.new(File.read("/home/path/certificates/alice.key")); 0
certificate = OpenSSL::X509::Certificate.new(File.read("/home/path/alice.crt")); 0
unsigned_document = Xmldsig::SignedDocument.new(unsigned_xml, id_attr: "Id"); 0
signed_xml = unsigned_document.sign(private_key)
But I'm getting a NoMethodError (undefined method remove' for nil:NilClass)`.
Do you know what might be the issue? Sorry, this is my first time working with XMLs and I'm kind of stuck
with this issue. If you could please help me, I'd appreciate it a lot!
Here's a gist with unsigned xml, certificate and private key: https://gist.github.com/alanBAguero/62d77ee45f14f15a16b376e08118ee18
This is the script I used to sign:
But I'm getting a
NoMethodError (undefined methodremove' for nil:NilClass)`.Do you know what might be the issue? Sorry, this is my first time working with XMLs and I'm kind of stuck
with this issue. If you could please help me, I'd appreciate it a lot!
Here's a gist with unsigned xml, certificate and private key: https://gist.github.com/alanBAguero/62d77ee45f14f15a16b376e08118ee18