monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] Revision 631399d1d6662effa74417194b67bf65ec2c47


From: monotone
Subject: [Monotone-commits-diffs] Revision 631399d1d6662effa74417194b67bf65ec2c475d
Date: Wed, 27 Feb 2008 00:05:55 +0100

-----------------------------------------------------------------
Revision: 631399d1d6662effa74417194b67bf65ec2c475d
Ancestor: ff930a7b77548812fd37a4172b1f3ad0e4b37482
Author: address@hidden
Date: 2008-02-26T20:26:18
Branch: net.venge.monotone

Modified files:
        annotate.cc cert.cc cert.hh cmd_diff_log.cc cmd_list.cc
        cmd_merging.cc cmd_packet.cc cmd_ws_commit.cc commands.cc
        database.cc database.hh database_check.cc key_store.cc
        key_store.hh keys.cc keys.hh netcmd.cc netcmd.hh netsync.cc
        packet.cc packet.hh project.cc revision.cc
        schema_migration.cc transforms.cc transforms.hh update.cc
        vocab.cc

ChangeLog: 

Eliminate base64 encoding of public key, private key, and signature
objects to the maximum extent possible.  (Remains used in packet
handling, key hashing, and cert hashing.)

 * transforms.hh (encode_base64, decode_base64): Return the result of the
   transformation instead of writing it to an out-argument.
   (decode_base64_as<T>): New function.
 * transforms.cc (transform:enc unit test): Update to match.

 * cert.hh (struct cert): Remove base64 encoding from 'sig' field.
 * cert.cc (cert::cert, read_cert, write_cert, cert_hash_code):
   Update handling of cert 'sig' field.
 * key_store.hh (struct keypair): Remove base64 encoding from 'pub' and
   'priv' fields.
   (key_store::make_signature): Return the signature without base64 encoding.
   (key_store::migrate_old_key_pair): Take the old-format private key,
   and return the pubkey, without base64 encoding.
 * keys.hh (key_hash_code, keys_match): Take the keys without base64 encoding.
 * database.cc, database.hh (database::get_pubkey, database::put_key):
   Now takes a bare rsa_pub_key.
   (database::get_key): Delete overload that takes base64<rsa_pub_key>.
   (database::check_signature): Now takes a bare rsa_sha1_signature.
 * netcmd.cc, netcmd.hh (netcmd::read_auth_cmd, netcmd::write_auth_cmd):
   Change signature argument from a bare string to a rsa_sha1_signature.
   (netcmd:functions unit test): Update to match.

 * packet.hh (packet_consumer::consume_public_key)
   (packet_consumer::consume_old_private_key): Take the key without
   base64 encoding.
   (packet_writer): Update declaration.
 * packet.cc (packet_writer): Update for changed packet_consumer
   interface; base64 encode things (except cert_values) as they are
   serialized, when that is part of the protocol.
   (feed_packet_consumer): base64 decode things (except cert_values) as
   they are unserialized, when that is part of the protocol.
   (packet:roundabout unit test): Update to match.
 * cmd_packet.cc (packet_db_writer): Update for changed packet_consumer
   interface.
 * key_store.cc (keyreader): Likewise.

 * cmd_list.cc, cmd_packet.cc, database.cc, database_check.cc
 * key_store.cc, keys.cc, netsync.cc, vocab.cc
   Use bare rsa_pub_key, rsa_priv_key, rsa_sha1_signature, and
   old_arc4_rsa_priv_key instead of their base64 encoded wrappers
   in various places.

 * annotate.cc, cert.cc, cmd_diff_log.cc, cmd_list.cc, cmd_merging.cc
 * cmd_ws_commit.cc, commands.cc, database.cc, project.cc, revision.cc
 * update.cc: Update handling of cert_value objects for new
   decode_base64/encode_base64 API.

Attachment: txtojqZlde9xg.txt
Description: Diff [ff930a7b77548812fd37a4172b1f3ad0e4b37482] -> [631399d1d6662effa74417194b67bf65ec2c475d]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]