Changeset 1675:b51419e47720

Show
Ignore:
Timestamp:
06/25/08 19:48:54 (8 weeks ago)
Author:
klai@…
Branch:
default
Message:

Fix bugs in using new key interface

Location:
src/Tycoon
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/Tycoon/Auctioneer.py

    r1672 r1675  
    6161            for bank_account_name, public_key in account['owners']: 
    6262                key = DSA() 
    63                 key.parse_public_key(public_key, 'X509') 
     63                key.parse_public_key(public_key) 
    6464                authorized = self.xmlrpc_server.secure_verify( 
    6565                    key, xml_str, *params) 
     
    329329        # Verify the sender. 
    330330        key = DSA() 
    331         key.parse_public_key(public_key, "X509") 
     331        key.parse_public_key(public_key) 
    332332        if not self.xmlrpc_server.secure_verify( 
    333333            key, xml, host_account_name, public_key, initial_time_stamp, 
  • src/Tycoon/KeyCache.py

    r1672 r1675  
    5656        if type(cvalue) == list: 
    5757            k = DSA() 
    58             k.parse_public_key(cvalue[1]) 
     58            k.parse_public_key(" ".join(cvalue[1:])) 
    5959            k.account_name = cvalue[0] 
    6060            self[key] = k 
     
    7777        """ 
    7878        if server_name in self: 
     79            # Canonicalize key string 
     80            key = self.get(server_name) 
     81            new_key = DSA() 
     82            new_key.parse_public_key(server_key) 
     83             
    7984            # Check if cached key is same as reported key 
    80             key = self.get(server_name) 
    81             if key.public_key_string != server_key: 
     85            if key.public_key_string != new_key.public_key_string: 
    8286                logger.error("%s\n%s\n%s" % ( 
    8387                    error_1 % (server_name,), error_2,