Welcome to the "trac"-ing site of openpgp4u!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 9

Show
Ignore:
Timestamp:
10/30/04 23:33:07 (4 years ago)
Author:
nahi
Message:

* clean up scanner comments

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/pgp/packet/sigsubpacket/packet.rb

    r2 r9  
    103103  end 
    104104 
    105   def self.scan(port, io = STDOUT
     105  def self.scan(port, io
    106106    length = load_length_new(port) 
    107107    type = load_type(port) 
     
    109109    type &= ~T_CRITICAL 
    110110    critlabel = critical ? "Critical" : "Non-critical" 
    111     io.puts "#{critlabel} Sub: #{typelabel(type)}(#{type})(#{length - 1} bytes)\n" 
    112     if !TAG_SCANNER.key?(type) and critical 
     111    io.puts "#{critlabel} Sub: #{typelabel(type)}(#{type})(#{length - 1} bytes)" 
     112    if TAG_SCANNER.key?(type) 
     113      io.indent(4) do 
     114        TAG_SCANNER[type].call(io, port, length - 1) 
     115      end 
     116    elsif critical 
    113117      raise "Not supported: #{type}" 
    114     end 
    115     io.indent(4) do 
    116       TAG_SCANNER[type].call(io, port, length - 1) 
     118    else 
     119      io.indent(4) do 
     120        io.puts "(unknown sub packet)" 
     121      end 
     122      port.read(length - 1) 
    117123    end 
    118124  end 
  • trunk/lib/pgp/packet/sigsubpacket/preferredcompressionalgorithm.rb

    r2 r9  
    1919    super 
    2020    @algorithm.each do |algo| 
    21       io.puts CompressionAlgorithm.label(algo) 
     21      io.puts "#{CompressionAlgorithm.label(algo)}(#{algo})" 
    2222    end 
    2323  end 
  • trunk/lib/pgp/packet/sigsubpacket/preferredhashalgorithm.rb

    r2 r9  
    1919    super 
    2020    @algorithm.each do |algo| 
    21       io.puts HashAlgorithm.label(algo) 
     21      io.puts "#{HashAlgorithm.label(algo)}(#{algo})" 
    2222    end 
    2323  end 
  • trunk/lib/pgp/packet/sigsubpacket/preferredskeyalgorithm.rb

    r2 r9  
    1919    super 
    2020    @algorithm.each do |algo| 
    21       io.puts SKeyAlgorithm.label(algo) 
     21      io.puts "#{SKeyAlgorithm.label(algo)}(#{algo})" 
    2222    end 
    2323  end