-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
I'm probably missing something.
Assuming I have the file example.xml with the content:
<?xml version="1.0"?>
<tag>test</tag>Then I followed your example, and executed the code (replacing the cert, key files and password):
require "signer"
signer = Signer.new(File.read("example.xml"))
signer.cert = OpenSSL::X509::Certificate.new(File.read("cert.pem"))
signer.private_key = OpenSSL::PKey::RSA.new(File.read("key.pem"), "password")
signer.document.xpath("//u:Timestamp", { "u" => "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" }).each do |node|
signer.digest!(node)
end
signer.document.xpath("//a:To", { "a" => "http://www.w3.org/2005/08/addressing" }).each do |node|
signer.digest!(node)
end
signer.sign!(:security_token => true)but I get NoMethodError: undefined method 'at_xpath' for nil:NilClass
Metadata
Metadata
Assignees
Labels
No labels