@@ -114,8 +114,8 @@ def uuid
114
114
#<Object />
115
115
#</Signature>
116
116
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
119
119
end
120
120
121
121
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_
138
138
reference_element . add_element ( "ds:DigestValue" ) . text = compute_digest ( canon_doc , algorithm ( digest_method_element ) )
139
139
140
140
# 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
143
143
end
144
144
145
145
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 = {})
242
242
243
243
def validate_signature ( base64_cert , soft = true )
244
244
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
247
247
end
248
248
249
249
# create a rexml document
0 commit comments