Changeset 556
- Timestamp:
- 03/24/07 14:50:12 (2 years ago)
- Files:
-
- trunk/src/hefeweizen_library_business_logic.rb (modified) (6 diffs)
- trunk/src/hefeweizen_library_directive.rb (modified) (1 diff)
- trunk/src/hefeweizen_library_ebMS_message2.rb (modified) (1 diff)
- trunk/src/taskers/hefeweizen_tasker_application_decrypt_ebXML_message.rb (modified) (3 diffs)
- trunk/src/taskers/hefeweizen_tasker_application_encrypt_ebXML_message.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/hefeweizen_library_business_logic.rb
r553 r556 191 191 @logger.debug "#{me}: Outgoing ebXML message must get encrypted." if @debug 192 192 if !command.nil? then 193 puts command193 @logger.debug command if @debug 194 194 return true, command 195 195 else … … 602 602 @logger.debug "#{me}: Outgoing ebXML message must get encrypted." if @debug 603 603 if !command.nil? then 604 puts command604 @logger.debug command if @debug 605 605 return command, expectation 606 606 else … … 2013 2013 if true then 2014 2014 2015 puts command = "hefeweizen_sign_ebXML_signal_message \"#{file_path}\" \"#{hash['private_key_file']}\" \"#{hash['password_file']}\" \"#{hash['certificate_file']}\" \"#{temp_file_path}\"" 2016 2015 command = "hefeweizen_sign_ebXML_signal_message \"#{file_path}\" \"#{hash['private_key_file']}\" \"#{hash['password_file']}\" \"#{hash['certificate_file']}\" \"#{temp_file_path}\"" 2016 2017 @logger.debug "#{me}: #{command}" if @debug 2018 2017 2019 # blocking call 2018 2020 system command … … 2430 2432 # TODO check encryption algorithm 2431 2433 @logger.debug "#{me}: ebXML Message must be decrypted." if @debug 2432 require 'pp'2433 pp info_structure2434 2434 reference = info_structure['info']['doc-exchange-receiver-digital-envelope-certificate-id'] 2435 2435 hash, error_message = @b2b_system.get_certficates_path_for_reference reference … … 2476 2476 2477 2477 command = "#{HefeWeizen::HefeWeizenLibrary::HefeWeizenCommand.hash_to_command command_hash}" 2478 putsnew_command = "echo \"#{command}\" > #{@config['PIPE_TO_ANIA']}"2478 new_command = "echo \"#{command}\" > #{@config['PIPE_TO_ANIA']}" 2479 2479 2480 2480 system new_command … … 2490 2490 exit = true 2491 2491 rescue EOFError => error 2492 puts "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2493 puts "CORE ERROR: #{error.to_s}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2494 puts "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2492 @logger.error "ERROR reading from pipe '#{my_pipe}': #{error.to_s}', '#{error.inspect}', '#{error.backtrace}'" 2495 2493 sleep (0.1) 2496 2494 end trunk/src/hefeweizen_library_directive.rb
r553 r556 273 273 @config = config 274 274 @logger = @config['LOGGER'] 275 @debug = @info = @warn = @error = nil 275 276 case @config['LOG_LEVEL_SCREEN'] 276 277 when 'debug' then trunk/src/hefeweizen_library_ebMS_message2.rb
r553 r556 1198 1198 # ebXML messages do not yet have the HTTP header information. 1199 1199 if line =~ /--HefeWeizenBoundary/ then 1200 puts "alternative found"1201 1200 is_multipart = true 1202 1201 boundary = '--HefeWeizenBoundary' trunk/src/taskers/hefeweizen_tasker_application_decrypt_ebXML_message.rb
r517 r556 5 5 # Copyright (c) 2007 HavanaWave AG (http://www.HavanaWave.com) 6 6 # 7 # $Id :$7 # $Id$ 8 8 # 9 9 # WARNING: This program as such is intended to be used by professional … … 225 225 # xmlsec1 decrypt --privkey-pem coronation_encryption_cert/Coronation_encryption_private_key.pem --output debian-logo-2.png out2.xml 226 226 command = "xmlsec1 decrypt --privkey-pem #{@private_key_file_path} --output #{output_file_path} #{content_file_path}" 227 puts command227 # puts command 228 228 system command 229 229 if $? == 0 then … … 268 268 269 269 def get_content_hash_of_ebXML_message 270 return HefeWeizen::HefeWeizenLibrary::EBMessage2.get_raw_payloads_array(File.expand_path @ebXML_message_file_path)270 return (HefeWeizen::HefeWeizenLibrary::EBMessage2.get_raw_payloads_array(File.expand_path(@ebXML_message_file_path))) 271 271 end 272 272 end # class trunk/src/taskers/hefeweizen_tasker_application_encrypt_ebXML_message.rb
r515 r556 240 240 output_file_path = "#{@config['TEMP_FILE_DIR']}/encrypted_output_#{id}.xml" 241 241 command = "xmlsec1 encrypt --binary-data #{content_file_path} --session-key des-192 --pubkey-cert-pem #{@certificate} --output #{output_file_path} #{template_filename}" 242 puts command243 242 system command 244 243 if $? == 0 then … … 283 282 284 283 def get_content_hash_of_ebXML_message 285 return HefeWeizen::HefeWeizenLibrary::EBMessage2.get_raw_payloads_array(File.expand_path @ebXML_message_file_path)284 return (HefeWeizen::HefeWeizenLibrary::EBMessage2.get_raw_payloads_array(File.expand_path(@ebXML_message_file_path))) 286 285 end 287 286 end # class
