@@ -114,8 +114,8 @@ def uuid
114114 #<Object />
115115 #</Signature>
116116 def sign_document ( private_key , certificate , signature_method = RSA_SHA1 , digest_method = SHA1 )
117- noko = Nokogiri . parse ( self . to_s ) do |options |
118- options = XMLSecurity ::BaseDocument ::NOKOGIRI_OPTIONS
117+ noko = Nokogiri :: XML ( self . to_s ) do |config |
118+ config . options = XMLSecurity ::BaseDocument ::NOKOGIRI_OPTIONS
119119 end
120120
121121 signature_element = REXML ::Element . new ( "ds:Signature" ) . add_namespace ( 'ds' , DSIG )
@@ -138,8 +138,8 @@ def sign_document(private_key, certificate, signature_method = RSA_SHA1, digest_
138138 reference_element . add_element ( "ds:DigestValue" ) . text = compute_digest ( canon_doc , algorithm ( digest_method_element ) )
139139
140140 # add SignatureValue
141- noko_sig_element = Nokogiri . parse ( signature_element . to_s ) do |options |
142- options = XMLSecurity ::BaseDocument ::NOKOGIRI_OPTIONS
141+ noko_sig_element = Nokogiri :: XML ( signature_element . to_s ) do |config |
142+ config . options = XMLSecurity ::BaseDocument ::NOKOGIRI_OPTIONS
143143 end
144144
145145 noko_signed_info_element = noko_sig_element . at_xpath ( '//ds:Signature/ds:SignedInfo' , 'ds' => DSIG )
@@ -242,8 +242,8 @@ def validate_document(idp_cert_fingerprint, soft = true, options = {})
242242
243243 def validate_signature ( base64_cert , soft = true )
244244
245- document = Nokogiri . parse ( self . to_s ) do |options |
246- options = XMLSecurity ::BaseDocument ::NOKOGIRI_OPTIONS
245+ document = Nokogiri :: XML ( self . to_s ) do |config |
246+ config . options = XMLSecurity ::BaseDocument ::NOKOGIRI_OPTIONS
247247 end
248248
249249 # create a rexml document
0 commit comments