awong-dev / nokogiri-xmlsec-me-harder

MIT License
2 stars 4 forks source link

allow signing non-root nodes #2

Closed ccutrer closed 9 years ago

ccutrer commented 9 years ago

sign! is now a method on Node, instead of Document. this allows you to place the signature at any level in the document. note that for partial signing, you need to use a DTD, or call set_id_attribute on the element you're signing to identify the ID, and then pass the value of that ID as the uri param to sign!.

also combined the two signing methods into one, since they were mostly identical, and just altered in how they added the key info.

awong-dev commented 9 years ago

Nifty! Thanks for patch. First glance looks pretty awesome, but I want to give it a more fine grained run-over before merging. Please ping me again if I don't respond in a couple of days.

ccutrer commented 9 years ago

@awong-dev ping

ccutrer commented 9 years ago

@awong-dev any updates?

awong-dev commented 9 years ago

sorry for the delay. I'll try to get to this tonight.

On Mon, Feb 23, 2015 at 8:38 AM, Cody Cutrer notifications@github.com wrote:

@awong-dev https://github.com/awong-dev any updates?

— Reply to this email directly or view it on GitHub https://github.com/awong-dev/nokogiri-xmlsec-me-harder/pull/2#issuecomment-75578672 .

ccutrer commented 9 years ago

Updated to attach it to the document immediately, and then in the error case it removes and frees it. now it can't leak, and also removes it even if the actual signing failed (like if your URI ref is bad).

ccutrer commented 9 years ago

Awesome. I sent another PR removing the debug lines I left in. Would you mind cutting a new gem release and pushing to rubygems?

awong-dev commented 9 years ago

@ccutrer Sure...will try to do this weekend.

Sorry for slow responses. Life is very busy right now.