# # delete_file "botan/prf_ssl3.cpp" # # delete_file "botan/prf_tls.cpp" # # add_file "botan/charset.h" # # add_file "botan/dl_cache.cpp" # # add_file "botan/hash_id.h" # # add_file "contrib/ciabot_monotone_hookversion.py" # # add_file "tests/t_restriction_with_exclude.at" # # patch ".mt-attrs" # from [f64f76c6bd0167f72362edd8c47724dffbe31907] # to [43c90c1b09c5f7a6d60f0fa6ce6e4eb67911789a] # # patch "ChangeLog" # from [50802639ded49c79d2f4bbfa018f0adb56206858] # to [a8f0f6c5ccc10b4f16e1776741a2ed08326fdd34] # # patch "Makefile.am" # from [4fdc45d300225991df7992a71cedf7936a7d76b5] # to [7a233d22f09d1b0d6eb2f010fdbb0cf97461af6c] # # patch "app_state.cc" # from [913741f52364afa34c20540f2008ef88fc911f30] # to [4c8ba6a5cdc3fa945a945e19ea63e1fc857d3ca1] # # patch "app_state.hh" # from [6f4dfe92668723e2ca2eb8bb005ebab6c0d050c5] # to [869c3e0393d765e37fc17ae117ccbbe69776b177] # # patch "botan/aes.cpp" # from [8135e5fa9b189d5618f67ef27f63b4b16c683ca4] # to [f544aa7fd0dca2a0a282736d62433f046fee78f2] # # patch "botan/aes.h" # from [244fd78437608f33f3e559d359f8be7abd66c931] # to [dacdc0de1fe5484610985ef059e9368f0d7244a0] # # patch "botan/aes_tab.cpp" # from [78dcee057d2aa6cf37ca4331a2ce9d499e55ec96] # to [559a744cd416011e4850b8e19719e56ae31b18d8] # # patch "botan/algolist.h" # from [d77a0da036e55d55613326f528ed680d6977bab7] # to [ef9d8f0eb6210c1b316298d4ca6f53013db1cef0] # # patch "botan/allocate.cpp" # from [8222a5340314265755a2b79469a367158fc2f99b] # to [00af600bc30ed8c6ecfdea3fe716cd169626b05f] # # patch "botan/allocate.h" # from [f0c3067f73c5cef489b345ab0751b17e5ef07624] # to [825e8e9e89e22aba9d30c55f4e142b98bbab5dfd] # # patch "botan/arc4.cpp" # from [7ea03bc134ef34a54773c90d4d21d71a9eaa2c18] # to [5d18a5e5578d84da92e194a2c878ff7da6503844] # # patch "botan/arc4.h" # from [20156d762201ad8d930a526dbce55fe08ad12996] # to [86febd85b9edfbe8a1ca0719659171b65f67bcab] # # patch "botan/asn1.h" # from [0673bdaef5291a134595648a953b67dc5d37c442] # to [0f625e8cacf2288438d5b9f336a89e88205ac868] # # patch "botan/asn1_alg.cpp" # from [c41db36633e5d356e67540a39230dc95fe36524e] # to [ecf1238bbee1ff0c59910a3baa65581f90683678] # # patch "botan/asn1_alt.cpp" # from [003f48d6763514457a190ee5e8753c562223b43d] # to [a96db0b1830a1c2aae7d77a6ac0b5945f4398505] # # patch "botan/asn1_att.cpp" # from [175de742c23d2ae762fbe5a4862ae0c131d20392] # to [636c751ebe11b317a810f0fbd8b0a024f05c0e97] # # patch "botan/asn1_dn.cpp" # from [66e58f586ee99e7e0b789250db79320cbae0de16] # to [69534bf7311cb012090e0c9c0f64025dcadfc35c] # # patch "botan/asn1_ext.cpp" # from [adcded31305574a0c37a44987c27a9c212a81260] # to [a8cc362726b13e9e81757a214fd39b684253a0ef] # # patch "botan/asn1_ku.cpp" # from [80baaded8a2bfb051b1b01f74804d51cf9f1a013] # to [43916185735c5d26bdc5fa1772698b8db315838b] # # patch "botan/asn1_obj.h" # from [197606805a327d6c05f1b98d7181861fc8a6e7ba] # to [16357c964a2e7ee51e5501db6ff05971fa737aa5] # # patch "botan/asn1_oid.cpp" # from [113696871e0ca992ff1e8c530b77605542b980c9] # to [bd982245f5f3d15f424be78f3383d77762f848d4] # # patch "botan/asn1_oid.h" # from [ff465c835e6a44e73fdabfe10c849e146437a1f3] # to [f9678be8147d4e32f1836282704fd63060171924] # # patch "botan/asn1_str.cpp" # from [56901d327ef5963962c704d9a10a2587e56884a1] # to [75c135f4178b8dfec1363b216049809919eb1435] # # patch "botan/asn1_tm.cpp" # from [4a339d34777a8c8f19da139ef0c41d11161dd44d] # to [69296df4a30b2b4d4213d6a78274f5a0f813e48c] # # patch "botan/barrett.cpp" # from [5c0327d2445b9f3fc066f155674ad2235ca2b64e] # to [ea5008b06d86cd1f84a53bb3babec53e2f5973de] # # patch "botan/barrett.h" # from [8b76f90ed2cd705a5d3a5fb1e57ac9ea2f33b4a2] # to [30768ab0d31c2200e713237e7f4b8aaf1c6ab679] # # patch "botan/base.cpp" # from [2d56945dad7cbca306fd1cdfa376297eb796a723] # to [3fcd48a2b31dc404fcc861f0c1150d764f276e1f] # # patch "botan/base.h" # from [1fe7fb64e2f2d4cdf9373205ba255ec0296d19ab] # to [7223b306fb862c20a89c03a1460c366aca16fc6f] # # patch "botan/base64.cpp" # from [9fe31429403b86d01c267309c04fc90e1e606ff5] # to [f8f825aa6ababa4d464f193348d429e8729c6cb8] # # patch "botan/base64.h" # from [6903d988dfe5ba1bbc2e82d7c03f3f8ed838ed81] # to [a230286f7ddfefab2e317197aed37cfa407e4494] # # patch "botan/base_eng.h" # from [a1137490aeb1da477c7f827b4cb0c0a4d83be21e] # to [e2c682688a68ca8c392fef8febe24a5f163a5c22] # # patch "botan/basefilt.cpp" # from [a87e31f5925cc6a1226c1f9e47f206ff7c279d8b] # to [c62ab8ed09c29b42cab4060b763eaa12f5ae4ed5] # # patch "botan/basefilt.h" # from [35b6dbe10c295089d744ebbdef3f98c35b65bfd7] # to [dc993b59b350b86f39fd125e42c925c4067edd64] # # patch "botan/ber_code.cpp" # from [45e75d9d3f7d32d0daf0f692da91cb8c1d4fc326] # to [41b67aa4c136a6acfe9757658dd4ccbb5d52c340] # # patch "botan/ber_dec.cpp" # from [b42fae01777b272d26888808e10b95d195801700] # to [85736204e607a95c150ee1a5e6b9ac1b82373349] # # patch "botan/ber_dec.h" # from [f0b877d1cfa5d94ec9c0793fc25ac03f24840de8] # to [380987e05bd500b7663f5954bdb4a7c8b0e84241] # # patch "botan/big_base.cpp" # from [018118b988d580e6ffb34e98d4ccafcd0be4d070] # to [6b393b5416c22430149721f291e3f6839239d3fb] # # patch "botan/big_code.cpp" # from [50c850ceff3facc002653a9b8d0a1dacfea8c741] # to [9d421e837b118c241771431e97b8269a0049339a] # # patch "botan/big_io.cpp" # from [6a91448edae6ea766cc3159b6ef011acaeabc9ae] # to [17083ec29a3235fba2817a5117cc4c303434df3d] # # patch "botan/big_ops2.cpp" # from [6568718ebd4e38e1e238421efa1be22d37b05db2] # to [b951478dcd76378226809a907f402ec29abb43c3] # # patch "botan/big_ops3.cpp" # from [ed3b596d0ac13f3ba549ad1e2849e9966cdf0fea] # to [7fcfc51d05c038b3cc268b9993c9140524d91afb] # # patch "botan/bigint.h" # from [39ccfdeac610512103d16674c299939e1e693d5a] # to [0f4e2101aad1e358bfbba6a7e5b136c42566786c] # # patch "botan/blinding.cpp" # from [69a1b620f677a22b7c6a55039e964678c3bc2d0a] # to [409b0a4f351117490772f07a5328ce0ec88a420b] # # patch "botan/blinding.h" # from [55ffef0dd36306cf00d35f6f261040c659e2edf7] # to [93d726432666ec51edd74003647882948261d9fd] # # patch "botan/botan.h" # from [69d369bbb161dadf9db1e224ce7a5b01b97298a4] # to [e19178830bd4ceadbc977e8f54ce45f9f18c7ec4] # # patch "botan/buf_es.cpp" # from [17ffcafc5f0091775f5ff82361b0e8d211557f0d] # to [22b201e4e9b1a2704dd762e5d8670d74790b53c8] # # patch "botan/buf_es.h" # from [dadb51dc51778193c22232774300054aa6771ff8] # to [92c7fed684a29fa220d3320c0b3ca431874ddc8e] # # patch "botan/buf_filt.cpp" # from [258d2b85a47bc42faf4e50849f125686fe83b2ac] # to [42c8a97f415ccacfe8b3ddaa29df18151b5dc6a7] # # patch "botan/buf_filt.h" # from [0e7534629e985eb81b751339e8c6244007f7c65e] # to [82b9c858e60af6bf816750888764e9330a6125c4] # # patch "botan/cbc.cpp" # from [ae938d9c8632da302d82fba0a8efab4e609c3885] # to [07356236e863c7453b30c33fbdb6a10507a02e24] # # patch "botan/cbc.h" # from [f741d411a9bd09ee108836e0bf02962ae55cd241] # to [0ea0edd6d72aa5c8baec83cf46d075e326b05006] # # patch "botan/certstor.h" # from [7f5bbeb13d876da9b0905f252110e70250f25289] # to [0ac4c8644a5d17b7adb2868f37fe9fcc8adc310c] # # patch "botan/certstore.cpp" # from [12cddfbff8d0ebf1ddf323198f2381992b527b80] # to [d9840e20d737606905f1b846de1faa49870e4357] # # patch "botan/cfb.cpp" # from [e33d8760634d2b5e10329e0c34b5cebe72848904] # to [fe3b9c70b199eb3671f1d1a7e678acf81be143ee] # # patch "botan/cfb.h" # from [9b9f3a3ce4094e6f968d12cf0d41bd579219b900] # to [283d95f7f0336c5c97242104439f666b5d190e13] # # patch "botan/charset.cpp" # from [fb06b37e3cc3dd2f01c30901397d6417bde0a91d] # to [4eefedeea00d833c01b8968cf09a391821389bfe] # # patch "botan/charset.h" # from [] # to [0a2fc0cf36512cdfbe8725d7a08cf7c239638cc5] # # patch "botan/conf.cpp" # from [643f2ea2ddb23e57d0dc3b190c2c9931d4a1fc9c] # to [a4d66f1f29a263d401e17af592c184131422f682] # # patch "botan/conf.h" # from [0b602b8e2b927d74ec28d6d87a584aa3e31195ef] # to [71b0151c64d71a4a3450a0fad05fc3c6a227815f] # # patch "botan/crc32.cpp" # from [53cbb50cd0477189162fd30c87167042dceeac44] # to [6f79aadddee3ca58108dbb79eaf9818c917df452] # # patch "botan/crc32.h" # from [85099a7b83816dc20cb891c999527074187f1ac1] # to [14797da7c705de3d822da4419a90d8eced1dbd1f] # # patch "botan/crl_ent.cpp" # from [54b739d37d71f1abcddeb944a58cbee0fa632a84] # to [e066797dbdeb2eb2f8124a791e2739deb847fdc4] # # patch "botan/crl_ent.h" # from [0539e983d16efda8ee76c3fa87b285e774f0b391] # to [cec8c4510b2505708ff6dd2bb2a6d8e60ec792eb] # # patch "botan/ctr.cpp" # from [31a49ab9c99c151565fa8f7298586f342baf7afe] # to [f03e800de4653a9a335c30abde0b6a1fbb8b64df] # # patch "botan/ctr.h" # from [e9b82176a17a126b51e9baab8be858f80c6ca3f6] # to [60b1b31f804d1f2808420b3869f6c1141ae5ba19] # # patch "botan/cts.cpp" # from [0af0fd46dc6c5bb65af0189ef9d5e03bf593df39] # to [2008cc5f4cc4303c9d8179a689513de479d5a08e] # # patch "botan/cts.h" # from [4c9a0ee6740a624bbf39533f44f24f37c7f0a302] # to [c458d765007da986f16e0775a69a8635b8f69742] # # patch "botan/data_snk.cpp" # from [4c1f45222a6f41b3b1777f757dbc3687edc5806a] # to [fa0cc906ebf754c99f054b78f02f2906da140db7] # # patch "botan/data_snk.h" # from [cb2454f0182f6416729cb5a75279b6a84812be16] # to [9e221cab38c1145c37fc832e802c091cfe7dac75] # # patch "botan/data_src.cpp" # from [8e0cd9e19678dc472149b2a87a2fc4ad40772e5e] # to [00dc4c8f2680501212b65a712d6eef20ae9a271e] # # patch "botan/data_src.h" # from [0e7c72b15f861375f65d44b837e24809fb5246cb] # to [b386d479f8908dcc942ed10013d6cfb2bbc8f031] # # patch "botan/def_eng.cpp" # from [036ea54c991b78627bbb43cc80e731f9c8ee2ee6] # to [cebe435088b0f3cae4e4b103211a3d19609966cb] # # patch "botan/def_eng.h" # from [a4906d5dd169dc71c5f35111ebe9e7161bebfa16] # to [cb6c6b9768a0e7c77e67e9eef6598904d85f3b0e] # # patch "botan/def_ops.cpp" # from [ca3801883a7902957cded598081a5761aaa10e79] # to [18c63eab3d6ada615f8988fd13f0a4d39d218ae3] # # patch "botan/defalloc.cpp" # from [e330d915e67e2b1ff2ea1e01b6f7dc21c752f511] # to [0a8c4ea4f0ff0831f906e30415ab78d3fe0678b9] # # patch "botan/defalloc.h" # from [beda55c363ee2fd4ed5b50d654372a0dd40bf222] # to [f3cbe94e43909da2f169b34e04217b2946fc429e] # # patch "botan/der_code.cpp" # from [906a1062209a1f6ecb16ee64c69aa2f653ca9c3e] # to [7d1a406cbfb6bef841797d6c44fe49d5dd730c03] # # patch "botan/der_enc.cpp" # from [ac9170917e29853420f5df76943c00eb6df150ea] # to [2898db4a4312ab8887c241f1758f8871153fe844] # # patch "botan/der_enc.h" # from [a2ddf690cbe1290e24a38b8cc24232b25e48e6a3] # to [612aef07516329e81624156d1481208dd64a88f7] # # patch "botan/dh.cpp" # from [7410d18e0689cf0b88fcd629377532c953fb9372] # to [88888aafa2ba75594db9f3fc9884ad2397e76e6d] # # patch "botan/dh.h" # from [82659d1abc7e35ddb1462a3ff64d26066a17c8a5] # to [0eb696b0a935052659c8a3bd123d0e0f4f965a65] # # patch "botan/divide.cpp" # from [272b0e327dd778b55e36e54e41a6552e1c0c56dd] # to [71a6766759d8ea7a4f148fc7187b99c17168502c] # # patch "botan/dl_algo.cpp" # from [06b5b14b241a3dcf402ac8b86446e58dcd762560] # to [407d1a5e155d69d0248bdf003b1d4ae1c59eb07e] # # patch "botan/dl_algo.h" # from [96e5c93c3d952b29f368ba26ca216bd7781e6675] # to [ba177f21543053329ffa01070970973d5db39a52] # # patch "botan/dl_cache.cpp" # from [] # to [beccd9ed986895e885d4dd553b3667c585c3b842] # # patch "botan/dl_group.cpp" # from [eb98c6c708e299d70dae4ad614828345ce036a74] # to [c335b79e38e853a394fd76e734ea102480cf6042] # # patch "botan/dl_param.cpp" # from [2a49018926bb9e393705a2b7c9202af9342fae15] # to [46da7888784c4d2e733f2f014aa93644326251be] # # patch "botan/dl_param.h" # from [245ee588426a4fbee58bf4834ae9c373ffcacf32] # to [8b1d46bcb1a5ee06d536ef8edb244aae8196d6d9] # # patch "botan/dlies.cpp" # from [d803e4b7eb0b31f497aac7b06223e7aa28ede268] # to [0c9a9eb14c241d9a974d69851be22eff0ad9ff9d] # # patch "botan/dlies.h" # from [8cabc3fab297e1d9ffecfd0fec371a3546dbf4f8] # to [220cf9a63bc846e59dbe6c10b59207b25259131e] # # patch "botan/eax.cpp" # from [65ab636998b9d9b96d5e90209dfcbc97c0d687a7] # to [3d883a13778ce6be5beffd6ab42db67750c0765f] # # patch "botan/eax.h" # from [d1b07e0ba2e6ce2de493b5cf387fb66464f4688a] # to [5d9f4d8474c9a222fb53579cbecf4e5a46558fe5] # # patch "botan/ecb.cpp" # from [a75694b9df00cbc3ee19e07f95dd42fb53e4598f] # to [519758ea66834c37ce4da85b634e1f54fe1e67f1] # # patch "botan/ecb.h" # from [737e78fd8af5c8f26487aa2e6e94deef2aedbdcd] # to [43b8217ca2da247c5d3f5169e227ef0a2cd09ce5] # # patch "botan/eme.h" # from [51b86440d4403db028c50548757795fe49a2192e] # to [4412c54e61d8e70e2d1f42e5bb48ffb1ab1fb92a] # # patch "botan/eme1.cpp" # from [3c08f892e78d4b3093a3e35cb7351f2b47766e47] # to [096712e2e91e96d4684e5cc447bd44ade28e349c] # # patch "botan/eme_pkcs.cpp" # from [dcc6a4ae10f3bc1d50d284cc4285fdf84bc7cad3] # to [0300e9b5bff3abc77f2550e099f9079adcc27535] # # patch "botan/emsa.h" # from [5e8b0377da8b2f6d7ce03df9d189498dccce53a2] # to [8aed2c73d0d4b9b0e8dd48331d00d99475d62b17] # # patch "botan/emsa1.cpp" # from [cdc6b0242927da271f6488eb39502eb36eae3fa4] # to [3256c2a0d2f330e83926775165e5727a69db8c89] # # patch "botan/emsa2.cpp" # from [fae5e6b530c838fccebeac5b6d419efafe0597f1] # to [cc579ea8d68707008de96718e57aa45744ba7d2f] # # patch "botan/emsa3.cpp" # from [747190a9e3a8802dd7aefb60b87e6935903fe844] # to [7ceb6622645006dbf646a9597260a04167bfd248] # # patch "botan/emsa4.cpp" # from [fb48cbf028544c50bdbb6c4f3df82846a576d31f] # to [0be0a60693c31c83cf2a2df0f03a4479b8444b3d] # # patch "botan/emsa_raw.cpp" # from [4856d228aa6a7ea5367a91559eae933c5ca3f281] # to [4f061b051bf6e32e48f4e56ee2f2b9a12054e076] # # patch "botan/eng_base.cpp" # from [c21bf7a9a3b1e3da0f91db105a4d02d10d574e0b] # to [470b429437811de062b605a3eef110f890be77c4] # # patch "botan/engine.cpp" # from [516153822616553bed646431168c348713de1e93] # to [f9f3e140d9d596fba3bdee49d93f3348cc02c799] # # patch "botan/engine.h" # from [547b4edca4ac9df32d5121c0b0b5e58d5fbba518] # to [e564fba257a1af6a72dfb4e68dfa387846189ee0] # # patch "botan/enums.h" # from [8d70f172c1b79d03cbc0d4126d1ae56555207336] # to [fe74b7deb3e19aa07f2db2351381079fd4f73d80] # # patch "botan/es_file.cpp" # from [5772d21d1ff18c7d2a091c89f19351e84232611c] # to [6d3c2b5bd05b067cf5df1720a585e7a2fa99a166] # # patch "botan/es_file.h" # from [83027d4b6bc201ef272309df3697e43bc846a381] # to [a375d7011922508810394364ac39a357a5a75b83] # # patch "botan/exceptn.cpp" # from [8f5ca9fc666267df72fccd96fc851fdcb7b123f1] # to [3cd2986ddf5c3d967a5dd20991068545a456c7c2] # # patch "botan/exceptn.h" # from [48d813b9a3ca6c896e8cd873cf2491ada522973c] # to [0f90c643393d85de7e81ae26d6a57e0f52fad8b4] # # patch "botan/filter.cpp" # from [3506db191bc2d7eaaa67e4e1666add6c3d23a19c] # to [23a3c3907950660091292e50544a89e04e641f71] # # patch "botan/filter.h" # from [d60e7a9d3900ba32b4e2856df6b441007d010138] # to [18e52ca7710b7762627297db5a27722b5afce3aa] # # patch "botan/filters.cpp" # from [ad14e0a2e1639d623b45a8ad63b812945297987a] # to [d8f8d8e488482d394b59ffbe7d666ab190698914] # # patch "botan/filters.h" # from [67ed0a521e02165d787c81efee085863b624105e] # to [dba4116f6d25355809ef86ea71b64a4d031029af] # # patch "botan/fips140.cpp" # from [e6fc1426744e58b90917f77c2863627b6bfe3e95] # to [c1d4019e258c3b9b85fdf007083420759505ddef] # # patch "botan/fips140.h" # from [f887fa80632ca747a142f383f8c0a9f4ce6b3f75] # to [b975066cc64ce52da09af0ba5ed907e786e426b8] # # patch "botan/fips_rng.cpp" # from [305b3d093136ae275b7a5c667e3c96d860fe5efc] # to [f59f382c107f935b4eb2f9c90cc179077c79da6d] # # patch "botan/fips_rng.h" # from [45a4189cb973451fbc27a310e9666fc66eec983d] # to [33d9795345f1e9a5a5ed083de4df1daf5d5cc55a] # # patch "botan/fused.cpp" # from [6fb7c8ea89ea577cf638ca0829f3161261470d8c] # to [0e069924c640428d0145066882384e73cf767409] # # patch "botan/get_algo.cpp" # from [fa25847dacdd675514855ff915204e6d9ead8dfa] # to [83b4c671f852dbf233ce7da7c81c1f8e63e92e46] # # patch "botan/get_enc.cpp" # from [b0e587e9e8289d9b9ad153491d81f2c81c14a3ef] # to [fb775372aa0d45261c2890e7ed0069c1d5c8a8a4] # # patch "botan/get_pbe.cpp" # from [cba554a352ad0c15f4da112f89e6069a723d5de2] # to [7701f52c0f08f0a0ee3f97d770294b1dafca7788] # # patch "botan/hash_id.cpp" # from [41540ab3948c994cfc3f59d5a0a42075779a33ff] # to [30976df969f81420191833f90bfe0f20941a6c8f] # # patch "botan/hash_id.h" # from [] # to [518f07b3e6f9ec8ebce5e01bcaa41d005fc509de] # # patch "botan/hex.cpp" # from [98bbd41c4609c6b02b7af53f09b7e690c4c967be] # to [d90dd533be84454b70bd07f7639c6d2371ee9416] # # patch "botan/hex.h" # from [2cfc0e0f5f5a7e368f30225714a3254a362108ed] # to [2bba7745b808634f2ff705e21ad9a6d20f6be763] # # patch "botan/hmac.cpp" # from [de1313f2eb1b0aa55b39a7b2990682c78f9c9662] # to [d7bc77900a2af2ba418deebbd87b30c9f3ea3811] # # patch "botan/hmac.h" # from [2e2149c3036fe4f61e4959787e17d000ec01472d] # to [d608aecb93bd9d0d3a9fa47443696c766e0c7a14] # # patch "botan/if_algo.cpp" # from [8ba8e73da35f455f2d33c5364bb8ec50a335e1a9] # to [4ee708729d33713d47c64828d1d43c646690b4b2] # # patch "botan/if_algo.h" # from [4d4b55bbc30d46ede166f16c49a8205772dedcfc] # to [d8597f0265745faa4743802b44de16660e326e5e] # # patch "botan/inifile.cpp" # from [93c083a2c23c7fa9594cbfa8e753bba843abd805] # to [28f3c77682edec2d7a2108f7437d75a96cb422a1] # # patch "botan/init.cpp" # from [fe867ad3ec390b9dfcf9d03f9f3a92a2844fd1bf] # to [2b67a947e2133a4a9fbd93774c2a67a5d7cf5344] # # patch "botan/init.h" # from [ef58b0990e2ff7abf148e2983417b4696c69872f] # to [cbc00892b37c81723cb8476d33a7f674fb73f79b] # # patch "botan/kdf.cpp" # from [7a1872d488218b86b88751f7925349d1771483dd] # to [9f9a6e9c4a779b5a8c169512ab55fd8dd5712d19] # # patch "botan/kdf.h" # from [ce2bf9dca868ce3648fbd60f0c89dd41dda8eccb] # to [7d0cda0fb2a44516987c1e1508df26cf1016e355] # # patch "botan/keypair.cpp" # from [c2ba6d27c702e602ebc5c19401b06a63acd1e1ad] # to [95b67905dbc153558bdd0d8addee5eb6b1568356] # # patch "botan/keypair.h" # from [8f3a5a2a87301f0597153df0255d190484036790] # to [50f23526d06bebe6b49881342da49dc2fb0a19f3] # # patch "botan/look_add.h" # from [ea5876a5bbbe2115a1b85a26f89a91a9c91f4be9] # to [18561a6954c6011dd60b458c5affe02e73a6a0c0] # # patch "botan/look_pk.cpp" # from [46272ca274e843f3ffbb455a781cc4206cca2551] # to [870251a124f84ba2c175753b2946377abbd2c4c9] # # patch "botan/look_pk.h" # from [f80d5fba4ca6ae87969224851151d9dd56c68d9c] # to [b868af6a79123e844310d943647cd21b63fe5d34] # # patch "botan/lookup.cpp" # from [b7017306350e0d5cec1bf29fa7aae5fc1476aa14] # to [790c93fcff02eb4564f3e30cbb37d2b3b0b9662a] # # patch "botan/lookup.h" # from [fc8a5e763db679996fc7bbe67259b70b3fb65c72] # to [aa7bce79307989caf3699175148af3d3d3ab6481] # # patch "botan/make_prm.cpp" # from [38f0b945a62ef720897c2d0641ef1c30b22850cf] # to [13d08902b6d25716e14e5cdef8365673f8929d3c] # # patch "botan/mdx_hash.cpp" # from [60980f2b531f0ccc6d9f817a5df85dd30f36724e] # to [70a6a226456a3eed5dea25e9ec2428984796f7fa] # # patch "botan/mdx_hash.h" # from [cf686de334af142d0a4bead6ffd6fdb6f7b61eb8] # to [a38578d1f39ffd7ffea279a92e3a6d9e42f3f74c] # # patch "botan/mem_ops.h" # from [f5603c43d5c102fa371bdf63e232e6006dc3cecc] # to [02ab0ae42b9c6bf677886935d8dfb85e447ab6ba] # # patch "botan/mem_pool.cpp" # from [943ebcf01580253115bc2f3e1088791371a55c4d] # to [e2303f64ab0a279072bdbe59313ed10842702c20] # # patch "botan/mem_pool.h" # from [71b41bee14798c742c2a6977bd00764f6b31f160] # to [79cc34c1b88e2ab2419e609d8c0c208a490f913e] # # patch "botan/mgf1.cpp" # from [fdb622c050a16e39088b0a2b5d29e03b732601ce] # to [6f1bd57e1eceacffaa09086d688430f533801e75] # # patch "botan/mgf1.h" # from [128d53c1a67b591b96f6c4a5044da775cc4eb416] # to [07c9dbfb8d70d446eb0735b9e7a0109334a728e6] # # patch "botan/mlock.cpp" # from [3010066a99142f353ecdc582c1a18d5bac09dd3d] # to [d357780c56771b5779d6c0f95ff7a20ef3f81898] # # patch "botan/mod_exp.cpp" # from [1149f9d2c943c0956b769ac266b0d29e9c98f188] # to [58d392bddf6314f1450a6e890595381e4c60d875] # # patch "botan/mod_exp.h" # from [18c6c30f361b8693f2f4ee33e2b2a597972564fb] # to [c98cbd466ef7156a788de00755671f174fffa2cf] # # patch "botan/mode_pad.cpp" # from [fbcf81f6972834b9a58fba4bbc462feaac03d290] # to [6e13929f903c51c67f4f9cae3f1636d15a6e94b1] # # patch "botan/mode_pad.h" # from [fabc318779665eefe72f430ba028ab05f12fcbe0] # to [d33d5fd3116799e3acc4510bbe8ec00b9ecf203a] # # patch "botan/modebase.cpp" # from [441199d5d032597f222e399c80da05c0466e770d] # to [f55df855ab15cd85c53f74fcd09019136969253c] # # patch "botan/modebase.h" # from [34f3886367213a4a120d1b2bab370ecc9991b203] # to [9c6b1c98f71e261ecd853037c2a6f2a6abf4a09f] # # patch "botan/mp_comba.cpp" # from [cd4bd559010fca3e8f6decfd45ce6801771bc2cd] # to [fe79003f739437691f78090af30ff3c0d08c7000] # # patch "botan/mp_core.cpp" # from [422451560f3daa8f8cd665dffcfd63d40edda6f3] # to [c3cf34cadb010c8e432d639cd78413880f14b01f] # # patch "botan/mp_core.h" # from [1792183f9a720f9fd33838b76eda4ae1515b2f6a] # to [5f8d926528ccb7e579d3778bfa61c6fc2d388b43] # # patch "botan/mp_fkmul.cpp" # from [9b24a4c785d41a51a4e6326c8c3f6453c1a34fd8] # to [2451d3e11ed8dfa1eaa75ed02337c0f72f1fbd0e] # # patch "botan/mp_madd.h" # from [91d7732e96d3a7e6da267164c1984091fb567180] # to [8ebba5caec2b7972ad4970fc79bbf5db8f1ae970] # # patch "botan/mp_misc.cpp" # from [22d22eba1424da339cf5b710ea421035819a12ca] # to [14c95fd2efacea3ba45e7f29e71a676ef834433c] # # patch "botan/mp_mul.cpp" # from [6f4b0d753bc894dc0b4a0795645ae560cfc07132] # to [1a89216eb5fb97faaa1b948ed019813cf4404d80] # # patch "botan/mp_shift.cpp" # from [406513cc6422b5f25d4fd42240dcc6c618f7be64] # to [b0d06068404ec8818092b23bfcbdbafe0f804be6] # # patch "botan/mp_smul.cpp" # from [ed5ffd208b8b7fa3dc8487fce5f16290a1ecd6f7] # to [89a3d539993e7d617a7c9f0afff131b6e6ec95f3] # # patch "botan/mp_types.h" # from [627e3b785902f58ca71f7cb2321b36f0901b090b] # to [0883c2c34245124a245ffeb74802a6d0c866ea93] # # patch "botan/mutex.cpp" # from [5e0337d3e2dbae707c2d873a299e3c403c17962d] # to [5178b950cb9ac2c1e726d470bd9edf1e2afb4afb] # # patch "botan/mutex.h" # from [edfbdfa03538e369e29e72532faa2f2e6eacc55e] # to [28413d972111f69c83901ddd9909b532008ba6f2] # # patch "botan/numthry.cpp" # from [565ae305cf2ac5ca822796a7527b329403b9204b] # to [b72c9ca258ad576c7b6a9d2664281b23d223cb05] # # patch "botan/numthry.h" # from [17458fbabc1602802e514147f7bcebee4414647e] # to [9e48c28c48157564d28d2db1f6637d77dd3fa022] # # patch "botan/ofb.cpp" # from [80169c91ae291656e6c4eeec82c3a399b18f09f2] # to [d98618ab0fd9a03e671e5f034740f3e2746a9696] # # patch "botan/ofb.h" # from [8120445492ab6d9449b761d5005c1de676dffce6] # to [b829ab377c4d4ffd01d08317ab44af8e94b52ed4] # # patch "botan/oids.cpp" # from [1a0baccbffdd0f231320d6e554f58a177c18fce8] # to [2c16a47ec99aa367578e36a96ddb52e4c1315de8] # # patch "botan/oids.h" # from [4875b136924adcd55cbb4d8ba4c0ddc784dc3d43] # to [ff39689a4be354d6e3f7572d8685a35d129f9f44] # # patch "botan/omac.h" # from [999a56ae665d31f7f616b5f6e014cb76d1526f58] # to [c385a6e2195757673b1aeb527fb18ebd0fc55769] # # patch "botan/par_hash.h" # from [d8401812eec5c2b7e4b60f77f8493a163d178fa5] # to [db8899df56e0764c6d1c01cbecf5e8c665fad98b] # # patch "botan/parse.cpp" # from [a3def2f20cd11724087c05da4dcc46a4a383b142] # to [0e43f72e1606149dbcc4770fa5fe6a4533119761] # # patch "botan/pbe.h" # from [4993ed6aa4c679740ac5a3003664c720443d44b4] # to [06e59820482660316ca05b7039f35b3705c5acf5] # # patch "botan/pbe_pkcs.h" # from [47e6d844b94e58ac325f6de110c6565398a3c917] # to [3c1f0cfeb63a5ef197b4d25078183f124fec7fad] # # patch "botan/pbes1.cpp" # from [4f8d05c302729c7821e4b40a3076c3fc08c9f26b] # to [6068b4f4789773bc100896d6114db18b434dd140] # # patch "botan/pbes2.cpp" # from [68bfe2135c3a4fe2ca4eeb5c83ed61e2368f8ccf] # to [3c3e6d6ea030fc44f63b8bcfdaf15ab86c7a624e] # # patch "botan/pem.cpp" # from [b72ae3b0a1a422b736f21fc5605d3b4d1591c135] # to [eb4f3783b73f95b339fb1e3579c98ee8028b084a] # # patch "botan/pem.h" # from [bc1422cbd42a4028333a569b150f1ceda195fec4] # to [be2e43f828cff05d5f0ae7b02ee81adf0f1cda8d] # # patch "botan/pipe.cpp" # from [d9c837aa093bfb230cf5c9f9b3978b5bd5bdd0c7] # to [8b611a67111f11d7da354d6248412ab1eb8239af] # # patch "botan/pipe.h" # from [04cb9c849abc6a94e396870f27330ed23b262d31] # to [c1a3ae0a2ac4d5714f471298a9b978612af93a06] # # patch "botan/pipe_io.cpp" # from [974d2e5f91be38025de9db7f01c4fe535facc620] # to [b91a0b4c82f460a14549cbc89580dcaab1aadd47] # # patch "botan/pipe_rw.cpp" # from [1b9c6fd0645251c17ef56a8f18c62f41fd307a8e] # to [a26836077fabc8d34bc89c1b96876391494fca1e] # # patch "botan/pk_algs.cpp" # from [0cf7a8301f09c75bdb93f055fad2f0cd0478e71f] # to [4db1878384c2944381591a79e7d615f5d638d229] # # patch "botan/pk_algs.h" # from [68c25007661b1503ea7431ab871bf4a674844c6d] # to [fb2336a4e5ecb6c99ff27495ac9a2a2bda8dd965] # # patch "botan/pk_core.cpp" # from [4c3ad70aabe63a760c189fdbfbcad946f73d9d95] # to [d0e5257141362be13da44c2e83b5d5d90c8925cc] # # patch "botan/pk_core.h" # from [b37fa3da4f807b7f45740b6110d8b4c28cea5fe1] # to [10477efff2a9f24a8bf0119ca6d341a190563df3] # # patch "botan/pk_filts.cpp" # from [63d8141f6e0dd0fff341b64327846e33d35c6c00] # to [a854cd0ea434d4376b575936345ef2a049d5b047] # # patch "botan/pk_filts.h" # from [c33f0ad0101684ecdc19fff8126ede12124fafd4] # to [0d1647a1bdf4cad2f490ddd0e4ebce0784955bcc] # # patch "botan/pk_keys.cpp" # from [bb3f3b5fa9ffa98e4949d7f27e1af9d8efbb14cb] # to [10fcbc235a7fd98607ef6e931b97be3931fb64c9] # # patch "botan/pk_keys.h" # from [fa50b78eeda21fc33442d229575c3106b74c5dff] # to [708654f66730aef50e3ebbeadeed4f51befec530] # # patch "botan/pk_ops.h" # from [d7f762f8ec5b0e52da91ae8864a063bbf94d66d1] # to [3528538ab9d79c80e3f1ca31883cbb0a470451a2] # # patch "botan/pk_util.cpp" # from [2c208fd991b109f7621bc7b99611aae97ae15822] # to [07159fe81e167b59fcffd638f755d4672c8c42fa] # # patch "botan/pk_util.h" # from [874530cc97e7f4ca7edc1f540048e6d774a1aee1] # to [f6402de5949c76a9788e261361c7317fd3b18f5b] # # patch "botan/pkcs10.cpp" # from [9dd6579c59ce03c6cbd1b11ea2a2db606e9b2206] # to [d46f70b67ddf31df4414c885a62855b56ccbc246] # # patch "botan/pkcs10.h" # from [04ea5a06ff5f73eff2964e9e50353caff8bf9a7f] # to [7fdfce431e83e7cf380f877e3b7c726f3d698c1f] # # patch "botan/pkcs8.cpp" # from [7ddd271b73aac637d42007f2104781d9f64b924d] # to [6d12f636a9d038c815ba1a19ed4b5dafa2f4a052] # # patch "botan/pkcs8.h" # from [aa88456c2b2961b74d006b240164b7dbf576b652] # to [d6bc45f4d153674b5120c345ef1753b7fcbed396] # # patch "botan/policy.cpp" # from [f61a5ad0ee7ddd9ee0fc7e64ae166021f7816051] # to [ab5c3e85a557a472bfdbbc779a55f6deb79389c1] # # patch "botan/pow_mod.cpp" # from [59ae9d116647e81fbb6de8f911823034015f16c6] # to [d329aa0377ba3cb1b4249c155cacadb76cc0a43f] # # patch "botan/prf_x942.cpp" # from [7b218685f195886dae2ee986c2f55bfdc03fc899] # to [2e82d09acdab42e88e3dc6cf9fe3b8b545e6d1c2] # # patch "botan/primes.cpp" # from [8c5513f27be0fdb55ffbe22bb3429a4cd582ae4e] # to [6ece0b544fbb2d23c817999b4211dbd5c22cc092] # # patch "botan/pubkey.cpp" # from [dbaf12a2c0e0be641f8d85e9af2c049eb25933cc] # to [a79e182ed1aabf231ff5fd910240fd9e2fc517c3] # # patch "botan/pubkey.h" # from [91491173f8aa0f79394f66791b2f73e1db044e0c] # to [eb5a007ee85161d484036b2325def6afa731be7c] # # patch "botan/randpool.cpp" # from [77d0870820eb8ff049b1c5510f22944d31572331] # to [5d45a17b8b6f6311a3dd39fa0e1e8825164d8204] # # patch "botan/randpool.h" # from [e485e25942f8e026a1b4c5d309eafba4e58143ae] # to [8c3837ac3ca62bdbf5e584ca350aee650df6dd56] # # patch "botan/reducer.cpp" # from [ac3ca2c65a244603aa74a72375350d2666605658] # to [feddcce261ed731795367445fcf5f316ae598f96] # # patch "botan/reducer.h" # from [782a5a9da892b8ef50c0acd50a7e2f35dc56200b] # to [3f84481f5c8f523e7d2e2aee651aac211d88b16e] # # patch "botan/rng.cpp" # from [61a3c6a4ce80ac0b893ac682e6f3adc26f8468b6] # to [a87b1336b2275f4083f991b28ec602681eb17e1b] # # patch "botan/rng.h" # from [ca1a9f356c4e746ef2597ac401325ac746a86221] # to [23a42a4209ff8c1050f7d12d8b6e75696f549067] # # patch "botan/rsa.cpp" # from [53430bdf7157f135af0e74098840e8e75b75a479] # to [93dedfdfc017f5c2dbb93d548003101f580761d4] # # patch "botan/rsa.h" # from [2e6a072ffe722bb6bd472f6b447d20501bcc3cee] # to [f30ab1f3965b3f7f93c32a1acee311079c780d1a] # # patch "botan/s2k.cpp" # from [c9392e2e13421cdbfef0ccab45dc59e9f155c013] # to [ccfb48a2afc91995ebef9d2ddd413ee635db7327] # # patch "botan/s2k.h" # from [68a6ccdce0fede7384124e12fcb442898492a9bf] # to [d7098ee5352337e1cad8416f9f36d07a8ac81d17] # # patch "botan/secalloc.h" # from [b310dff174a674d820a6b76b30e7666f05ff8b64] # to [49f0e22d1760535fd353a53ee097f0fd5d72b52a] # # patch "botan/secmem.h" # from [29935c5b1dc179460e8286f21746322db2ff05bb] # to [2aa44f66962bab3f1bba1cc32cc1b4de51e192aa] # # patch "botan/secqueue.cpp" # from [5037fd475d246948677e44e2236e800b7c115f92] # to [47286a3fe1c00e49d0320be854bbef8f16e5df15] # # patch "botan/secqueue.h" # from [106ee36176db91e6152a5b5276980b44aa09b0f1] # to [88829bd53deeb58ef405f2a51367f0258723fd28] # # patch "botan/socket.h" # from [e8849706085cdea44dc8ff3009a2a966965b4b56] # to [791b0f5d68be7da7d8faa38808a52d1aac5146f0] # # patch "botan/symkey.cpp" # from [074224d0aa4368c8291071f47dffe45cb3558206] # to [9a1dbc137d57bd32958639b12e0c151d4b9e6f86] # # patch "botan/symkey.h" # from [f33355c7fd13e785fc6f94b21fc0534a4f15b77d] # to [ae5be2affed3758d5383cd96c60d5643235b2be6] # # patch "botan/timers.cpp" # from [feff979b666a34d14788555eedf270b7060e592f] # to [988a7b75cf3464c0176894cddc741fb271e48a16] # # patch "botan/timers.h" # from [29ede2e248a818cc5b17b7688a94221259ce38a9] # to [7faf9a0353f4d8fe1c11b15bcf76a6db4e34860b] # # patch "botan/types.h" # from [93238b7a0ee25051c6ddc0ee1a61fcd734978899] # to [be7494e11341bccc6fa12fe984b2a892f88a8532] # # patch "botan/ui.cpp" # from [54e27258cd81e065af6b57f9a0acf171ff760760] # to [d5b192eb455808424d41a1e7112d7cb11c5cbe7f] # # patch "botan/ui.h" # from [9455f4dce960f0f2b2a05e3e92cc9ba136d31e6e] # to [a749e0f49028256cd9a159c54c56db95a8a6e66e] # # patch "botan/util.cpp" # from [6a85e690a9d0de8c77fd7c9006a3fcabc5f3c097] # to [bffaf59d7153d3f2f8b5482031a10a4b68a2d00e] # # patch "botan/util.h" # from [c98b09d26267303db39c6930316ec4bfaa577af2] # to [f79616d4efd20a9b88d57cdc3f536bc389e4b12f] # # patch "botan/version.h" # from [0384ce49a78d1f67268676f1b3544a8003fbe283] # to [e73ea207b4bcd5f6bb75baff61666b274b205cb9] # # patch "botan/x509_ca.cpp" # from [8b3275ed1718d77b664a4dac69f9e8df5f25a07e] # to [9f52746349237842fd87650177ec418ab196abb3] # # patch "botan/x509_ca.h" # from [cacda562e7cb5db8e3bc6bb03cb60a30850f9711] # to [8078cf9f2328251a13a938c506447d103a4df5c4] # # patch "botan/x509_crl.cpp" # from [c9aa820103b53c0d8a55aa949fdf8a02e1e8077f] # to [f6d30db8bc65b12ed646fe5418bf14d058a01257] # # patch "botan/x509_crl.h" # from [17dff45daf11dde3f216958689b06845ed172a4b] # to [3976dc632eea02244c6cc1e98b6f50b04c0aaf62] # # patch "botan/x509_key.cpp" # from [f47cf89e09ff326de8136ce3e03f7114eaad2088] # to [7b5056172f3f94a53935a8582b4bc42f69bdc036] # # patch "botan/x509_key.h" # from [3acac47396c685c507c8a049f0a583dbed5d0a74] # to [1bc439ee441be814c600aa25263bc3a1e9a0f519] # # patch "botan/x509_obj.cpp" # from [18ea0c22c805e2dc52d92b86a788c1430ffca24d] # to [1d6e176d66362ef556dcdca527924776db81c427] # # patch "botan/x509_obj.h" # from [990f87e55fc16c14e143ba9061180486240646ba] # to [2fa126c9ed1f9229d5a704c55757c48edb7d0d07] # # patch "botan/x509cert.cpp" # from [2754555bc83253250a1168e7067d288dac9c1905] # to [9554fb9bca448dc6ee6236ba3841f67728c857e8] # # patch "botan/x509cert.h" # from [3799c01700dffeef0a6d241c656e67f3a4af8dd4] # to [373ec84916c1d04b14060e7591d35c8a0c95b7ca] # # patch "botan/x509find.cpp" # from [fa00cdf310b5642aa8896c693b92db77a66defb9] # to [4424040676ed96bf27580bff45226299060557e9] # # patch "botan/x509opt.cpp" # from [fba4119a768cdc2f109f87be143a6fe45fbfc914] # to [8cc80bac5a3867975b45f3e390a09eb9b72adf0d] # # patch "botan/x509self.cpp" # from [41060ba068e0afb39c729c5b43955d0f8a0bcef9] # to [094994e2e470e89abf1975f722f6bfa539063e96] # # patch "botan/x509self.h" # from [395ce349b2550df1a44e5a4eb6cf3e98e35a7125] # to [9e92e9d4c47782f41374b1e4829f65cb51b4dd8e] # # patch "botan/x509stor.cpp" # from [1d4f8428283468c42c16e6dcccd4cd7fc87c9533] # to [ab702468d4cd4cdfbe36adcaf37b0782ac4f643a] # # patch "botan/x509stor.h" # from [317580b669aabc7ea56d0fa1e68e7d51a0d6e58c] # to [a78774e7bde040bb909220fef6c9e5536540788d] # # patch "botan/x917_rng.cpp" # from [1025931766017ebe0ad8ebcd50d8a4649f358b14] # to [b1f28ea6de070326b1cc69ee01ffa6aefe57be2e] # # patch "botan/x917_rng.h" # from [cb25b08a536563d9e5341db6f181530bd79a867a] # to [04ab9985fbd607ccfb2ab2d7a783c3d8af0290d7] # # patch "botan/x919_mac.h" # from [1705fe887e86ebfdade77bbb4486878f72cbfbc5] # to [7687240f8465f0ad5f51fb74fc246c4851f9fad6] # # patch "commands.cc" # from [55800638c9bd2da0aa48ab46d06beba1d5845c32] # to [61185ae5cc7cd776c25ca1655199a314bdd40378] # # patch "contrib/ciabot_monotone_hookversion.py" # from [] # to [3fc87a62b0d4ed9900f6735ebef812fc9948bc93] # # patch "database.cc" # from [04b7bf7f3d9722bb194a0623a339babc83d95c74] # to [83c0e4fe4b672da030bc50966c118ac0c2c98017] # # patch "database_check.cc" # from [415b63b94a1150b3aff78b9e7fa512e0141577e8] # to [c6145a7b639d6a67fd63c3816af36e67ada5144b] # # patch "lua.cc" # from [f8a4f1818ea770532218416cb55752238c1f3ce3] # to [fc053070a0c0a106e6f9a3e5678ef2a427ad1fcd] # # patch "lua.hh" # from [db3bb1c0a41f36d245e8f1cdbbada5b7a42f7dae] # to [950e24bc4b2c16b258f00aee0c4923ae93f256df] # # patch "monotone.cc" # from [21176c710f4d646215c27d82b55f182830d13268] # to [21be582ccd322a35a5d1864ee1251e5773054619] # # patch "monotone.texi" # from [b9423f2c78e69bf6307613fd2c4efc81427a92b9] # to [9b7b9ab00d31aead6a87466ff1a2d843c54084a8] # # patch "netsync.cc" # from [47d8fd00598b41e501700e9cf63e6300eb0fb1be] # to [6e37489151e0809548e293eb4d0495b8921cebfe] # # patch "po/POTFILES.in" # from [0f66018918c56534036a8a549e3b81fb12a9c4b6] # to [bd06ee5116d53df04a0065e56e3a6ef2b7837d8c] # # patch "po/POTFILES.skip" # from [8d5f6c3d6059a2c943f11a6208ead30399dca3c7] # to [61bc7af140315b993cde1192087564ea2105250d] # # patch "rcs_import.cc" # from [22646283896c3db9024ffa6b1f57dd8d76c6598c] # to [e01d4dc824657c684430fdf98d0132a1298f10d3] # # patch "tests/t_restriction_with_exclude.at" # from [] # to [bf85428b2d62062acb23d375b0b18a3706adc5dd] # # patch "testsuite.at" # from [f37b217c9d261739b96a0f8ccdc61269f1c0ee67] # to [9843a5c53ec471614fc6d5ef5dfcf16fc6995608] # ======================================================================== --- .mt-attrs f64f76c6bd0167f72362edd8c47724dffbe31907 +++ .mt-attrs 43c90c1b09c5f7a6d60f0fa6ce6e4eb67911789a @@ -1,6 +1,9 @@ file "contrib/ciabot_monotone.py" execute "true" + file "contrib/ciabot_monotone_hookversion.py" +execute "true" + file "contrib/color-logs.sh" execute "true" ======================================================================== --- ChangeLog 50802639ded49c79d2f4bbfa018f0adb56206858 +++ ChangeLog a8f0f6c5ccc10b4f16e1776741a2ed08326fdd34 @@ -1,3 +1,39 @@ +2005-09-16 Matt Johnston + + * botan/pkcs8.cpp: re-add the monotone-specific code for guessing if + a key is DER encoded or not. + +2005-09-16 Matt Johnston + + * botan/*: update to Botan 1.4.6 + * Makefile.am: ditto + +2005-09-15 Timothy Brownawell + + * app_state.{cc,hh}: restrictions now understand --exclude + * commands.cc: commit and revert now take OPT_EXCLUDE + * monotone.cc: update description of --exclude + * tests/t_restriction_with_exclude.at: new test + * testsuite.at: add it + +2005-09-14 Timothy Brownawell + + * contrib/ciabot_monotone_hookversion.py: CIA bot client script + meant to be called from the note_netsync_revision_received hook. + * lua.{cc,hh}: hook_note_commit and hook_note_netsync_revision_received + now take the text of the revision as an argument. + * netsync.cc, commands.cc: Give hooks new argument. + * monotone.texi: Update documentation for those hooks. + +2005-09-11 Benoît Dejean + + * database.cc + * database_check.cc + * netsync.cc + * po/POTFILES.in + * po/POTFILES.skip + * rcs_import.cc: More i18n strings. + 2005-09-07 Jim Meyering * tests/t_rename_dir_cross_level.at: When invoking mv to rename ======================================================================== --- Makefile.am 4fdc45d300225991df7992a71cedf7936a7d76b5 +++ Makefile.am 7a233d22f09d1b0d6eb2f010fdbb0cf97461af6c @@ -83,6 +83,7 @@ botan/def_ops.cpp botan/defalloc.cpp botan/der_code.cpp \ botan/der_enc.cpp botan/divide.cpp botan/dl_algo.cpp \ botan/dl_get.cpp botan/dl_group.cpp botan/dl_param.cpp \ + botan/dl_cache.cpp \ botan/dlies.cpp botan/eax.cpp botan/ecb.cpp botan/eme1.cpp \ botan/eme_pkcs.cpp botan/emsa1.cpp botan/emsa2.cpp \ botan/emsa3.cpp botan/emsa4.cpp botan/emsa_raw.cpp \ @@ -104,7 +105,7 @@ botan/pipe_rw.cpp botan/pk_algs.cpp botan/pk_core.cpp \ botan/pk_filts.cpp botan/pk_keys.cpp botan/pk_util.cpp \ botan/pkcs10.cpp botan/pkcs8.cpp botan/policy.cpp \ - botan/pow_mod.cpp botan/prf_ssl3.cpp botan/prf_tls.cpp \ + botan/pow_mod.cpp \ botan/prf_x942.cpp botan/primes.cpp botan/pubkey.cpp \ botan/randpool.cpp botan/reducer.cpp botan/rng.cpp \ botan/rsa.cpp botan/s2k.cpp botan/secqueue.cpp \ ======================================================================== --- app_state.cc 913741f52364afa34c20540f2008ef88fc911f30 +++ app_state.cc 4c8ba6a5cdc3fa945a945e19ea63e1fc857d3ca1 @@ -123,6 +123,7 @@ { static file_path root = file_path_internal(""); restrictions.clear(); + excludes.clear(); for (vector::const_iterator i = paths.begin(); i != paths.end(); ++i) { file_path p = file_path_external(*i); @@ -140,6 +141,24 @@ restrictions.insert(p); } + for (std::set::const_iterator i = exclude_patterns.begin(); + i != exclude_patterns.end(); ++i) + { + file_path p = file_path_external(*i); + + if (respect_ignore && lua.hook_ignore_file(p)) + { + L(F("'%s' ignored by excluded path set\n") % p); + continue; + } + + N(p == root || valid_paths.find(p) != valid_paths.end(), + F("unknown path '%s'\n") % p); + + L(F("'%s' added to excluded path set\n") % p); + excludes.insert(p); + } + // if user supplied a depth but provided no paths // assume current directory if ((depth != -1) && restrictions.empty()) @@ -152,23 +171,37 @@ app_state::restriction_includes(file_path const & path) { static file_path root = file_path_internal(""); - if (restrictions.empty()) + + if (restrictions.empty()) { - return true; - } + if (!excludes.empty()) + { + if (excludes.find(root) != excludes.end()) + return false; + fs::path test = fs::path(path.as_external(), fs::native); - bool user_supplied_depth = (depth != -1); + while (!test.empty()) + { + L(F("checking excluded path set for '%s'\n") % test.string()); - // a path that normalizes to "." means that the restriction has been - // essentially cleared (all files are included). rather than be - // careful about what goes in to the restricted path set we just - // check for this special case here. + file_path p = file_path_internal(test.string()); + path_set::const_iterator i = excludes.find(p); - if ((!user_supplied_depth) && restrictions.find(root) != restrictions.end()) - { + if (i != excludes.end()) + { + L(F("path '%s' found in excluded path set; '%s' excluded\n") + % test.string() % path); + return false; + } + + test = test.branch_path(); + } + } return true; } + bool user_supplied_depth = (depth != -1); + fs::path test = fs::path(path.as_external(), fs::native); long branch_depth = 0; long max_depth = depth + 1; @@ -179,6 +212,7 @@ file_path p = file_path_internal(test.string()); path_set::const_iterator i = restrictions.find(p); + path_set::const_iterator j = excludes.find(p); if (i != restrictions.end()) { @@ -186,10 +220,11 @@ % test.string() % path); return true; } - else + else if (j != excludes.end()) { - L(F("path '%s' not found in restricted path set; '%s' excluded\n") + L(F("path '%s' found in excluded path set; '%s' excluded\n") % test.string() % path); + return false; } if (user_supplied_depth && (max_depth == branch_depth)) return false; @@ -197,9 +232,13 @@ ++branch_depth; } - if (user_supplied_depth && (restrictions.find(root) != restrictions.end())) + // a path that normalizes to "." means that the restriction has been + // essentially cleared (all files are included). rather than be + // careful about what goes in to the restricted path set we just + // check for this special case here. + if (restrictions.find(root) != restrictions.end()) { - return (branch_depth <= max_depth); + return (!user_supplied_depth) || (branch_depth <= max_depth); } return false; ======================================================================== --- app_state.hh 6f4dfe92668723e2ca2eb8bb005ebab6c0d050c5 +++ app_state.hh 869c3e0393d765e37fc17ae117ccbbe69776b177 @@ -50,6 +50,7 @@ std::set exclude_patterns; std::vector extra_rcfiles; path_set restrictions; + path_set excludes; bool found_working_copy; long depth; long last; ======================================================================== --- botan/aes.cpp 8135e5fa9b189d5618f67ef27f63b4b16c683ca4 +++ botan/aes.cpp f544aa7fd0dca2a0a282736d62433f046fee78f2 @@ -1,6 +1,6 @@ /************************************************* * AES Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/aes.h 244fd78437608f33f3e559d359f8be7abd66c931 +++ botan/aes.h dacdc0de1fe5484610985ef059e9368f0d7244a0 @@ -1,6 +1,6 @@ /************************************************* * AES Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_AES_H__ ======================================================================== --- botan/aes_tab.cpp 78dcee057d2aa6cf37ca4331a2ce9d499e55ec96 +++ botan/aes_tab.cpp 559a744cd416011e4850b8e19719e56ae31b18d8 @@ -1,6 +1,6 @@ /************************************************* * S-Box and Diffusion Tables for AES * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/algolist.h d77a0da036e55d55613326f528ed680d6977bab7 +++ botan/algolist.h ef9d8f0eb6210c1b316298d4ca6f53013db1cef0 @@ -1,6 +1,6 @@ /************************************************* * Algorithm Lookup Table Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ALGOLIST_H__ ======================================================================== --- botan/allocate.cpp 8222a5340314265755a2b79469a367158fc2f99b +++ botan/allocate.cpp 00af600bc30ed8c6ecfdea3fe716cd169626b05f @@ -1,6 +1,6 @@ /************************************************* * Allocator Factory Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -25,12 +25,12 @@ void add(const std::string&, Allocator*); std::string set_default_allocator(const std::string&); - AllocatorFactory() { factory_lock = get_mutex(); } + AllocatorFactory() { factory_mutex = get_mutex(); } ~AllocatorFactory(); private: - std::map alloc; + std::map alloc_map; std::string default_allocator; - Mutex* factory_lock; + Mutex* factory_mutex; }; /************************************************* @@ -38,13 +38,13 @@ *************************************************/ Allocator* AllocatorFactory::get(const std::string& type) const { - Mutex_Holder lock(factory_lock); + Mutex_Holder lock(factory_mutex); std::map::const_iterator iter; - if(type == "default") iter = alloc.find(default_allocator); - else iter = alloc.find(type); + if(type == "default") iter = alloc_map.find(default_allocator); + else iter = alloc_map.find(type); - if(iter == alloc.end()) + if(iter == alloc_map.end()) return 0; return iter->second; } @@ -54,12 +54,12 @@ *************************************************/ Allocator* AllocatorFactory::get_default() const { - Mutex_Holder lock(factory_lock); + Mutex_Holder lock(factory_mutex); std::map::const_iterator iter; - iter = alloc.find(default_allocator); + iter = alloc_map.find(default_allocator); - if(iter == alloc.end()) + if(iter == alloc_map.end()) return 0; return iter->second; } @@ -69,9 +69,9 @@ *************************************************/ void AllocatorFactory::add(const std::string& type, Allocator* allocator) { - Mutex_Holder lock(factory_lock); + Mutex_Holder lock(factory_mutex); allocator->init(); - alloc[type] = allocator; + alloc_map[type] = allocator; } /************************************************* @@ -79,7 +79,7 @@ *************************************************/ std::string AllocatorFactory::set_default_allocator(const std::string& alloc) { - Mutex_Holder lock(factory_lock); + Mutex_Holder lock(factory_mutex); std::string old_default = default_allocator; default_allocator = alloc; @@ -92,12 +92,12 @@ AllocatorFactory::~AllocatorFactory() { std::map::iterator iter; - for(iter = alloc.begin(); iter != alloc.end(); iter++) + for(iter = alloc_map.begin(); iter != alloc_map.end(); iter++) { iter->second->destroy(); delete iter->second; } - delete factory_lock; + delete factory_mutex; } /************************************************* ======================================================================== --- botan/allocate.h f0c3067f73c5cef489b345ab0751b17e5ef07624 +++ botan/allocate.h 825e8e9e89e22aba9d30c55f4e142b98bbab5dfd @@ -1,6 +1,6 @@ /************************************************* * Allocator Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ALLOCATOR_H__ ======================================================================== --- botan/arc4.cpp 7ea03bc134ef34a54773c90d4d21d71a9eaa2c18 +++ botan/arc4.cpp 5d18a5e5578d84da92e194a2c878ff7da6503844 @@ -1,6 +1,6 @@ /************************************************* * ARC4 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/arc4.h 20156d762201ad8d930a526dbce55fe08ad12996 +++ botan/arc4.h 86febd85b9edfbe8a1ca0719659171b65f67bcab @@ -1,6 +1,6 @@ /************************************************* * ARC4 Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ARC4_H__ ======================================================================== --- botan/asn1.h 0673bdaef5291a134595648a953b67dc5d37c442 +++ botan/asn1.h 0f625e8cacf2288438d5b9f336a89e88205ac868 @@ -1,6 +1,6 @@ /************************************************* * ASN.1 Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ASN1_H__ ======================================================================== --- botan/asn1_alg.cpp c41db36633e5d356e67540a39230dc95fe36524e +++ botan/asn1_alg.cpp ecf1238bbee1ff0c59910a3baa65581f90683678 @@ -1,6 +1,6 @@ /************************************************* * Algorithm Identifier Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/asn1_alt.cpp 003f48d6763514457a190ee5e8753c562223b43d +++ botan/asn1_alt.cpp a96db0b1830a1c2aae7d77a6ac0b5945f4398505 @@ -1,6 +1,6 @@ /************************************************* * AlternativeName Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -38,6 +38,17 @@ } /************************************************* +* Add an OtherName field * +*************************************************/ +void AlternativeName::add_othername(const OID& oid, const std::string& value, + ASN1_Tag type) + { + if(value == "") + return; + multimap_insert(othernames, oid, ASN1_String(value, type)); + } + +/************************************************* * Get the attributes of this alternative name * *************************************************/ std::multimap AlternativeName::get_attributes() const @@ -46,11 +57,19 @@ } /************************************************* +* Get the otherNames * +*************************************************/ +std::multimap AlternativeName::get_othernames() const + { + return othernames; + } + +/************************************************* * Return if this object has anything useful * *************************************************/ bool AlternativeName::has_items() const { - return (alt_info.size() > 0); + return (alt_info.size() > 0 || othernames.size() > 0); } namespace DER { @@ -78,9 +97,24 @@ void encode(DER_Encoder& encoder, const AlternativeName& alt_name) { encoder.start_sequence(); + encode_entries(encoder, alt_name, "RFC822", ASN1_Tag(1)); encode_entries(encoder, alt_name, "DNS", ASN1_Tag(2)); encode_entries(encoder, alt_name, "URI", ASN1_Tag(6)); + + std::multimap othernames = alt_name.get_othernames(); + + std::multimap::const_iterator i; + for(i = othernames.begin(); i != othernames.end(); i++) + { + encoder.start_explicit(ASN1_Tag(0)); + DER::encode(encoder, i->first); + encoder.start_explicit(ASN1_Tag(0)); + DER::encode(encoder, i->second); + encoder.end_explicit(ASN1_Tag(0)); + encoder.end_explicit(ASN1_Tag(0)); + } + encoder.end_sequence(); } @@ -97,15 +131,49 @@ while(names.more_items()) { BER_Object obj = names.get_next_object(); - if(obj.class_tag != CONTEXT_SPECIFIC) + if((obj.class_tag != CONTEXT_SPECIFIC) && + (obj.class_tag != (CONTEXT_SPECIFIC | CONSTRUCTED))) continue; ASN1_Tag tag = obj.type_tag; - const std::string value = iso2local(BER::to_string(obj)); - if(tag == 1) alt_name.add_attribute("RFC822", value); - else if(tag == 2) alt_name.add_attribute("DNS", value); - else if(tag == 6) alt_name.add_attribute("URI", value); + if(tag == 0) + { + BER_Decoder othername(obj.value); + + OID oid; + BER::decode(othername, oid); + if(othername.more_items()) + { + BER_Object othername_value_outer = othername.get_next_object(); + othername.verify_end(); + + if(othername_value_outer.type_tag != ASN1_Tag(0) || + othername_value_outer.class_tag != + (CONTEXT_SPECIFIC | CONSTRUCTED) + ) + throw Decoding_Error("Invalid tags on otherName value"); + + BER_Decoder othername_value_inner(othername_value_outer.value); + + BER_Object value = othername_value_inner.get_next_object(); + othername_value_inner.verify_end(); + + ASN1_Tag value_type = value.type_tag; + + if(is_string_type(value_type) && value.class_tag == UNIVERSAL) + alt_name.add_othername(oid, BER::to_string(value), value_type); + } + } + else if(tag == 1 || tag == 2 || tag == 6) + { + const std::string value = iso2local(BER::to_string(obj)); + + if(tag == 1) alt_name.add_attribute("RFC822", value); + if(tag == 2) alt_name.add_attribute("DNS", value); + if(tag == 6) alt_name.add_attribute("URI", value); + } + } } ======================================================================== --- botan/asn1_att.cpp 175de742c23d2ae762fbe5a4862ae0c131d20392 +++ botan/asn1_att.cpp 636c751ebe11b317a810f0fbd8b0a024f05c0e97 @@ -1,6 +1,6 @@ /************************************************* * Attribute Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/asn1_dn.cpp 66e58f586ee99e7e0b789250db79320cbae0de16 +++ botan/asn1_dn.cpp 69534bf7311cb012090e0c9c0f64025dcadfc35c @@ -1,6 +1,6 @@ /************************************************* * X509_DN Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/asn1_ext.cpp adcded31305574a0c37a44987c27a9c212a81260 +++ botan/asn1_ext.cpp a8cc362726b13e9e81757a214fd39b684253a0ef @@ -1,6 +1,6 @@ /************************************************* * Extension Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/asn1_ku.cpp 80baaded8a2bfb051b1b01f74804d51cf9f1a013 +++ botan/asn1_ku.cpp 43916185735c5d26bdc5fa1772698b8db315838b @@ -1,6 +1,6 @@ /************************************************* * KeyUsage Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/asn1_obj.h 197606805a327d6c05f1b98d7181861fc8a6e7ba +++ botan/asn1_obj.h 16357c964a2e7ee51e5501db6ff05971fa737aa5 @@ -1,6 +1,6 @@ /************************************************* * Common ASN.1 Objects Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ASN1_OBJ_H__ @@ -131,12 +131,16 @@ void add_attribute(const std::string&, const std::string&); std::multimap get_attributes() const; + void add_othername(const OID&, const std::string&, ASN1_Tag); + std::multimap get_othernames() const; + bool has_items() const; AlternativeName(const std::string& = "", const std::string& = "", const std::string& = ""); private: std::multimap alt_info; + std::multimap othernames; }; /************************************************* @@ -156,6 +160,8 @@ s32bit validity_check(const X509_Time&, const X509_Time&, u64bit); +bool is_string_type(ASN1_Tag); + /************************************************* * DER Encoding Functions * *************************************************/ ======================================================================== --- botan/asn1_oid.cpp 113696871e0ca992ff1e8c530b77605542b980c9 +++ botan/asn1_oid.cpp bd982245f5f3d15f424be78f3383d77762f848d4 @@ -1,6 +1,6 @@ /************************************************* * ASN.1 OID Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/asn1_oid.h ff465c835e6a44e73fdabfe10c849e146437a1f3 +++ botan/asn1_oid.h f9678be8147d4e32f1836282704fd63060171924 @@ -1,6 +1,6 @@ /************************************************* * ASN.1 OID Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ASN1_OID_H__ ======================================================================== --- botan/asn1_str.cpp 56901d327ef5963962c704d9a10a2587e56884a1 +++ botan/asn1_str.cpp 75c135f4178b8dfec1363b216049809919eb1435 @@ -1,6 +1,6 @@ /************************************************* * Simple ASN.1 String Types Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -53,6 +53,18 @@ } /************************************************* +* Check if type is a known ASN.1 string type * +*************************************************/ +bool is_string_type(ASN1_Tag tag) + { + if(tag == NUMERIC_STRING || tag == PRINTABLE_STRING || + tag == VISIBLE_STRING || tag == T61_STRING || tag == IA5_STRING || + tag == UTF8_STRING || tag == BMP_STRING) + return true; + return false; + } + +/************************************************* * Create an ASN1_String * *************************************************/ ASN1_String::ASN1_String(const std::string& str, ASN1_Tag t) : tag(t) ======================================================================== --- botan/asn1_tm.cpp 4a339d34777a8c8f19da139ef0c41d11161dd44d +++ botan/asn1_tm.cpp 69296df4a30b2b4d4213d6a78274f5a0f813e48c @@ -1,6 +1,6 @@ /************************************************* * X.509 Time Types Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/barrett.cpp 5c0327d2445b9f3fc066f155674ad2235ca2b64e +++ botan/barrett.cpp ea5008b06d86cd1f84a53bb3babec53e2f5973de @@ -1,6 +1,6 @@ /************************************************* * Barrett Reducer Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/barrett.h 8b76f90ed2cd705a5d3a5fb1e57ac9ea2f33b4a2 +++ botan/barrett.h 30768ab0d31c2200e713237e7f4b8aaf1c6ab679 @@ -1,6 +1,6 @@ /************************************************* * Barrett Reducer Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BARRETT_H__ ======================================================================== --- botan/base.cpp 2d56945dad7cbca306fd1cdfa376297eb796a723 +++ botan/base.cpp 3fcd48a2b31dc404fcc861f0c1150d764f276e1f @@ -1,6 +1,6 @@ /************************************************* * Base Classes Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -217,13 +217,13 @@ *************************************************/ void RandomNumberGenerator::add_entropy(EntropySource& source, bool slowpoll) { - SecureVector entropy(slowpoll ? 192 : 64); + SecureVector buffer(slowpoll ? 192 : 64); u32bit returned; - if(slowpoll) returned = source.slow_poll(entropy, entropy.size()); - else returned = source.fast_poll(entropy, entropy.size()); + if(slowpoll) returned = source.slow_poll(buffer, buffer.size()); + else returned = source.fast_poll(buffer, buffer.size()); - add_entropy(entropy, returned); + add_entropy(buffer, returned); } /************************************************* ======================================================================== --- botan/base.h 1fe7fb64e2f2d4cdf9373205ba255ec0296d19ab +++ botan/base.h 7223b306fb862c20a89c03a1460c366aca16fc6f @@ -1,6 +1,6 @@ /************************************************* * Base Classes Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BASE_H__ @@ -10,7 +10,6 @@ #include #include #include -#include namespace Botan { ======================================================================== --- botan/base64.cpp 9fe31429403b86d01c267309c04fc90e1e606ff5 +++ botan/base64.cpp f8f825aa6ababa4d464f193348d429e8729c6cb8 @@ -1,6 +1,6 @@ /************************************************* * Base64 Encoder/Decoder Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/base64.h 6903d988dfe5ba1bbc2e82d7c03f3f8ed838ed81 +++ botan/base64.h a230286f7ddfefab2e317197aed37cfa407e4494 @@ -1,6 +1,6 @@ /************************************************* * Base64 Encoder/Decoder Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BASE64_H__ ======================================================================== --- botan/base_eng.h a1137490aeb1da477c7f827b4cb0c0a4d83be21e +++ botan/base_eng.h e2c682688a68ca8c392fef8febe24a5f163a5c22 @@ -1,6 +1,6 @@ /************************************************* * Default Engine Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_DEFAULT_ENGINE_H__ ======================================================================== --- botan/basefilt.cpp a87e31f5925cc6a1226c1f9e47f206ff7c279d8b +++ botan/basefilt.cpp c62ab8ed09c29b42cab4060b763eaa12f5ae4ed5 @@ -1,6 +1,6 @@ /************************************************* * Basic Filters Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/basefilt.h 35b6dbe10c295089d744ebbdef3f98c35b65bfd7 +++ botan/basefilt.h dc993b59b350b86f39fd125e42c925c4067edd64 @@ -1,6 +1,6 @@ /************************************************* * Basic Filters Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BASEFILT_H__ ======================================================================== --- botan/ber_code.cpp 45e75d9d3f7d32d0daf0f692da91cb8c1d4fc326 +++ botan/ber_code.cpp 41b67aa4c136a6acfe9757658dd4ccbb5d52c340 @@ -1,6 +1,6 @@ /************************************************* * BER Decoding Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/ber_dec.cpp b42fae01777b272d26888808e10b95d195801700 +++ botan/ber_dec.cpp 85736204e607a95c150ee1a5e6b9ac1b82373349 @@ -1,6 +1,6 @@ /************************************************* * BER Decoder Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/ber_dec.h f0b877d1cfa5d94ec9c0793fc25ac03f24840de8 +++ botan/ber_dec.h 380987e05bd500b7663f5954bdb4a7c8b0e84241 @@ -1,6 +1,6 @@ /************************************************* * BER Decoder Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BER_DECODER_H__ ======================================================================== --- botan/big_base.cpp 018118b988d580e6ffb34e98d4ccafcd0be4d070 +++ botan/big_base.cpp 6b393b5416c22430149721f291e3f6839239d3fb @@ -1,6 +1,6 @@ /************************************************* * BigInt Base Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/big_code.cpp 50c850ceff3facc002653a9b8d0a1dacfea8c741 +++ botan/big_code.cpp 9d421e837b118c241771431e97b8269a0049339a @@ -1,6 +1,6 @@ /************************************************* * BigInt Encoding/Decoding Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/big_io.cpp 6a91448edae6ea766cc3159b6ef011acaeabc9ae +++ botan/big_io.cpp 17083ec29a3235fba2817a5117cc4c303434df3d @@ -1,6 +1,6 @@ /************************************************* * BigInt Input/Output Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/big_ops2.cpp 6568718ebd4e38e1e238421efa1be22d37b05db2 +++ botan/big_ops2.cpp b951478dcd76378226809a907f402ec29abb43c3 @@ -1,6 +1,6 @@ /************************************************* * BigInt Assignment Operators Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/big_ops3.cpp ed3b596d0ac13f3ba549ad1e2849e9966cdf0fea +++ botan/big_ops3.cpp 7fcfc51d05c038b3cc268b9993c9140524d91afb @@ -1,6 +1,6 @@ /************************************************* * BigInt Binary Operators Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/bigint.h 39ccfdeac610512103d16674c299939e1e693d5a +++ botan/bigint.h 0f4e2101aad1e358bfbba6a7e5b136c42566786c @@ -1,6 +1,6 @@ /************************************************* * BigInt Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BIGINT_H__ ======================================================================== --- botan/blinding.cpp 69a1b620f677a22b7c6a55039e964678c3bc2d0a +++ botan/blinding.cpp 409b0a4f351117490772f07a5328ce0ec88a420b @@ -1,6 +1,6 @@ /************************************************* * Blinder Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/blinding.h 55ffef0dd36306cf00d35f6f261040c659e2edf7 +++ botan/blinding.h 93d726432666ec51edd74003647882948261d9fd @@ -1,6 +1,6 @@ /************************************************* * Blinder Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BLINDER_H__ ======================================================================== --- botan/botan.h 69d369bbb161dadf9db1e224ce7a5b01b97298a4 +++ botan/botan.h e19178830bd4ceadbc977e8f54ce45f9f18c7ec4 @@ -1,6 +1,6 @@ /************************************************* * Basic Interface Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/buf_es.cpp 17ffcafc5f0091775f5ff82361b0e8d211557f0d +++ botan/buf_es.cpp 22b201e4e9b1a2704dd762e5d8670d74790b53c8 @@ -1,6 +1,6 @@ /************************************************* * Buffered EntropySource Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/buf_es.h dadb51dc51778193c22232774300054aa6771ff8 +++ botan/buf_es.h 92c7fed684a29fa220d3320c0b3ca431874ddc8e @@ -1,6 +1,6 @@ /************************************************* * Buffered EntropySource Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BUFFERED_ES_H__ ======================================================================== --- botan/buf_filt.cpp 258d2b85a47bc42faf4e50849f125686fe83b2ac +++ botan/buf_filt.cpp 42c8a97f415ccacfe8b3ddaa29df18151b5dc6a7 @@ -1,6 +1,6 @@ /************************************************* * Buffering Filter Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/buf_filt.h 0e7534629e985eb81b751339e8c6244007f7c65e +++ botan/buf_filt.h 82b9c858e60af6bf816750888764e9330a6125c4 @@ -1,6 +1,6 @@ /************************************************* * Buffering Filter Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BUFFERING_FILTER_H__ ======================================================================== --- botan/cbc.cpp ae938d9c8632da302d82fba0a8efab4e609c3885 +++ botan/cbc.cpp 07356236e863c7453b30c33fbdb6a10507a02e24 @@ -1,6 +1,6 @@ /************************************************* * CBC Mode Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/cbc.h f741d411a9bd09ee108836e0bf02962ae55cd241 +++ botan/cbc.h 0ea0edd6d72aa5c8baec83cf46d075e326b05006 @@ -1,6 +1,6 @@ /************************************************* * CBC Mode Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_CBC_H__ ======================================================================== --- botan/certstor.h 7f5bbeb13d876da9b0905f252110e70250f25289 +++ botan/certstor.h 0ac4c8644a5d17b7adb2868f37fe9fcc8adc310c @@ -1,6 +1,6 @@ /************************************************* * Certificate Store Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_CERT_STORE_H__ ======================================================================== --- botan/certstore.cpp 12cddfbff8d0ebf1ddf323198f2381992b527b80 +++ botan/certstore.cpp d9840e20d737606905f1b846de1faa49870e4357 @@ -1,6 +1,6 @@ /************************************************* * Certificate Store Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/cfb.cpp e33d8760634d2b5e10329e0c34b5cebe72848904 +++ botan/cfb.cpp fe3b9c70b199eb3671f1d1a7e678acf81be143ee @@ -1,6 +1,6 @@ /************************************************* * CFB Mode Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/cfb.h 9b9f3a3ce4094e6f968d12cf0d41bd579219b900 +++ botan/cfb.h 283d95f7f0336c5c97242104439f666b5d190e13 @@ -1,6 +1,6 @@ /************************************************* * CFB Mode Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_CFB_H__ ======================================================================== --- botan/charset.cpp fb06b37e3cc3dd2f01c30901397d6417bde0a91d +++ botan/charset.cpp 4eefedeea00d833c01b8968cf09a391821389bfe @@ -1,9 +1,9 @@ /************************************************* * Character Set Handling Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ -#include +#include #include #include #include @@ -11,6 +11,63 @@ namespace Botan { /************************************************* +* Check if a character represents a digit * +*************************************************/ +bool is_digit(char c) + { + if(c == '0' || c == '1' || c == '2' || c == '3' || c == '4' || + c == '5' || c == '6' || c == '7' || c == '8' || c == '9') + return true; + return false; + } + +/************************************************* +* Check if a character represents whitespace * +*************************************************/ +bool is_space(char c) + { + if(c == ' ' || c == '\t' || c == '\n' || c == '\r') + return true; + return false; + } + +/************************************************* +* Convert a character to a digit * +*************************************************/ +byte char2digit(char c) + { + if(c == '0') return 0; + if(c == '1') return 1; + if(c == '2') return 2; + if(c == '3') return 3; + if(c == '4') return 4; + if(c == '5') return 5; + if(c == '6') return 6; + if(c == '7') return 7; + if(c == '8') return 8; + if(c == '9') return 9; + throw Invalid_Argument("char2digit: Invalid decimal char " + c); + } + +/************************************************* +* Convert a digit to a character * +*************************************************/ +char digit2char(byte b) + { + if(b == 0) return '0'; + if(b == 1) return '1'; + if(b == 2) return '2'; + if(b == 3) return '3'; + if(b == 4) return '4'; + if(b == 5) return '5'; + if(b == 6) return '6'; + if(b == 7) return '7'; + if(b == 8) return '8'; + if(b == 9) return '9'; + throw Invalid_Argument("digit2char: Input is not a digit"); + } + +/************************************************* * Return the lower-case representation * *************************************************/ char to_lower(char c) ======================================================================== --- botan/charset.h +++ botan/charset.h 0a2fc0cf36512cdfbe8725d7a08cf7c239638cc5 @@ -0,0 +1,32 @@ +/************************************************* +* Character Set Handling Header File * +* (C) 1999-2005 The Botan Project * +*************************************************/ + +#ifndef BOTAN_CHARSET_H__ +#define BOTAN_CHARSET_H__ + +#include +#include + +namespace Botan { + +/************************************************* +* Character Set Handling * +*************************************************/ +bool is_digit(char); +bool is_space(char); +char to_lower(char); + +byte char2digit(char); +char digit2char(byte); + +std::string local2iso(const std::string&); +std::string iso2local(const std::string&); + +std::string utf2iso(const std::string&); +std::string iso2utf(const std::string&); + +} + +#endif ======================================================================== --- botan/conf.cpp 643f2ea2ddb23e57d0dc3b190c2c9931d4a1fc9c +++ botan/conf.cpp a4d66f1f29a263d401e17af592c184131422f682 @@ -1,64 +1,99 @@ /************************************************* * Configuration Handling Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include #include #include +#include #include namespace Botan { -namespace Config { +namespace { -namespace { +/************************************************* +* Holder for name-value option pairs * +*************************************************/ +class Options + { + public: + std::string get(const std::string&); + void set(const std::string&, const std::string&, bool); -std::map options; -Mutex* options_lock = 0; + Options() { options_mutex = get_mutex(); } + ~Options() { delete options_mutex; } + private: + std::map options; + Mutex* options_mutex; + }; /************************************************* -* Parse and compute an arithmetic expression * +* Get an option by name * *************************************************/ -u32bit parse_expr(const std::string& expr) +std::string Options::get(const std::string& name) { - const bool have_add = (expr.find('+') != std::string::npos); - const bool have_mul = (expr.find('*') != std::string::npos); + Mutex_Holder lock(options_mutex); - if(have_add) - { - std::vector sub_expr = split_on(expr, '+'); - u32bit result = 0; - for(u32bit j = 0; j != sub_expr.size(); j++) - result += parse_expr(sub_expr[j]); - return result; - } - else if(have_mul) - { - std::vector sub_expr = split_on(expr, '*'); - u32bit result = 1; - for(u32bit j = 0; j != sub_expr.size(); j++) - result *= parse_expr(sub_expr[j]); - return result; - } - else - return to_u32bit(expr); + std::map::const_iterator i = options.find(name); + if(i != options.end()) + return i->second; + return ""; } +/************************************************* +* Set an option by name * +*************************************************/ +void Options::set(const std::string& name, const std::string& value, + bool overwrite) + { + const bool have_it = ((get(name) == "") ? false : true); + + Mutex_Holder lock(options_mutex); + if(overwrite || !have_it) + options[name] = value; + } + +/************************************************* +* Global state * +*************************************************/ +Options* options = 0; + } +namespace Init { + /************************************************* +* Startup the configuration system * +*************************************************/ +void startup_conf() + { + options = new Options; + } + +/************************************************* +* Shutdown the configuration system * +*************************************************/ +void shutdown_conf() + { + delete options; + options = 0; + } + +} + +namespace Config { + +/************************************************* * Set an option * *************************************************/ void set(const std::string& name, const std::string& value, bool overwrite) { - const bool have_it = ((get_string(name) == "") ? false : true); + if(!options) + throw Internal_Error("Config::set: Conf system never started"); - initialize_mutex(options_lock); - Mutex_Holder lock(options_lock); - - if(overwrite || !have_it) - options[name] = value; + options->set(name, value, overwrite); } /************************************************* @@ -66,13 +101,10 @@ *************************************************/ std::string get_string(const std::string& name) { - initialize_mutex(options_lock); - Mutex_Holder lock(options_lock); + if(!options) + throw Internal_Error("Config::get: Conf system never started"); - std::map::const_iterator i = options.find(name); - if(i != options.end()) - return i->second; - return ""; + return options->get(name); } /************************************************* ======================================================================== --- botan/conf.h 0b602b8e2b927d74ec28d6d87a584aa3e31195ef +++ botan/conf.h 71b0151c64d71a4a3450a0fad05fc3c6a227815f @@ -1,6 +1,6 @@ /************************************************* * Configuration Handling Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_POLICY_CONF_H__ ======================================================================== --- botan/crc32.cpp 53cbb50cd0477189162fd30c87167042dceeac44 +++ botan/crc32.cpp 6f79aadddee3ca58108dbb79eaf9818c917df452 @@ -1,6 +1,6 @@ /************************************************* * CRC32 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/crc32.h 85099a7b83816dc20cb891c999527074187f1ac1 +++ botan/crc32.h 14797da7c705de3d822da4419a90d8eced1dbd1f @@ -1,6 +1,6 @@ /************************************************* * CRC32 Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_CRC32_H__ ======================================================================== --- botan/crl_ent.cpp 54b739d37d71f1abcddeb944a58cbee0fa632a84 +++ botan/crl_ent.cpp e066797dbdeb2eb2f8124a791e2739deb847fdc4 @@ -1,6 +1,6 @@ /************************************************* * CRL Entry Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/crl_ent.h 0539e983d16efda8ee76c3fa87b285e774f0b391 +++ botan/crl_ent.h cec8c4510b2505708ff6dd2bb2a6d8e60ec792eb @@ -1,6 +1,6 @@ /************************************************* * CRL Entry Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_CRL_ENTRY_H__ ======================================================================== --- botan/ctr.cpp 31a49ab9c99c151565fa8f7298586f342baf7afe +++ botan/ctr.cpp f03e800de4653a9a335c30abde0b6a1fbb8b64df @@ -1,6 +1,6 @@ /************************************************* * CTR Mode Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/ctr.h e9b82176a17a126b51e9baab8be858f80c6ca3f6 +++ botan/ctr.h 60b1b31f804d1f2808420b3869f6c1141ae5ba19 @@ -1,6 +1,6 @@ /************************************************* * CTR Mode Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_CTR_H__ ======================================================================== --- botan/cts.cpp 0af0fd46dc6c5bb65af0189ef9d5e03bf593df39 +++ botan/cts.cpp 2008cc5f4cc4303c9d8179a689513de479d5a08e @@ -1,6 +1,6 @@ /************************************************* * CTS Mode Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/cts.h 4c9a0ee6740a624bbf39533f44f24f37c7f0a302 +++ botan/cts.h c458d765007da986f16e0775a69a8635b8f69742 @@ -1,6 +1,6 @@ /************************************************* * CTS Mode Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_CTS_H__ ======================================================================== --- botan/data_snk.cpp 4c1f45222a6f41b3b1777f757dbc3687edc5806a +++ botan/data_snk.cpp fa0cc906ebf754c99f054b78f02f2906da140db7 @@ -1,6 +1,6 @@ /************************************************* * DataSink Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/data_snk.h cb2454f0182f6416729cb5a75279b6a84812be16 +++ botan/data_snk.h 9e221cab38c1145c37fc832e802c091cfe7dac75 @@ -1,6 +1,6 @@ /************************************************* * DataSink Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_DATA_SINK_H__ ======================================================================== --- botan/data_src.cpp 8e0cd9e19678dc472149b2a87a2fc4ad40772e5e +++ botan/data_src.cpp 00dc4c8f2680501212b65a712d6eef20ae9a271e @@ -1,6 +1,6 @@ /************************************************* * DataSource Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -109,12 +109,17 @@ if(end_of_data()) throw Invalid_State("DataSource_Stream: Cannot peek when out of data"); - SecureVector buf(offset); - source->read((char*)buf.begin(), buf.size()); - if(source->bad()) - throw Stream_IO_Error("DataSource_Stream::peek: Source failure"); - u32bit got = source->gcount(); + u32bit got = 0; + if(offset) + { + SecureVector buf(offset); + source->read((char*)buf.begin(), buf.size()); + if(source->bad()) + throw Stream_IO_Error("DataSource_Stream::peek: Source failure"); + got = source->gcount(); + } + if(got == offset) { source->read((char*)out, length); ======================================================================== --- botan/data_src.h 0e7c72b15f861375f65d44b837e24809fb5246cb +++ botan/data_src.h b386d479f8908dcc942ed10013d6cfb2bbc8f031 @@ -1,6 +1,6 @@ /************************************************* * DataSource Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_DATA_SRC_H__ ======================================================================== --- botan/def_eng.cpp 036ea54c991b78627bbb43cc80e731f9c8ee2ee6 +++ botan/def_eng.cpp cebe435088b0f3cae4e4b103211a3d19609966cb @@ -1,6 +1,6 @@ /************************************************* * Default Engine Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/def_eng.h a4906d5dd169dc71c5f35111ebe9e7161bebfa16 +++ botan/def_eng.h cb6c6b9768a0e7c77e67e9eef6598904d85f3b0e @@ -1,6 +1,6 @@ /************************************************* * Default Engine Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_DEFAULT_ENGINE_H__ ======================================================================== --- botan/def_ops.cpp ca3801883a7902957cded598081a5761aaa10e79 +++ botan/def_ops.cpp 18c63eab3d6ada615f8988fd13f0a4d39d218ae3 @@ -1,6 +1,6 @@ /************************************************* * Default Engine PK Operations Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/defalloc.cpp e330d915e67e2b1ff2ea1e01b6f7dc21c752f511 +++ botan/defalloc.cpp 0a8c4ea4f0ff0831f906e30415ab78d3fe0678b9 @@ -1,6 +1,6 @@ /************************************************* * Basic Allocators Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/defalloc.h beda55c363ee2fd4ed5b50d654372a0dd40bf222 +++ botan/defalloc.h f3cbe94e43909da2f169b34e04217b2946fc429e @@ -1,6 +1,6 @@ /************************************************* * Basic Allocators Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_BASIC_ALLOC_H__ @@ -28,8 +28,8 @@ private: void* alloc_block(u32bit) const; void dealloc_block(void*, u32bit) const; - u32bit prealloc_bytes() const { return 128*1024; } - bool should_not_free() const { return true; } + u32bit prealloc_bytes() const { return 256*1024; } + u32bit keep_free() const { return 256*1024; } }; } ======================================================================== --- botan/der_code.cpp 906a1062209a1f6ecb16ee64c69aa2f653ca9c3e +++ botan/der_code.cpp 7d1a406cbfb6bef841797d6c44fe49d5dd730c03 @@ -1,6 +1,6 @@ /************************************************* * DER Coding Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/der_enc.cpp ac9170917e29853420f5df76943c00eb6df150ea +++ botan/der_enc.cpp 2898db4a4312ab8887c241f1758f8871153fe844 @@ -1,6 +1,6 @@ /************************************************* * DER Encoder Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/der_enc.h a2ddf690cbe1290e24a38b8cc24232b25e48e6a3 +++ botan/der_enc.h 612aef07516329e81624156d1481208dd64a88f7 @@ -1,6 +1,6 @@ /************************************************* * DER Encoder Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_DER_ENCODER_H__ ======================================================================== --- botan/dh.cpp 7410d18e0689cf0b88fcd629377532c953fb9372 +++ botan/dh.cpp 88888aafa2ba75594db9f3fc9884ad2397e76e6d @@ -1,6 +1,6 @@ /************************************************* * Diffie-Hellman Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/dh.h 82659d1abc7e35ddb1462a3ff64d26066a17c8a5 +++ botan/dh.h 0eb696b0a935052659c8a3bd123d0e0f4f965a65 @@ -1,6 +1,6 @@ /************************************************* * Diffie-Hellman Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_DIFFIE_HELLMAN_H__ ======================================================================== --- botan/divide.cpp 272b0e327dd778b55e36e54e41a6552e1c0c56dd +++ botan/divide.cpp 71a6766759d8ea7a4f148fc7187b99c17168502c @@ -1,6 +1,6 @@ /************************************************* * Division Algorithm Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/dl_algo.cpp 06b5b14b241a3dcf402ac8b86446e58dcd762560 +++ botan/dl_algo.cpp 407d1a5e155d69d0248bdf003b1d4ae1c59eb07e @@ -1,6 +1,6 @@ /************************************************* * DL Scheme Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/dl_algo.h 96e5c93c3d952b29f368ba26ca216bd7781e6675 +++ botan/dl_algo.h ba177f21543053329ffa01070970973d5db39a52 @@ -1,6 +1,6 @@ /************************************************* * DL Scheme Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_DL_ALGO_H__ ======================================================================== --- botan/dl_cache.cpp +++ botan/dl_cache.cpp beccd9ed986895e885d4dd553b3667c585c3b842 @@ -0,0 +1,110 @@ +/************************************************* +* DL Group Cache Source File * +* (C) 1999-2005 The Botan Project * +*************************************************/ + +#include +#include +#include +#include + +namespace Botan { + +/************************************************* +* Try to obtain a particular DL group * +*************************************************/ +extern DL_Group try_to_get_dl_group(const std::string&); + +namespace { + +/************************************************* +* Cache for DL_Group objects * +*************************************************/ +class DL_Group_Cache + { + public: + const DL_Group& get(const std::string&); + void add(const std::string&, const DL_Group&); + + DL_Group_Cache() { groups_mutex = get_mutex(); } + ~DL_Group_Cache() { groups.clear(); delete groups_mutex; } + private: + std::map groups; + Mutex* groups_mutex; + }; + +/************************************************* +* Get a DL_Group * +*************************************************/ +const DL_Group& DL_Group_Cache::get(const std::string& name) + { + Mutex_Holder lock(groups_mutex); + + std::map::const_iterator group; + group = groups.find(name); + if(group != groups.end()) + return group->second; + + groups.insert(std::make_pair(name, try_to_get_dl_group(name))); + + group = groups.find(name); + if(group != groups.end()) + return group->second; + + throw Lookup_Error("DL group \"" + name + "\" not found"); + } + +/************************************************* +* Add a new DL_Group * +*************************************************/ +void DL_Group_Cache::add(const std::string& name, const DL_Group& group) + { + Mutex_Holder lock(groups_mutex); + groups.insert(std::make_pair(name, group)); + } + +/************************************************* +* Global state for DL_Group cache * +*************************************************/ +DL_Group_Cache* dl_groups = 0; + +} + +/************************************************* +* Retrieve a DL group by name * +*************************************************/ +const DL_Group& get_dl_group(const std::string& name) + { + return dl_groups->get(name); + } + +/************************************************* +* Register a named DL group * +*************************************************/ +void add_dl_group(const std::string& name, const DL_Group& group) + { + dl_groups->add(name, group); + } + +namespace Init { + +/************************************************* +* Create the cache * +*************************************************/ +void startup_dl_cache() + { + dl_groups = new DL_Group_Cache; + } + +/************************************************* +* Destroy the cache * +*************************************************/ +void shutdown_dl_cache() + { + delete dl_groups; + dl_groups = 0; + } + +} + +} ======================================================================== --- botan/dl_group.cpp eb98c6c708e299d70dae4ad614828345ce036a74 +++ botan/dl_group.cpp c335b79e38e853a394fd76e734ea102480cf6042 @@ -1,6 +1,6 @@ /************************************************* * DL Groups Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -107,22 +107,38 @@ "FFFFFFFF FFFFFFFF"; /************************************************* -* JCE seed/counter for 512-bit DSA modulus * +* JCE default 512-bit DSA group * *************************************************/ -const char* JCE_512_SEED = "B869C82B 35D70E1B 1FF91B28 E37A62EC DC34409B"; -const u32bit JCE_512_COUNTER = 123; +const char* JCE_512_PRIME_P = + "FCA682CE 8E12CABA 26EFCCF7 110E526D B078B05E DECBCD1E" + "B4A208F3 AE1617AE 01F35B91 A47E6DF6 3413C5E1 2ED0899B" + "CD132ACD 50D99151 BDC43EE7 37592E17"; +const char* JCE_512_PRIME_Q = + "962EDDCC 369CBA8E BB260EE6 B6A126D9 346E38C5"; /************************************************* -* JCE seed/counter for 768-bit DSA modulus * +* JCE default 768-bit DSA group * *************************************************/ -const char* JCE_768_SEED = "77D0F8C4 DAD15EB8 C4F2F8D6 726CEFD9 6D5BB399"; -const u32bit JCE_768_COUNTER = 263; +const char* JCE_768_PRIME_P = + "E9E64259 9D355F37 C97FFD35 67120B8E 25C9CD43 E927B3A9" + "670FBEC5 D8901419 22D2C3B3 AD248009 3799869D 1E846AAB" + "49FAB0AD 26D2CE6A 22219D47 0BCE7D77 7D4A21FB E9C270B5" + "7F607002 F3CEF839 3694CF45 EE3688C1 1A8C56AB 127A3DAF"; +const char* JCE_768_PRIME_Q = + "9CDBD84C 9F1AC2F3 8D0F80F4 2AB952E7 338BF511"; /************************************************* -* JCE seed/counter for 1024-bit DSA modulus * +* JCE default 1024-bit DSA group * *************************************************/ -const char* JCE_1024_SEED = "8D515589 4229D5E6 89EE01E6 018A237E 2CAE64CD"; -const u32bit JCE_1024_COUNTER = 92; +const char* JCE_1024_PRIME_P = + "FD7F5381 1D751229 52DF4A9C 2EECE4E7 F611B752 3CEF4400" + "C31E3F80 B6512669 455D4022 51FB593D 8D58FABF C5F5BA30" + "F6CB9B55 6CD7813B 801D346F F26660B7 6B9950A5 A49F9FE8" + "047B1022 C24FBBA9 D7FEB7C6 1BF83B57 E7C6A8A6 150F04FB" + "83F6D3C5 1EC30235 54135A16 9132F675 F3AE2B61 D72AEFF2" + "2203199D D14801C7"; +const char* JCE_1024_PRIME_Q = + "9760508F 15230BCC B292B982 A2EB840B F0581CF5"; /************************************************* * Decode the modulus string * @@ -133,14 +149,6 @@ BigInt::Hexadecimal); } -/************************************************* -* Decode the seed for DSA prime generation * -*************************************************/ -MemoryVector decode_seed(const std::string& hex_seed) - { - return OctetString(hex_seed).bits_of(); - } - } /************************************************* @@ -148,15 +156,21 @@ *************************************************/ DL_Group try_to_get_dl_group(const std::string& name) { - if(name == "DSA-512") - return DL_Group(decode_seed(JCE_512_SEED), 512, JCE_512_COUNTER); - if(name == "DSA-768") - return DL_Group(decode_seed(JCE_768_SEED), 768, JCE_768_COUNTER); - if(name == "DSA-1024") - return DL_Group(decode_seed(JCE_1024_SEED), 1024, JCE_1024_COUNTER); + if(name == "DSA-512" || name == "DSA-768" || name == "DSA-1024") + { + const char* P = 0; + const char* Q = 0; + if(name == "DSA-512") { P = JCE_512_PRIME_P; Q = JCE_512_PRIME_Q; } + if(name == "DSA-768") { P = JCE_768_PRIME_P; Q = JCE_768_PRIME_Q; } + if(name == "DSA-1024") { P = JCE_1024_PRIME_P; Q = JCE_1024_PRIME_Q; } - BigInt p, q, g; + BigInt p = decode(P), q = decode(Q); + BigInt g = DL_Group::make_dsa_generator(p, q); + return DL_Group(p, q, g); + } + BigInt p, g; + if(name == "IETF-768") { g = 2; p = decode(IETF_768_PRIME); } if(name == "IETF-1024") { g = 2; p = decode(IETF_1024_PRIME); } if(name == "IETF-1536") { g = 2; p = decode(IETF_1536_PRIME); } @@ -164,10 +178,8 @@ if(name == "IETF-3072") { g = 2; p = decode(IETF_3072_PRIME); } if(name == "IETF-4096") { g = 2; p = decode(IETF_4096_PRIME); } - if(p > 0 && g > 0 && !q) + if(p > 0 && g > 0) return DL_Group(p, g); - if(p > 0 && g > 0 && q > 0) - return DL_Group(p, q, g); throw Lookup_Error("DL group \"" + name + "\" not found"); } ======================================================================== --- botan/dl_param.cpp 2a49018926bb9e393705a2b7c9202af9342fae15 +++ botan/dl_param.cpp 46da7888784c4d2e733f2f014aa93644326251be @@ -1,6 +1,6 @@ /************************************************* * Discrete Logarithm Parameters Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -50,17 +50,7 @@ else generate_dsa_primes(p, q, pbits); - BigInt e = (p - 1) / q; - - for(u32bit j = 0; j != PRIME_TABLE_SIZE; j++) - { - g = power_mod(PRIMES[j], e, p); - if(g != 1) - break; - } - - if(g == 1) - throw Exception("DL_Group: Couldn't create a suitable generator"); + g = make_dsa_generator(p, q); } initialized = true; @@ -75,18 +65,8 @@ throw Invalid_Argument("DL_Group: The seed/counter given does not " "generate a DSA group"); - BigInt e = (p - 1) / q; + g = make_dsa_generator(p, q); - for(u32bit j = 0; j != PRIME_TABLE_SIZE; j++) - { - g = power_mod(PRIMES[j], e, p); - if(g != 1) - break; - } - - if(g == 1) - throw Exception("DL_Group: Couldn't create a suitable generator"); - initialized = true; } @@ -293,4 +273,24 @@ throw Decoding_Error("DL_Group: Invalid PEM label " + label); } +/************************************************* +* Create a random DSA-style generator * +*************************************************/ +BigInt DL_Group::make_dsa_generator(const BigInt& p, const BigInt& q) + { + BigInt g, e = (p - 1) / q; + + for(u32bit j = 0; j != PRIME_TABLE_SIZE; j++) + { + g = power_mod(PRIMES[j], e, p); + if(g != 1) + break; + } + + if(g == 1) + throw Exception("DL_Group: Couldn't create a suitable generator"); + + return g; + } + } ======================================================================== --- botan/dl_param.h 245ee588426a4fbee58bf4834ae9c373ffcacf32 +++ botan/dl_param.h 8b1d46bcb1a5ee06d536ef8edb244aae8196d6d9 @@ -1,6 +1,6 @@ /************************************************* * Discrete Logarithm Group Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_DL_PARM_H__ @@ -31,6 +31,8 @@ void BER_decode(DataSource&, Format); void PEM_decode(DataSource&); + static BigInt make_dsa_generator(const BigInt&, const BigInt&); + DL_Group(); DL_Group(u32bit, PrimeType = Strong); DL_Group(const MemoryRegion&, u32bit = 1024, u32bit = 0); ======================================================================== --- botan/dlies.cpp d803e4b7eb0b31f497aac7b06223e7aa28ede268 +++ botan/dlies.cpp 0c9a9eb14c241d9a974d69851be22eff0ad9ff9d @@ -1,6 +1,6 @@ /************************************************* * DLIES Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/dlies.h 8cabc3fab297e1d9ffecfd0fec371a3546dbf4f8 +++ botan/dlies.h 220cf9a63bc846e59dbe6c10b59207b25259131e @@ -1,6 +1,6 @@ /************************************************* * DLIES Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_DLIES_H__ ======================================================================== --- botan/eax.cpp 65ab636998b9d9b96d5e90209dfcbc97c0d687a7 +++ botan/eax.cpp 3d883a13778ce6be5beffd6ab42db67750c0765f @@ -1,6 +1,6 @@ /************************************************* * EAX Mode Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/eax.h d1b07e0ba2e6ce2de493b5cf387fb66464f4688a +++ botan/eax.h 5d9f4d8474c9a222fb53579cbecf4e5a46558fe5 @@ -1,6 +1,6 @@ /************************************************* * EAX Mode Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_EAX_H__ ======================================================================== --- botan/ecb.cpp a75694b9df00cbc3ee19e07f95dd42fb53e4598f +++ botan/ecb.cpp 519758ea66834c37ce4da85b634e1f54fe1e67f1 @@ -1,6 +1,6 @@ /************************************************* * ECB Mode Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/ecb.h 737e78fd8af5c8f26487aa2e6e94deef2aedbdcd +++ botan/ecb.h 43b8217ca2da247c5d3f5169e227ef0a2cd09ce5 @@ -1,6 +1,6 @@ /************************************************* * ECB Mode Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ECB_H__ ======================================================================== --- botan/eme.h 51b86440d4403db028c50548757795fe49a2192e +++ botan/eme.h 4412c54e61d8e70e2d1f42e5bb48ffb1ab1fb92a @@ -1,6 +1,6 @@ /************************************************* * EME Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_EME_H__ ======================================================================== --- botan/eme1.cpp 3c08f892e78d4b3093a3e35cb7351f2b47766e47 +++ botan/eme1.cpp 096712e2e91e96d4684e5cc447bd44ade28e349c @@ -1,6 +1,6 @@ /************************************************* * EME1 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/eme_pkcs.cpp dcc6a4ae10f3bc1d50d284cc4285fdf84bc7cad3 +++ botan/eme_pkcs.cpp 0300e9b5bff3abc77f2550e099f9079adcc27535 @@ -1,6 +1,6 @@ /************************************************* * PKCS1 EME Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/emsa.h 5e8b0377da8b2f6d7ce03df9d189498dccce53a2 +++ botan/emsa.h 8aed2c73d0d4b9b0e8dd48331d00d99475d62b17 @@ -1,6 +1,6 @@ /************************************************* * EMSA Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_EMSA_H__ ======================================================================== --- botan/emsa1.cpp cdc6b0242927da271f6488eb39502eb36eae3fa4 +++ botan/emsa1.cpp 3256c2a0d2f330e83926775165e5727a69db8c89 @@ -1,6 +1,6 @@ /************************************************* * EMSA1 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/emsa2.cpp fae5e6b530c838fccebeac5b6d419efafe0597f1 +++ botan/emsa2.cpp cc579ea8d68707008de96718e57aa45744ba7d2f @@ -1,9 +1,10 @@ /************************************************* * EMSA2 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include +#include #include namespace Botan { ======================================================================== --- botan/emsa3.cpp 747190a9e3a8802dd7aefb60b87e6935903fe844 +++ botan/emsa3.cpp 7ceb6622645006dbf646a9597260a04167bfd248 @@ -1,9 +1,10 @@ /************************************************* * EMSA3 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include +#include #include namespace Botan { @@ -55,8 +56,6 @@ EMSA3::EMSA3(const std::string& hash_name) { hash_id = pkcs_hash_id(hash_name); - if(hash_id.is_empty()) - throw Invalid_Argument("EMSA3 cannot be used with " + hash_name); hash = get_hash(hash_name); } ======================================================================== --- botan/emsa4.cpp fb48cbf028544c50bdbb6c4f3df82846a576d31f +++ botan/emsa4.cpp 0be0a60693c31c83cf2a2df0f03a4479b8444b3d @@ -1,6 +1,6 @@ /************************************************* * EMSA4 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/emsa_raw.cpp 4856d228aa6a7ea5367a91559eae933c5ca3f281 +++ botan/emsa_raw.cpp 4f061b051bf6e32e48f4e56ee2f2b9a12054e076 @@ -1,6 +1,6 @@ /************************************************* * EMSA-Raw Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/eng_base.cpp c21bf7a9a3b1e3da0f91db105a4d02d10d574e0b +++ botan/eng_base.cpp 470b429437811de062b605a3eef110f890be77c4 @@ -1,6 +1,6 @@ /************************************************* * Basic No-Op Engine Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/engine.cpp 516153822616553bed646431168c348713de1e93 +++ botan/engine.cpp f9f3e140d9d596fba3bdee49d93f3348cc02c799 @@ -1,6 +1,6 @@ /************************************************* * Engine Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/engine.h 547b4edca4ac9df32d5121c0b0b5e58d5fbba518 +++ botan/engine.h e564fba257a1af6a72dfb4e68dfa387846189ee0 @@ -1,6 +1,6 @@ /************************************************* * Engine Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ENGINE_H__ @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace Botan { ======================================================================== --- botan/enums.h 8d70f172c1b79d03cbc0d4126d1ae56555207336 +++ botan/enums.h fe74b7deb3e19aa07f2db2351381079fd4f73d80 @@ -1,6 +1,6 @@ /************************************************* * Enumerations Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ENUMS_H__ ======================================================================== --- botan/es_file.cpp 5772d21d1ff18c7d2a091c89f19351e84232611c +++ botan/es_file.cpp 6d3c2b5bd05b067cf5df1720a585e7a2fa99a166 @@ -1,6 +1,6 @@ /************************************************* * File EntropySource Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/es_file.h 83027d4b6bc201ef272309df3697e43bc846a381 +++ botan/es_file.h a375d7011922508810394364ac39a357a5a75b83 @@ -1,6 +1,6 @@ /************************************************* * File EntropySource Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ENTROPY_SRC_FILE_H__ ======================================================================== --- botan/exceptn.cpp 8f5ca9fc666267df72fccd96fc851fdcb7b123f1 +++ botan/exceptn.cpp 3cd2986ddf5c3d967a5dd20991068545a456c7c2 @@ -1,6 +1,6 @@ /************************************************* * Exceptions Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/exceptn.h 48d813b9a3ca6c896e8cd873cf2491ada522973c +++ botan/exceptn.h 0f90c643393d85de7e81ae26d6a57e0f52fad8b4 @@ -1,6 +1,6 @@ /************************************************* * Exceptions Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_EXCEPTION_H__ ======================================================================== --- botan/filter.cpp 3506db191bc2d7eaaa67e4e1666add6c3d23a19c +++ botan/filter.cpp 23a3c3907950660091292e50544a89e04e641f71 @@ -1,6 +1,6 @@ /************************************************* * Filter Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/filter.h d60e7a9d3900ba32b4e2856df6b441007d010138 +++ botan/filter.h 18e52ca7710b7762627297db5a27722b5afce3aa @@ -1,6 +1,6 @@ /************************************************* * Filter Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_FILTER_H__ ======================================================================== --- botan/filters.cpp ad14e0a2e1639d623b45a8ad63b812945297987a +++ botan/filters.cpp d8f8d8e488482d394b59ffbe7d666ab190698914 @@ -1,6 +1,6 @@ /************************************************* * Filters Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/filters.h 67ed0a521e02165d787c81efee085863b624105e +++ botan/filters.h dba4116f6d25355809ef86ea71b64a4d031029af @@ -1,6 +1,6 @@ /************************************************* * Filters Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_FILTERS_H__ ======================================================================== --- botan/fips140.cpp e6fc1426744e58b90917f77c2863627b6bfe3e95 +++ botan/fips140.cpp c1d4019e258c3b9b85fdf007083420759505ddef @@ -1,6 +1,6 @@ /************************************************* * FIPS-140 Self Tests Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/fips140.h f887fa80632ca747a142f383f8c0a9f4ce6b3f75 +++ botan/fips140.h b975066cc64ce52da09af0ba5ed907e786e426b8 @@ -1,6 +1,6 @@ /************************************************* * FIPS 140 Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_FIPS140_H__ ======================================================================== --- botan/fips_rng.cpp 305b3d093136ae275b7a5c667e3c96d860fe5efc +++ botan/fips_rng.cpp f59f382c107f935b4eb2f9c90cc179077c79da6d @@ -1,6 +1,6 @@ /************************************************* * FIPS 186-2 RNG Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/fips_rng.h 45a4189cb973451fbc27a310e9666fc66eec983d +++ botan/fips_rng.h 33d9795345f1e9a5a5ed083de4df1daf5d5cc55a @@ -1,6 +1,6 @@ /************************************************* * FIPS 186-2 RNG Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_FIPS_186_RNG_H__ ======================================================================== --- botan/fused.cpp 6fb7c8ea89ea577cf638ca0829f3161261470d8c +++ botan/fused.cpp 0e069924c640428d0145066882384e73cf767409 @@ -1,6 +1,6 @@ /************************************************* * Fused Arithmetic Operations Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/get_algo.cpp fa25847dacdd675514855ff915204e6d9ead8dfa +++ botan/get_algo.cpp 83b4c671f852dbf233ce7da7c81c1f8e63e92e46 @@ -1,6 +1,6 @@ /************************************************* * Algorithm Retrieval Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/get_enc.cpp b0e587e9e8289d9b9ad153491d81f2c81c14a3ef +++ botan/get_enc.cpp fb775372aa0d45261c2890e7ed0069c1d5c8a8a4 @@ -1,6 +1,6 @@ /************************************************* * EMSA/EME/KDF/MGF Retrieval Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -88,31 +88,21 @@ std::vector name = parse_algorithm_name(algo_spec); const std::string kdf_name = deref_alias(name[0]); - if(kdf_name == "TLS-PRF") + if(kdf_name == "KDF1") { - if(name.size() == 1) - return new TLS_PRF; + if(name.size() == 2) + return new KDF1(name[1]); } - else if(kdf_name == "SSL3-PRF") + else if(kdf_name == "KDF2") { - if(name.size() == 1) - return new SSL3_PRF; + if(name.size() == 2) + return new KDF2(name[1]); } else if(kdf_name == "X9.42-PRF") { if(name.size() == 2) return new X942_PRF(name[1]); } - else if(kdf_name == "KDF1") - { - if(name.size() == 2) - return new KDF1(name[1]); - } - else if(kdf_name == "KDF2") - { - if(name.size() == 2) - return new KDF2(name[1]); - } else throw Algorithm_Not_Found(algo_spec); ======================================================================== --- botan/get_pbe.cpp cba554a352ad0c15f4da112f89e6069a723d5de2 +++ botan/get_pbe.cpp 7701f52c0f08f0a0ee3f97d770294b1dafca7788 @@ -1,6 +1,6 @@ /************************************************* * PBE Retrieval Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -10,7 +10,7 @@ namespace Botan { /************************************************* -* Get an encrpytion PBE, set new parameters * +* Get an encryption PBE, set new parameters * *************************************************/ PBE* get_pbe(const std::string& pbe_name) { @@ -49,9 +49,9 @@ if(algo_name.size() < 1) throw Invalid_Algorithm_Name(pbe_oid.as_string()); - const std::string pbe = algo_name[0]; + const std::string pbe_algo = algo_name[0]; - if(pbe == "PBE-PKCS5v15") + if(pbe_algo == "PBE-PKCS5v15") { if(algo_name.size() != 3) throw Invalid_Algorithm_Name(pbe_oid.as_string()); @@ -61,7 +61,7 @@ pbe->decode_params(params); return pbe; } - else if(pbe == "PBE-PKCS5v20") + else if(pbe_algo == "PBE-PKCS5v20") return new PBE_PKCS5v20(params); throw Algorithm_Not_Found(pbe_oid.as_string()); ======================================================================== --- botan/hash_id.cpp 41540ab3948c994cfc3f59d5a0a42075779a33ff +++ botan/hash_id.cpp 30976df969f81420191833f90bfe0f20941a6c8f @@ -1,9 +1,9 @@ /************************************************* * Hash Function Identification Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ -#include +#include #include namespace Botan { @@ -56,6 +56,10 @@ const std::string name = deref_alias(name_or_alias); MemoryVector out; + + if(name == "Parallel(MD5,SHA-160)") + return out; + if(name == "MD2") out.set(PKCS_IDS::MD2_ID, sizeof(PKCS_IDS::MD2_ID)); else if(name == "MD5") @@ -74,7 +78,11 @@ out.set(PKCS_IDS::SHA_512_ID, sizeof(PKCS_IDS::SHA_512_ID)); else if(name == "Tiger(24,3)") out.set(PKCS_IDS::TIGER_ID, sizeof(PKCS_IDS::TIGER_ID)); - return out; + + if(out.size()) + return out; + + throw Invalid_Argument("No PKCS #1 identifier for " + name_or_alias); } /************************************************* ======================================================================== --- botan/hash_id.h +++ botan/hash_id.h 518f07b3e6f9ec8ebce5e01bcaa41d005fc509de @@ -0,0 +1,22 @@ +/************************************************* +* Hash Function Identification Header File * +* (C) 1999-2005 The Botan Project * +*************************************************/ + +#ifndef BOTAN_HASHID_H__ +#define BOTAN_HASHID_H__ + +#include +#include + +namespace Botan { + +/************************************************* +* Return the values of various defined HashIDs * +*************************************************/ +MemoryVector pkcs_hash_id(const std::string&); +byte ieee1363_hash_id(const std::string&); + +} + +#endif ======================================================================== --- botan/hex.cpp 98bbd41c4609c6b02b7af53f09b7e690c4c967be +++ botan/hex.cpp d90dd533be84454b70bd07f7639c6d2371ee9416 @@ -1,6 +1,6 @@ /************************************************* * Hex Encoder/Decoder Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/hex.h 2cfc0e0f5f5a7e368f30225714a3254a362108ed +++ botan/hex.h 2bba7745b808634f2ff705e21ad9a6d20f6be763 @@ -1,6 +1,6 @@ /************************************************* * Hex Encoder/Decoder Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_HEX_H__ ======================================================================== --- botan/hmac.cpp de1313f2eb1b0aa55b39a7b2990682c78f9c9662 +++ botan/hmac.cpp d7bc77900a2af2ba418deebbd87b30c9f3ea3811 @@ -1,6 +1,6 @@ /************************************************* * HMAC Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/hmac.h 2e2149c3036fe4f61e4959787e17d000ec01472d +++ botan/hmac.h d608aecb93bd9d0d3a9fa47443696c766e0c7a14 @@ -1,6 +1,6 @@ /************************************************* * HMAC Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_HMAC_H__ ======================================================================== --- botan/if_algo.cpp 8ba8e73da35f455f2d33c5364bb8ec50a335e1a9 +++ botan/if_algo.cpp 4ee708729d33713d47c64828d1d43c646690b4b2 @@ -1,6 +1,6 @@ /************************************************* * IF Scheme Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/if_algo.h 4d4b55bbc30d46ede166f16c49a8205772dedcfc +++ botan/if_algo.h d8597f0265745faa4743802b44de16660e326e5e @@ -1,6 +1,6 @@ /************************************************* * IF Scheme Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_IF_ALGO_H__ ======================================================================== --- botan/inifile.cpp 93c083a2c23c7fa9594cbfa8e753bba843abd805 +++ botan/inifile.cpp 28f3c77682edec2d7a2108f7437d75a96cb422a1 @@ -1,6 +1,6 @@ /************************************************* * Configuration Reader Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/init.cpp fe867ad3ec390b9dfcf9d03f9f3a92a2844fd1bf +++ botan/init.cpp 2b67a947e2133a4a9fbd93774c2a67a5d7cf5344 @@ -1,6 +1,6 @@ /************************************************* * Initialization Function Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -240,6 +240,8 @@ if(arg_set(args, "thread_safe")) set_mutex(); + startup_conf(); + startup_oids(); set_default_options(); startup_memory_subsystem(); @@ -287,6 +289,8 @@ if(total_bits < min_entropy) throw PRNG_Unseeded("Unable to collect sufficient entropy"); } + + startup_dl_cache(); } /************************************************* @@ -296,9 +300,10 @@ { shutdown_engines(); shutdown_rng_subsystem(); - set_global_rngs(0, 0); destroy_lookup_tables(); - destroy_dl_groups(); + shutdown_dl_cache(); + shutdown_conf(); + shutdown_oids(); set_timer_type(0); set_mutex_type(0); shutdown_memory_subsystem(); ======================================================================== --- botan/init.h ef58b0990e2ff7abf148e2983417b4696c69872f +++ botan/init.h cbc00892b37c81723cb8476d33a7f674fb73f79b @@ -1,6 +1,6 @@ /************************************************* * Library Initialization Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_INIT_H__ @@ -29,11 +29,19 @@ void startup_memory_subsystem(); void shutdown_memory_subsystem(); + void startup_engines(); void shutdown_engines(); +void startup_dl_cache(); +void shutdown_dl_cache(); + +void startup_oids(); +void shutdown_oids(); + +void startup_conf(); +void shutdown_conf(); void set_default_options(); -void destroy_dl_groups(); } ======================================================================== --- botan/kdf.cpp 7a1872d488218b86b88751f7925349d1771483dd +++ botan/kdf.cpp 9f9a6e9c4a779b5a8c169512ab55fd8dd5712d19 @@ -1,6 +1,6 @@ /************************************************* * KDF1/KDF2 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/kdf.h ce2bf9dca868ce3648fbd60f0c89dd41dda8eccb +++ botan/kdf.h 7d0cda0fb2a44516987c1e1508df26cf1016e355 @@ -1,6 +1,6 @@ /************************************************* * KDF Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_KDF_H__ @@ -39,29 +39,6 @@ }; /************************************************* -* SSL3 PRF * -*************************************************/ -class SSL3_PRF : public KDF - { - private: - SecureVector derive(u32bit, const byte[], u32bit, - const byte[], u32bit) const; - }; - -/************************************************* -* TLS PRF * -*************************************************/ -class TLS_PRF : public KDF - { - private: - SecureVector derive(u32bit, const byte[], u32bit, - const byte[], u32bit) const; - SecureVector P_hash(const std::string&, u32bit, - const byte[], u32bit, - const byte[], u32bit) const; - }; - -/************************************************* * X9.42 PRF * *************************************************/ class X942_PRF : public KDF ======================================================================== --- botan/keypair.cpp c2ba6d27c702e602ebc5c19401b06a63acd1e1ad +++ botan/keypair.cpp 95b67905dbc153558bdd0d8addee5eb6b1568356 @@ -1,6 +1,6 @@ /************************************************* * Keypair Checks Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/keypair.h 8f3a5a2a87301f0597153df0255d190484036790 +++ botan/keypair.h 50f23526d06bebe6b49881342da49dc2fb0a19f3 @@ -1,6 +1,6 @@ /************************************************* * Keypair Checks Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_KEYPAIR_H__ ======================================================================== --- botan/look_add.h ea5876a5bbbe2115a1b85a26f89a91a9c91f4be9 +++ botan/look_add.h 18561a6954c6011dd60b458c5affe02e73a6a0c0 @@ -1,6 +1,6 @@ /************************************************* * Lookup Table Management Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_LOOKUP_MANGEMENT_H__ ======================================================================== --- botan/look_pk.cpp 46272ca274e843f3ffbb455a781cc4206cca2551 +++ botan/look_pk.cpp 870251a124f84ba2c175753b2946377abbd2c4c9 @@ -1,6 +1,6 @@ /************************************************* * PK Algorithm Lookup Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/look_pk.h f80d5fba4ca6ae87969224851151d9dd56c68d9c +++ botan/look_pk.h b868af6a79123e844310d943647cd21b63fe5d34 @@ -1,6 +1,6 @@ /************************************************* * PK Algorithm Lookup Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PK_LOOKUP_H__ ======================================================================== --- botan/lookup.cpp b7017306350e0d5cec1bf29fa7aae5fc1476aa14 +++ botan/lookup.cpp 790c93fcff02eb4564f3e30cbb37d2b3b0b9662a @@ -1,6 +1,6 @@ /************************************************* * Algorithm Lookup Table Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/lookup.h fc8a5e763db679996fc7bbe67259b70b3fb65c72 +++ botan/lookup.h aa7bce79307989caf3699175148af3d3d3ab6481 @@ -1,6 +1,6 @@ /************************************************* * Algorithm Lookup Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_LOOKUP_H__ ======================================================================== --- botan/make_prm.cpp 38f0b945a62ef720897c2d0641ef1c30b22850cf +++ botan/make_prm.cpp 13d08902b6d25716e14e5cdef8365673f8929d3c @@ -1,6 +1,6 @@ /************************************************* * Prime Generation Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mdx_hash.cpp 60980f2b531f0ccc6d9f817a5df85dd30f36724e +++ botan/mdx_hash.cpp 70a6a226456a3eed5dea25e9ec2428984796f7fa @@ -1,6 +1,6 @@ /************************************************* * MDx Hash Function Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mdx_hash.h cf686de334af142d0a4bead6ffd6fdb6f7b61eb8 +++ botan/mdx_hash.h a38578d1f39ffd7ffea279a92e3a6d9e42f3f74c @@ -1,6 +1,6 @@ /************************************************* * MDx Hash Function Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MDX_BASE_H__ ======================================================================== --- botan/mem_ops.h f5603c43d5c102fa371bdf63e232e6006dc3cecc +++ botan/mem_ops.h 02ab0ae42b9c6bf677886935d8dfb85e447ab6ba @@ -1,6 +1,6 @@ /************************************************* * Memory Operations Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MEMORY_OPS_H__ @@ -15,7 +15,7 @@ * Memory Manipulation Functions * *************************************************/ template inline void copy_mem(T* out, const T* in, u32bit n) - { std::memmove(out, in, sizeof(T)*n); } + { if(n) std::memmove(out, in, sizeof(T)*n); } template inline void clear_mem(T* ptr, u32bit n) { std::memset(ptr, 0, sizeof(T)*n); } ======================================================================== --- botan/mem_pool.cpp 943ebcf01580253115bc2f3e1088791371a55c4d +++ botan/mem_pool.cpp e2303f64ab0a279072bdbe59313ed10842702c20 @@ -1,6 +1,6 @@ /************************************************* * Pooling Allocator Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -9,21 +9,7 @@ namespace Botan { -namespace { - /************************************************* -* Buffer Comparison Operators * -*************************************************/ -bool Buffer_Cmp(const Pooling_Allocator::Buffer& a, - const Pooling_Allocator::Buffer& b) - { return ((const byte*)a.buf < (const byte*)b.buf); } - -bool Empty_Buffer(const Pooling_Allocator::Buffer& block) - { return (block.length == 0); } - -} - -/************************************************* * Pooling_Allocator Constructor * *************************************************/ Pooling_Allocator::Pooling_Allocator(u32bit size) : @@ -50,6 +36,14 @@ } /************************************************* +* Buffer Comparison * +*************************************************/ +bool Pooling_Allocator::is_empty_buffer(const Buffer& block) + { + return (block.length == 0); + } + +/************************************************* * Allocate some initial buffers * *************************************************/ void Pooling_Allocator::init() @@ -131,11 +125,11 @@ { std::vector::iterator empty; - empty = std::find_if(list.begin(), list.end(), Empty_Buffer); + empty = std::find_if(list.begin(), list.end(), is_empty_buffer); while(empty != list.end()) { list.erase(empty); - empty = std::find_if(list.begin(), list.end(), Empty_Buffer); + empty = std::find_if(list.begin(), list.end(), is_empty_buffer); } } @@ -192,7 +186,7 @@ free_list.push_back(Buffer(ptr, n)); if(free_list.size() >= 2) std::inplace_merge(free_list.begin(), free_list.end() - 1, - free_list.end(), Buffer_Cmp); + free_list.end()); defrag_counter = (defrag_counter + 1) % RUNS_TO_DEFRAGS; if(defrag_counter == 0) @@ -250,12 +244,13 @@ { if(!ptr) return; - u32bit free_blocks = 0; + u32bit free_space = 0; for(u32bit j = 0; j != real_mem.size(); j++) - if(!real_mem[j].in_use) free_blocks++; + if(!real_mem[j].in_use) + free_space += real_mem[j].length; bool free_this_block = false; - if((free_blocks > 2 || n != PREF_SIZE) && !should_not_free()) + if(free_space > keep_free()) free_this_block = true; for(u32bit j = 0; j != real_mem.size(); j++) ======================================================================== --- botan/mem_pool.h 71b41bee14798c742c2a6977bd00764f6b31f160 +++ botan/mem_pool.h 79cc34c1b88e2ab2419e609d8c0c208a490f913e @@ -1,6 +1,6 @@ /************************************************* * Pooling Allocator Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_POOLING_ALLOCATOR_H__ @@ -19,33 +19,37 @@ class Pooling_Allocator : public Allocator { public: + void* allocate(u32bit) const; + void deallocate(void*, u32bit) const; + + void init(); + void destroy(); + + Pooling_Allocator(u32bit = 0); + ~Pooling_Allocator(); + private: class Buffer { public: void* buf; u32bit length; bool in_use; + + bool operator<(const Buffer& x) const + { return ((const byte*)buf < (const byte*)x.buf); } + Buffer() { buf = 0; length = 0; in_use = false; } Buffer(void* b, u32bit l, bool used = false) { buf = b; length = l; in_use = used; } }; - void* allocate(u32bit) const; - void deallocate(void*, u32bit) const; - - void init(); - void destroy(); - - Pooling_Allocator(u32bit = 0); - ~Pooling_Allocator(); - private: void* get_block(u32bit) const; void free_block(void*, u32bit) const; virtual void* alloc_block(u32bit) const = 0; virtual void dealloc_block(void*, u32bit) const = 0; virtual u32bit prealloc_bytes() const { return 0; } - virtual bool should_not_free() const { return false; } + virtual u32bit keep_free() const { return 64*1024; } void* alloc_hook(void*, u32bit) const; void dealloc_hook(void*, u32bit) const; @@ -59,6 +63,8 @@ bool same_buffer(Buffer&, Buffer&) const; void remove_empty_buffers(std::vector&) const; + static bool is_empty_buffer(const Buffer&); + const u32bit PREF_SIZE, ALIGN_TO; mutable std::vector real_mem, free_list; mutable Mutex* lock; ======================================================================== --- botan/mgf1.cpp fdb622c050a16e39088b0a2b5d29e03b732601ce +++ botan/mgf1.cpp 6f1bd57e1eceacffaa09086d688430f533801e75 @@ -1,6 +1,6 @@ /************************************************* * MGF1 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mgf1.h 128d53c1a67b591b96f6c4a5044da775cc4eb416 +++ botan/mgf1.h 07c9dbfb8d70d446eb0735b9e7a0109334a728e6 @@ -1,6 +1,6 @@ /************************************************* * MGF1 Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MGF1_H__ ======================================================================== --- botan/mlock.cpp 3010066a99142f353ecdc582c1a18d5bac09dd3d +++ botan/mlock.cpp d357780c56771b5779d6c0f95ff7a20ef3f81898 @@ -1,6 +1,6 @@ /************************************************* * Memory Locking Functions Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mod_exp.cpp 1149f9d2c943c0956b769ac266b0d29e9c98f188 +++ botan/mod_exp.cpp 58d392bddf6314f1450a6e890595381e4c60d875 @@ -1,6 +1,6 @@ /************************************************* * Modular Exponentiation Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mod_exp.h 18c6c30f361b8693f2f4ee33e2b2a597972564fb +++ botan/mod_exp.h c98cbd466ef7156a788de00755671f174fffa2cf @@ -1,6 +1,6 @@ /************************************************* * Modular Exponentiation Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MODULAR_EXP_H__ ======================================================================== --- botan/mode_pad.cpp fbcf81f6972834b9a58fba4bbc462feaac03d290 +++ botan/mode_pad.cpp 6e13929f903c51c67f4f9cae3f1636d15a6e94b1 @@ -1,6 +1,6 @@ /************************************************* * CBC Padding Methods Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mode_pad.h fabc318779665eefe72f430ba028ab05f12fcbe0 +++ botan/mode_pad.h d33d5fd3116799e3acc4510bbe8ec00b9ecf203a @@ -1,6 +1,6 @@ /************************************************* * CBC Padding Methods Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_CBC_PADDING_H__ ======================================================================== --- botan/modebase.cpp 441199d5d032597f222e399c80da05c0466e770d +++ botan/modebase.cpp f55df855ab15cd85c53f74fcd09019136969253c @@ -1,6 +1,6 @@ /************************************************* * Block Cipher Mode Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/modebase.h 34f3886367213a4a120d1b2bab370ecc9991b203 +++ botan/modebase.h 9c6b1c98f71e261ecd853037c2a6f2a6abf4a09f @@ -1,6 +1,6 @@ /************************************************* * Block Cipher Mode Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MODEBASE_H__ ======================================================================== --- botan/mp_comba.cpp cd4bd559010fca3e8f6decfd45ce6801771bc2cd +++ botan/mp_comba.cpp fe79003f739437691f78090af30ff3c0d08c7000 @@ -1,6 +1,6 @@ /************************************************* * Comba Multiplication Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mp_core.cpp 422451560f3daa8f8cd665dffcfd63d40edda6f3 +++ botan/mp_core.cpp c3cf34cadb010c8e432d639cd78413880f14b01f @@ -1,6 +1,6 @@ /************************************************* * MPI Addition/Subtraction Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mp_core.h 1792183f9a720f9fd33838b76eda4ae1515b2f6a +++ botan/mp_core.h 5f8d926528ccb7e579d3778bfa61c6fc2d388b43 @@ -1,6 +1,6 @@ /************************************************* * MPI Algorithms Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MP_CORE_H__ ======================================================================== --- botan/mp_fkmul.cpp 9b24a4c785d41a51a4e6326c8c3f6453c1a34fd8 +++ botan/mp_fkmul.cpp 2451d3e11ed8dfa1eaa75ed02337c0f72f1fbd0e @@ -1,6 +1,6 @@ /************************************************* * Fixed Karatsuba Multiplication Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mp_madd.h 91d7732e96d3a7e6da267164c1984091fb567180 +++ botan/mp_madd.h 8ebba5caec2b7972ad4970fc79bbf5db8f1ae970 @@ -1,6 +1,6 @@ /************************************************* * MPI Multiply-Add Core Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MP_MADD_H__ ======================================================================== --- botan/mp_misc.cpp 22d22eba1424da339cf5b710ea421035819a12ca +++ botan/mp_misc.cpp 14c95fd2efacea3ba45e7f29e71a676ef834433c @@ -1,6 +1,6 @@ /************************************************* * MP Misc Functions Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -105,7 +105,7 @@ x2 += x3 >> (MP_HWORD_BITS); x2 += x1; if(x2 < x1) - x0 += (1 << MP_HWORD_BITS); + x0 += ((word)1 << MP_HWORD_BITS); *out_high = x0 + (x2 >> MP_HWORD_BITS); *out_low = ((x2 & MP_HWORD_MASK) << MP_HWORD_BITS) + (x3 & MP_HWORD_MASK); ======================================================================== --- botan/mp_mul.cpp 6f4b0d753bc894dc0b4a0795645ae560cfc07132 +++ botan/mp_mul.cpp 1a89216eb5fb97faaa1b948ed019813cf4404d80 @@ -1,6 +1,6 @@ /************************************************* * MP Multiplication Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mp_shift.cpp 406513cc6422b5f25d4fd42240dcc6c618f7be64 +++ botan/mp_shift.cpp b0d06068404ec8818092b23bfcbdbafe0f804be6 @@ -1,6 +1,6 @@ /************************************************* * MP Shift Algorithms Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mp_smul.cpp ed5ffd208b8b7fa3dc8487fce5f16290a1ecd6f7 +++ botan/mp_smul.cpp 89a3d539993e7d617a7c9f0afff131b6e6ec95f3 @@ -1,6 +1,6 @@ /************************************************* * Simple Multiplication Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/mp_types.h 627e3b785902f58ca71f7cb2321b36f0901b090b +++ botan/mp_types.h 0883c2c34245124a245ffeb74802a6d0c866ea93 @@ -1,6 +1,6 @@ /************************************************* * Low Level MPI Types Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MPI_TYPES_H__ ======================================================================== --- botan/mutex.cpp 5e0337d3e2dbae707c2d873a299e3c403c17962d +++ botan/mutex.cpp 5178b950cb9ac2c1e726d470bd9edf1e2afb4afb @@ -1,12 +1,11 @@ /************************************************* * Mutex Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include #include #include -#include namespace Botan { @@ -38,10 +37,7 @@ void Default_Mutex::lock() { if(locked) - { - std::abort(); throw Internal_Error("Default_Mutex::lock: Mutex is already locked"); - } locked = true; } @@ -51,10 +47,7 @@ void Default_Mutex::unlock() { if(!locked) - { - std::abort(); throw Internal_Error("Default_Mutex::unlock: Mutex is already unlocked"); - } locked = false; } ======================================================================== --- botan/mutex.h edfbdfa03538e369e29e72532faa2f2e6eacc55e +++ botan/mutex.h 28413d972111f69c83901ddd9909b532008ba6f2 @@ -1,6 +1,6 @@ /************************************************* * Mutex Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MUTEX_H__ ======================================================================== --- botan/numthry.cpp 565ae305cf2ac5ca822796a7527b329403b9204b +++ botan/numthry.cpp b72c9ca258ad576c7b6a9d2664281b23d223cb05 @@ -1,6 +1,6 @@ /************************************************* * Number Theory Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -261,7 +261,7 @@ if(n <= PRIMES[PRIME_TABLE_SIZE-1]) { - const u32bit num = n.word_at(0); + const word num = n.word_at(0); for(u32bit j = 0; PRIMES[j]; j++) { if(num == PRIMES[j]) return PRIME; @@ -339,7 +339,9 @@ BigInt nonce; for(u32bit j = 0; j != tests; j++) { - nonce = (verify) ? (random_integer(NONCE_BITS, Nonce)) : (PRIMES[j]); + if(verify) nonce = random_integer(NONCE_BITS, Nonce); + else nonce = PRIMES[j]; + if(!mr.passes_test(nonce)) return false; } ======================================================================== --- botan/numthry.h 17458fbabc1602802e514147f7bcebee4414647e +++ botan/numthry.h 9e48c28c48157564d28d2db1f6637d77dd3fa022 @@ -1,6 +1,6 @@ /************************************************* * Number Theory Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_NUMBTHRY_H__ ======================================================================== --- botan/ofb.cpp 80169c91ae291656e6c4eeec82c3a399b18f09f2 +++ botan/ofb.cpp d98618ab0fd9a03e671e5f034740f3e2746a9696 @@ -1,6 +1,6 @@ /************************************************* * OFB Mode Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/ofb.h 8120445492ab6d9449b761d5005c1de676dffce6 +++ botan/ofb.h b829ab377c4d4ffd01d08317ab44af8e94b52ed4 @@ -1,6 +1,6 @@ /************************************************* * OFB Mode Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_OFB_H__ ======================================================================== --- botan/oids.cpp 1a0baccbffdd0f231320d6e554f58a177c18fce8 +++ botan/oids.cpp 2c16a47ec99aa367578e36a96ddb52e4c1315de8 @@ -1,31 +1,43 @@ /************************************************* * OID Registry Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include #include #include +#include #include namespace Botan { -namespace OIDS { +namespace { -namespace { +/************************************************* +* OID<->String Mappings * +*************************************************/ +class OID_Mapper + { + public: + void add_oid(const OID&, const std::string&); -std::map oid_to_str; -std::map str_to_oid; -Mutex* oid_mutex = 0; + bool have_oid(const std::string&); + std::string lookup(const OID&); + OID lookup(const std::string&); -} + OID_Mapper() { oid_mutex = get_mutex(); } + ~OID_Mapper() { delete oid_mutex; } + private: + std::map oid_to_str; + std::map str_to_oid; + Mutex* oid_mutex; + }; /************************************************* * Register an OID to string mapping * *************************************************/ -void add_oid(const OID& oid, const std::string& name) +void OID_Mapper::add_oid(const OID& oid, const std::string& name) { - initialize_mutex(oid_mutex); Mutex_Holder lock(oid_mutex); if(oid_to_str.find(oid) == oid_to_str.end()) @@ -37,9 +49,8 @@ /************************************************* * Do an OID to string lookup * *************************************************/ -std::string lookup(const OID& oid) +std::string OID_Mapper::lookup(const OID& oid) { - initialize_mutex(oid_mutex); Mutex_Holder lock(oid_mutex); std::map::const_iterator info = oid_to_str.find(oid); @@ -51,9 +62,8 @@ /************************************************* * Do a string to OID lookup * *************************************************/ -OID lookup(const std::string& name) +OID OID_Mapper::lookup(const std::string& name) { - initialize_mutex(oid_mutex); Mutex_Holder lock(oid_mutex); std::map::const_iterator info = str_to_oid.find(name); @@ -65,14 +75,83 @@ /************************************************* * Check to see if an OID exists in the table * *************************************************/ -bool have_oid(const std::string& name) +bool OID_Mapper::have_oid(const std::string& name) { - initialize_mutex(oid_mutex); Mutex_Holder lock(oid_mutex); return (str_to_oid.find(name) != str_to_oid.end()); } +/************************************************* +* Global OID map * +*************************************************/ +OID_Mapper* mapping = 0; + } +namespace Init { + +/************************************************* +* Startup the OID mapping system * +*************************************************/ +void startup_oids() + { + mapping = new OID_Mapper; + } + +/************************************************* +* Shutdown the OID mapping system * +*************************************************/ +void shutdown_oids() + { + delete mapping; + mapping = 0; + } + } + +namespace OIDS { + +/************************************************* +* Register an OID to string mapping * +*************************************************/ +void add_oid(const OID& oid, const std::string& name) + { + if(!mapping) + throw Internal_Error("OIDS::add_oid: Mapping not initialized"); + mapping->add_oid(oid, name); + } + +/************************************************* +* Do an OID to string lookup * +*************************************************/ +std::string lookup(const OID& oid) + { + if(!mapping) + throw Internal_Error("OIDS::lookup: Mapping not initialized"); + return mapping->lookup(oid); + } + +/************************************************* +* Do a string to OID lookup * +*************************************************/ +OID lookup(const std::string& name) + { + if(!mapping) + throw Internal_Error("OIDS::lookup: Mapping not initialized"); + return mapping->lookup(name); + } + +/************************************************* +* Check to see if an OID exists in the table * +*************************************************/ +bool have_oid(const std::string& name) + { + if(!mapping) + throw Internal_Error("OIDS::lookup: Mapping not initialized"); + return mapping->have_oid(name); + } + +} + +} ======================================================================== --- botan/oids.h 4875b136924adcd55cbb4d8ba4c0ddc784dc3d43 +++ botan/oids.h ff39689a4be354d6e3f7572d8685a35d129f9f44 @@ -1,6 +1,6 @@ /************************************************* * OID Registry Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_OIDS_H__ ======================================================================== --- botan/omac.h 999a56ae665d31f7f616b5f6e014cb76d1526f58 +++ botan/omac.h c385a6e2195757673b1aeb527fb18ebd0fc55769 @@ -1,6 +1,6 @@ /************************************************* * OMAC Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_OMAC_H__ ======================================================================== --- botan/par_hash.h d8401812eec5c2b7e4b60f77f8493a163d178fa5 +++ botan/par_hash.h db8899df56e0764c6d1c01cbecf5e8c665fad98b @@ -1,6 +1,6 @@ /************************************************* * Parallel Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PAR_HASH_H__ ======================================================================== --- botan/parse.cpp a3def2f20cd11724087c05da4dcc46a4a383b142 +++ botan/parse.cpp 0e43f72e1606149dbcc4770fa5fe6a4533119761 @@ -1,6 +1,6 @@ /************************************************* * Parsing Functions Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -218,4 +218,32 @@ return utf8; } +/************************************************* +* Parse and compute an arithmetic expression * +*************************************************/ +u32bit parse_expr(const std::string& expr) + { + const bool have_add = (expr.find('+') != std::string::npos); + const bool have_mul = (expr.find('*') != std::string::npos); + + if(have_add) + { + std::vector sub_expr = split_on(expr, '+'); + u32bit result = 0; + for(u32bit j = 0; j != sub_expr.size(); j++) + result += parse_expr(sub_expr[j]); + return result; + } + else if(have_mul) + { + std::vector sub_expr = split_on(expr, '*'); + u32bit result = 1; + for(u32bit j = 0; j != sub_expr.size(); j++) + result *= parse_expr(sub_expr[j]); + return result; + } + else + return to_u32bit(expr); + } + } ======================================================================== --- botan/pbe.h 4993ed6aa4c679740ac5a3003664c720443d44b4 +++ botan/pbe.h 06e59820482660316ca05b7039f35b3705c5acf5 @@ -1,6 +1,6 @@ /************************************************* * PBE Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PBE_H__ ======================================================================== --- botan/pbe_pkcs.h 47e6d844b94e58ac325f6de110c6565398a3c917 +++ botan/pbe_pkcs.h 3c1f0cfeb63a5ef197b4d25078183f124fec7fad @@ -1,6 +1,6 @@ /************************************************* * PKCS PBE Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PBE_PKCS_H__ @@ -53,6 +53,8 @@ void decode_params(DataSource&); OID get_oid() const; void flush_pipe(bool); + bool known_cipher(const std::string&) const; + const Cipher_Dir direction; std::string digest, cipher, cipher_algo; SecureVector salt, key, iv; ======================================================================== --- botan/pbes1.cpp 4f8d05c302729c7821e4b40a3076c3fc08c9f26b +++ botan/pbes1.cpp 6068b4f4789773bc100896d6114db18b434dd140 @@ -1,6 +1,6 @@ /************************************************* * PKCS #5 PBES1 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pbes2.cpp 68bfe2135c3a4fe2ca4eeb5c83ed61e2368f8ccf +++ botan/pbes2.cpp 3c3e6d6ea030fc44f63b8bcfdaf15ab86c7a624e @@ -1,6 +1,6 @@ /************************************************* * PKCS #5 PBES2 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -134,14 +134,12 @@ BER_Decoder algo_params = BER::get_subsequence(pbkdf2_params); BER::decode(algo_params, salt, OCTET_STRING); BER::decode(algo_params, iterations); - if(algo_params.more_items()) - BER::decode(algo_params, key_length); - else - key_length = 0; + BER::decode_optional(algo_params, key_length, INTEGER, UNIVERSAL); + algo_params.verify_end(); } else - throw Decoding_Error("PBES2: Unknown KDF algorithm " + + throw Decoding_Error("PBE-PKCS5 v2.0: Unknown KDF algorithm " + kdf_algo.oid.as_string()); cipher = OIDS::lookup(enc_algo.oid); @@ -149,8 +147,11 @@ if(cipher_spec.size() != 2) throw Decoding_Error("PBE-PKCS5 v2.0: Invalid cipher spec " + cipher); cipher_algo = deref_alias(cipher_spec[0]); - if(cipher != "DES/CBC" && cipher != "TripleDES/CBC") - throw Decoding_Error("PBES2: Don't know param format for " + cipher); + + if(!known_cipher(cipher_algo) || cipher_spec[1] != "CBC") + throw Decoding_Error("PBE-PKCS5 v2.0: Don't know param format for " + + cipher); + BER_Decoder algo_params(enc_algo.parameters); BER::decode(algo_params, iv, OCTET_STRING); @@ -158,7 +159,7 @@ key_length = max_keylength_of(cipher_algo); if(salt.size() < 8) - throw Decoding_Error("PBES2: Encoded salt is too small"); + throw Decoding_Error("PBE-PKCS5 v2.0: Encoded salt is too small"); } /************************************************* @@ -170,6 +171,18 @@ } /************************************************* +* Check if this is a known PBES2 cipher * +*************************************************/ +bool PBE_PKCS5v20::known_cipher(const std::string& cipher) const + { + if(cipher == "AES-128" || cipher == "AES-192" || cipher == "AES-256") + return true; + if(cipher == "DES" || cipher == "TripleDES") + return true; + return false; + } + +/************************************************* * PKCS#5 v2.0 PBE Constructor * *************************************************/ PBE_PKCS5v20::PBE_PKCS5v20(const std::string& d_algo, @@ -187,9 +200,10 @@ if(!have_hash(digest)) throw Algorithm_Not_Found(digest); - if((cipher_algo != "DES" && cipher_algo != "TripleDES") || - (cipher_mode != "CBC")) + if(!known_cipher(cipher_algo)) throw Invalid_Argument("PBE-PKCS5 v2.0: Invalid cipher " + cipher); + if(cipher_mode != "CBC") + throw Invalid_Argument("PBE-PKCS5 v2.0: Invalid cipher " + cipher); if(digest != "SHA-160") throw Invalid_Argument("PBE-PKCS5 v2.0: Invalid digest " + digest); } ======================================================================== --- botan/pem.cpp b72ae3b0a1a422b736f21fc5605d3b4d1591c135 +++ botan/pem.cpp eb4f3783b73f95b339fb1e3579c98ee8028b084a @@ -1,6 +1,6 @@ /************************************************* * PEM Encoding/Decoding Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pem.h bc1422cbd42a4028333a569b150f1ceda195fec4 +++ botan/pem.h be2e43f828cff05d5f0ae7b02ee81adf0f1cda8d @@ -1,6 +1,6 @@ /************************************************* * PEM Encoding/Decoding Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PEM_H__ ======================================================================== --- botan/pipe.cpp d9c837aa093bfb230cf5c9f9b3978b5bd5bdd0c7 +++ botan/pipe.cpp 8b611a67111f11d7da354d6248412ab1eb8239af @@ -1,6 +1,6 @@ /************************************************* * Pipe Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pipe.h 04cb9c849abc6a94e396870f27330ed23b262d31 +++ botan/pipe.h c1a3ae0a2ac4d5714f471298a9b978612af93a06 @@ -1,6 +1,6 @@ /************************************************* * Pipe Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PIPE_H__ ======================================================================== --- botan/pipe_io.cpp 974d2e5f91be38025de9db7f01c4fe535facc620 +++ botan/pipe_io.cpp b91a0b4c82f460a14549cbc89580dcaab1aadd47 @@ -1,6 +1,6 @@ /************************************************* * Pipe I/O Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pipe_rw.cpp 1b9c6fd0645251c17ef56a8f18c62f41fd307a8e +++ botan/pipe_rw.cpp a26836077fabc8d34bc89c1b96876391494fca1e @@ -1,6 +1,6 @@ /************************************************* * Pipe Reading/Writing Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pk_algs.cpp 0cf7a8301f09c75bdb93f055fad2f0cd0478e71f +++ botan/pk_algs.cpp 4db1878384c2944381591a79e7d615f5d638d229 @@ -1,6 +1,6 @@ /************************************************* * PK Key Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pk_algs.h 68c25007661b1503ea7431ab871bf4a674844c6d +++ botan/pk_algs.h fb2336a4e5ecb6c99ff27495ac9a2a2bda8dd965 @@ -1,6 +1,6 @@ /************************************************* * PK Key Factory Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PK_KEY_FACTORY_H__ ======================================================================== --- botan/pk_core.cpp 4c3ad70aabe63a760c189fdbfbcad946f73d9d95 +++ botan/pk_core.cpp d0e5257141362be13da44c2e83b5d5d90c8925cc @@ -1,6 +1,6 @@ /************************************************* * PK Algorithm Core Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pk_core.h b37fa3da4f807b7f45740b6110d8b4c28cea5fe1 +++ botan/pk_core.h 10477efff2a9f24a8bf0119ca6d341a190563df3 @@ -1,6 +1,6 @@ /************************************************* * PK Algorithm Core Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PK_CORE_H__ ======================================================================== --- botan/pk_filts.cpp 63d8141f6e0dd0fff341b64327846e33d35c6c00 +++ botan/pk_filts.cpp a854cd0ea434d4376b575936345ef2a049d5b047 @@ -1,6 +1,6 @@ /************************************************* * PK Filters Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pk_filts.h c33f0ad0101684ecdc19fff8126ede12124fafd4 +++ botan/pk_filts.h 0d1647a1bdf4cad2f490ddd0e4ebce0784955bcc @@ -1,6 +1,6 @@ /************************************************* * PK Filters Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PK_FILTERS_H__ ======================================================================== --- botan/pk_keys.cpp bb3f3b5fa9ffa98e4949d7f27e1af9d8efbb14cb +++ botan/pk_keys.cpp 10fcbc235a7fd98607ef6e931b97be3931fb64c9 @@ -1,6 +1,6 @@ /************************************************* * PK Key Types Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pk_keys.h fa50b78eeda21fc33442d229575c3106b74c5dff +++ botan/pk_keys.h 708654f66730aef50e3ebbeadeed4f51befec530 @@ -1,6 +1,6 @@ /************************************************* * PK Key Types Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PK_KEYS_H__ ======================================================================== --- botan/pk_ops.h d7f762f8ec5b0e52da91ae8864a063bbf94d66d1 +++ botan/pk_ops.h 3528538ab9d79c80e3f1ca31883cbb0a470451a2 @@ -1,6 +1,6 @@ /************************************************* * Public Key Operations Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PK_OPS_H__ ======================================================================== --- botan/pk_util.cpp 2c208fd991b109f7621bc7b99611aae97ae15822 +++ botan/pk_util.cpp 07159fe81e167b59fcffd638f755d4672c8c42fa @@ -1,6 +1,6 @@ /************************************************* * PK Utility Classes Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pk_util.h 874530cc97e7f4ca7edc1f540048e6d774a1aee1 +++ botan/pk_util.h f6402de5949c76a9788e261361c7317fd3b18f5b @@ -1,6 +1,6 @@ /************************************************* * PK Utility Classes Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PUBKEY_UTIL_H__ ======================================================================== --- botan/pkcs10.cpp 9dd6579c59ce03c6cbd1b11ea2a2db606e9b2206 +++ botan/pkcs10.cpp d46f70b67ddf31df4414c885a62855b56ccbc246 @@ -1,6 +1,6 @@ /************************************************* * PKCS #10 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pkcs10.h 04ea5a06ff5f73eff2964e9e50353caff8bf9a7f +++ botan/pkcs10.h 7fdfce431e83e7cf380f877e3b7c726f3d698c1f @@ -1,6 +1,6 @@ /************************************************* * PKCS #10 Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PKCS10_H__ ======================================================================== --- botan/pkcs8.cpp 7ddd271b73aac637d42007f2104781d9f64b924d +++ botan/pkcs8.cpp 6d12f636a9d038c815ba1a19ed4b5dafa2f4a052 @@ -1,6 +1,6 @@ /************************************************* * PKCS #8 Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -18,6 +18,7 @@ namespace { +/* XXX this is monotone specific XXX */ /************************************************* * Get info from an RAW_BER pkcs8 key. * * Whether it is encrypted will be determined, * ======================================================================== --- botan/pkcs8.h aa88456c2b2961b74d006b240164b7dbf576b652 +++ botan/pkcs8.h d6bc45f4d153674b5120c345ef1753b7fcbed396 @@ -1,6 +1,6 @@ /************************************************* * PKCS #8 Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PKCS8_H__ ======================================================================== --- botan/policy.cpp f61a5ad0ee7ddd9ee0fc7e64ae166021f7816051 +++ botan/policy.cpp ab5c3e85a557a472bfdbbc779a55f6deb79389c1 @@ -1,6 +1,6 @@ /************************************************* * Default Policy Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -127,6 +127,8 @@ add_oid("1.3.6.1.5.5.7.3.7", "PKIX.IPsecUser"); add_oid("1.3.6.1.5.5.7.3.8", "PKIX.TimeStamping"); add_oid("1.3.6.1.5.5.7.3.9", "PKIX.OCSPSigning"); + + add_oid("1.3.6.1.5.5.7.8.5", "PKIX.XMPPAddr"); } /************************************************* @@ -152,7 +154,7 @@ add_alias("OpenPGP.Digest.7", "HAVAL(20,5)"); add_alias("OpenPGP.Digest.8", "SHA-256"); - add_alias("TLS.Digest.0", "Parallel(MD5,SHA-1)"); + add_alias("TLS.Digest.0", "Parallel(MD5,SHA-160)"); add_alias("EME-PKCS1-v1_5", "PKCS1v15"); add_alias("OAEP-MGF1", "EME1"); ======================================================================== --- botan/pow_mod.cpp 59ae9d116647e81fbb6de8f911823034015f16c6 +++ botan/pow_mod.cpp d329aa0377ba3cb1b4249c155cacadb76cc0a43f @@ -1,6 +1,6 @@ /************************************************* * Modular Exponentiation Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/prf_x942.cpp 7b218685f195886dae2ee986c2f55bfdc03fc899 +++ botan/prf_x942.cpp 2e82d09acdab42e88e3dc6cf9fe3b8b545e6d1c2 @@ -1,6 +1,6 @@ /************************************************* * X9.42 PRF Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/primes.cpp 8c5513f27be0fdb55ffbe22bb3429a4cd582ae4e +++ botan/primes.cpp 6ece0b544fbb2d23c817999b4211dbd5c22cc092 @@ -1,6 +1,6 @@ /************************************************* * Small Primes Table * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pubkey.cpp dbaf12a2c0e0be641f8d85e9af2c049eb25933cc +++ botan/pubkey.cpp a79e182ed1aabf231ff5fd910240fd9e2fc517c3 @@ -1,6 +1,6 @@ /************************************************* * Public Key Base Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/pubkey.h 91491173f8aa0f79394f66791b2f73e1db044e0c +++ botan/pubkey.h eb5a007ee85161d484036b2325def6afa731be7c @@ -1,6 +1,6 @@ /************************************************* * Public Key Interface Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_PUBKEY_H__ ======================================================================== --- botan/randpool.cpp 77d0870820eb8ff049b1c5510f22944d31572331 +++ botan/randpool.cpp 5d45a17b8b6f6311a3dd39fa0e1e8825164d8204 @@ -1,6 +1,6 @@ /************************************************* * Randpool Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -89,7 +89,7 @@ length -= added; data += added; } - generate(system_clock()); + generate(system_time()); mix_pool(); } ======================================================================== --- botan/randpool.h e485e25942f8e026a1b4c5d309eafba4e58143ae +++ botan/randpool.h 8c3837ac3ca62bdbf5e584ca350aee650df6dd56 @@ -1,6 +1,6 @@ /************************************************* * Randpool Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_RANDPOOL_H__ ======================================================================== --- botan/reducer.cpp ac3ca2c65a244603aa74a72375350d2666605658 +++ botan/reducer.cpp feddcce261ed731795367445fcf5f316ae598f96 @@ -1,6 +1,6 @@ /************************************************* * Modular Reducer Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/reducer.h 782a5a9da892b8ef50c0acd50a7e2f35dc56200b +++ botan/reducer.h 3f84481f5c8f523e7d2e2aee651aac211d88b16e @@ -1,6 +1,6 @@ /************************************************* * Modular Reducer Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_MODARITH_H__ ======================================================================== --- botan/rng.cpp 61a3c6a4ce80ac0b893ac682e6f3adc26f8468b6 +++ botan/rng.cpp a87b1336b2275f4083f991b28ec602681eb17e1b @@ -1,6 +1,6 @@ /************************************************* * Global RNG Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -17,59 +17,86 @@ /************************************************* * Global RNG/EntropySource state * *************************************************/ -RandomNumberGenerator* global_rng = 0; -RandomNumberGenerator* nonce_rng = 0; -std::vector sources; -Mutex* global_rng_lock = 0; -Mutex* sources_lock = 0; +class RNG_State + { + public: + void set_rngs(RandomNumberGenerator*, RandomNumberGenerator*); + void add_es(EntropySource*, bool); + void add_entropy(const byte[], u32bit); + u32bit poll_es(EntropySource*, bool); + u32bit seed(bool, u32bit); + + void randomize(byte[], u32bit, RNG_Quality); + + RNG_State(); + ~RNG_State(); + private: + void seed_nonce_rng(); + RandomNumberGenerator* global_rng; + RandomNumberGenerator* nonce_rng; + Mutex* rng_mutex; + Mutex* sources_mutex; + std::vector sources; + }; + /************************************************* -* Try to do a poll on an EntropySource * +* Create the RNG state * *************************************************/ -u32bit poll_es(EntropySource* source, bool slow_poll) +RNG_State::RNG_State() { - SecureVector buffer(256); - u32bit got = 0; + global_rng = nonce_rng = 0; + rng_mutex = get_mutex(); + sources_mutex = get_mutex(); + } - if(slow_poll) got = source->slow_poll(buffer.begin(), buffer.size()); - else got = source->fast_poll(buffer.begin(), buffer.size()); +/************************************************* +* Destroy the RNG state * +*************************************************/ +RNG_State::~RNG_State() + { + delete global_rng; + delete nonce_rng; + for(u32bit j = 0; j != sources.size(); j++) + delete sources[j]; - Global_RNG::add_entropy(buffer.begin(), got); - return entropy_estimate(buffer.begin(), got); + delete rng_mutex; + delete sources_mutex; } /************************************************* -* Seed the nonce RNG * +* Set the RNG algorithms * *************************************************/ -void seed_nonce_rng() +void RNG_State::set_rngs(RandomNumberGenerator* rng1, + RandomNumberGenerator* rng2) { - if(!global_rng->is_seeded()) - return; + if(rng1) + { + if(global_rng) + delete global_rng; + global_rng = rng1; + } - while(!nonce_rng->is_seeded()) + if(rng2) { - SecureVector entropy(64); - global_rng->randomize(entropy.begin(), entropy.size()); - nonce_rng->add_entropy(entropy.begin(), entropy.size()); + if(nonce_rng) + delete nonce_rng; + nonce_rng = rng2; } } -} - -namespace Global_RNG { - /************************************************* * Get entropy from the global RNG * *************************************************/ -void randomize(byte output[], u32bit size, RNG_Quality level) +void RNG_State::randomize(byte output[], u32bit size, RNG_Quality level) { const std::string LTERM_CIPHER = "WiderWake4+1"; + Mutex_Holder lock(rng_mutex); + if(!global_rng || !nonce_rng) throw Invalid_State("Global_RNG::randomize: The global RNG is unset"); - Mutex_Holder lock(global_rng_lock); - if(level == Nonce) nonce_rng->randomize(output, size); else if(level == SessionKey) @@ -91,8 +118,104 @@ } /************************************************* +* Add entropy to the RNG * +*************************************************/ +void RNG_State::add_entropy(const byte buf[], u32bit length) + { + Mutex_Holder lock(rng_mutex); + + if(!global_rng || !nonce_rng) + throw Invalid_State("Global_RNG::add_entropy: The global RNG is unset"); + + global_rng->add_entropy(buf, length); + seed_nonce_rng(); + } + +/************************************************* +* Add an EntropySource to the list * +*************************************************/ +void RNG_State::add_es(EntropySource* src, bool last) + { + Mutex_Holder lock(sources_mutex); + if(last) + sources.push_back(src); + else + sources.insert(sources.begin(), src); + } + +/************************************************* +* Seed the nonce RNG * +*************************************************/ +void RNG_State::seed_nonce_rng() + { + if(!global_rng->is_seeded()) + return; + + for(u32bit j = 0; j != 3; j++) + { + if(nonce_rng->is_seeded()) + break; + + SecureVector entropy(64); + global_rng->randomize(entropy.begin(), entropy.size()); + nonce_rng->add_entropy(entropy.begin(), entropy.size()); + } + } + +/************************************************* +* Try to do a poll on an EntropySource * +*************************************************/ +u32bit RNG_State::poll_es(EntropySource* source, bool slow_poll) + { + SecureVector buffer(256); + u32bit got = 0; + + if(slow_poll) got = source->slow_poll(buffer.begin(), buffer.size()); + else got = source->fast_poll(buffer.begin(), buffer.size()); + + add_entropy(buffer.begin(), got); + return entropy_estimate(buffer.begin(), got); + } + +/************************************************* +* Attempt to seed the RNGs * +*************************************************/ +u32bit RNG_State::seed(bool slow_poll, u32bit bits_to_get) + { + Mutex_Holder lock(sources_mutex); + + u32bit bits = 0; + for(u32bit j = 0; j != sources.size(); j++) + { + bits += poll_es(sources[j], slow_poll); + if(bits_to_get && bits >= bits_to_get) + return bits; + } + return bits; + } + +/************************************************* +* The global RNG state * +*************************************************/ +RNG_State* rng_state = 0; + +} + +namespace Global_RNG { + +/************************************************* * Get entropy from the global RNG * *************************************************/ +void randomize(byte output[], u32bit size, RNG_Quality level) + { + if(!rng_state) + throw Internal_Error("Global_RNG::randomize: RNG state never created"); + rng_state->randomize(output, size, level); + } + +/************************************************* +* Get entropy from the global RNG * +*************************************************/ byte random(RNG_Quality level) { byte ret = 0; @@ -105,12 +228,9 @@ *************************************************/ void add_entropy(const byte entropy[], u32bit size) { - if(!global_rng || !nonce_rng) - throw Invalid_State("Global_RNG::add_entropy: The global RNG is unset"); - - Mutex_Holder lock(global_rng_lock); - global_rng->add_entropy(entropy, size); - seed_nonce_rng(); + if(!rng_state) + throw Internal_Error("Global_RNG::add_entropy: RNG state never created"); + rng_state->add_entropy(entropy, size); } /************************************************* @@ -118,12 +238,9 @@ *************************************************/ void add_entropy(EntropySource& src, bool slow_poll) { - if(!global_rng || !nonce_rng) - throw Invalid_State("Global_RNG::add_entropy: The global RNG is unset"); - - Mutex_Holder lock(global_rng_lock); - global_rng->add_entropy(src, slow_poll); - seed_nonce_rng(); + if(!rng_state) + throw Internal_Error("Global_RNG::poll_es: RNG state never created"); + rng_state->poll_es(&src, slow_poll); } /************************************************* @@ -131,11 +248,9 @@ *************************************************/ void add_es(EntropySource* src, bool last) { - Mutex_Holder lock(sources_lock); - if(last) - sources.push_back(src); - else - sources.insert(sources.begin(), src); + if(!rng_state) + throw Internal_Error("Global_RNG::add_es: RNG state never created"); + rng_state->add_es(src, last); } /************************************************* @@ -143,14 +258,9 @@ *************************************************/ u32bit seed(bool slow_poll, u32bit bits_to_get) { - u32bit bits = 0; - for(u32bit j = 0; j != sources.size(); j++) - { - bits += poll_es(sources[j], slow_poll); - if(bits_to_get && bits >= bits_to_get) - return bits; - } - return bits; + if(!rng_state) + throw Internal_Error("Global_RNG::seed: RNG state never created"); + return rng_state->seed(slow_poll, bits_to_get); } } @@ -162,8 +272,7 @@ *************************************************/ void init_rng_subsystem() { - global_rng_lock = get_mutex(); - sources_lock = get_mutex(); + rng_state = new RNG_State; } /************************************************* @@ -171,17 +280,8 @@ *************************************************/ void shutdown_rng_subsystem() { - if(sources_lock && sources.size()) - { - Mutex_Holder lock(sources_lock); - for(u32bit j = 0; j != sources.size(); j++) - delete sources[j]; - sources.clear(); - } - delete sources_lock; - sources_lock = 0; - delete global_rng_lock; - global_rng_lock = 0; + delete rng_state; + rng_state = 0; } /************************************************* @@ -189,13 +289,9 @@ *************************************************/ void set_global_rngs(RandomNumberGenerator* rng1, RandomNumberGenerator* rng2) { - if(global_rng) - delete global_rng; - if(nonce_rng) - delete nonce_rng; - - global_rng = rng1; - nonce_rng = rng2; + if(!rng_state) + throw Internal_Error("Global_RNG::seed: RNG state never created"); + rng_state->set_rngs(rng1, rng2); } } ======================================================================== --- botan/rng.h ca1a9f356c4e746ef2597ac401325ac746a86221 +++ botan/rng.h 23a42a4209ff8c1050f7d12d8b6e75696f549067 @@ -1,6 +1,6 @@ /************************************************* * Global RNG Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_GLOBAL_RNG_H__ ======================================================================== --- botan/rsa.cpp 53430bdf7157f135af0e74098840e8e75b75a479 +++ botan/rsa.cpp 93dedfdfc017f5c2dbb93d548003101f580761d4 @@ -1,6 +1,6 @@ /************************************************* * RSA Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/rsa.h 2e6a072ffe722bb6bd472f6b447d20501bcc3cee +++ botan/rsa.h f30ab1f3965b3f7f93c32a1acee311079c780d1a @@ -1,6 +1,6 @@ /************************************************* * RSA Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_RSA_H__ ======================================================================== --- botan/s2k.cpp c9392e2e13421cdbfef0ccab45dc59e9f155c013 +++ botan/s2k.cpp ccfb48a2afc91995ebef9d2ddd413ee635db7327 @@ -1,6 +1,6 @@ /************************************************* * S2K Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/s2k.h 68a6ccdce0fede7384124e12fcb442898492a9bf +++ botan/s2k.h d7098ee5352337e1cad8416f9f36d07a8ac81d17 @@ -1,6 +1,6 @@ /************************************************* * S2K Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_S2K_H__ ======================================================================== --- botan/secalloc.h b310dff174a674d820a6b76b30e7666f05ff8b64 +++ botan/secalloc.h 49f0e22d1760535fd353a53ee097f0fd5d72b52a @@ -1,6 +1,6 @@ /************************************************* * Memory Allocator Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ALLOCATOR_H__ ======================================================================== --- botan/secmem.h 29935c5b1dc179460e8286f21746322db2ff05bb +++ botan/secmem.h 2aa44f66962bab3f1bba1cc32cc1b4de51e192aa @@ -1,6 +1,6 @@ /************************************************* * Secure Memory Buffers Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_SECURE_MEMORY_BUFFERS_H__ ======================================================================== --- botan/secqueue.cpp 5037fd475d246948677e44e2236e800b7c115f92 +++ botan/secqueue.cpp 47286a3fe1c00e49d0320be854bbef8f16e5df15 @@ -1,6 +1,6 @@ /************************************************* * SecureQueue Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/secqueue.h 106ee36176db91e6152a5b5276980b44aa09b0f1 +++ botan/secqueue.h 88829bd53deeb58ef405f2a51367f0258723fd28 @@ -1,6 +1,6 @@ /************************************************* * SecureQueue Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_SECURE_QUEUE_H__ ======================================================================== --- botan/socket.h e8849706085cdea44dc8ff3009a2a966965b4b56 +++ botan/socket.h 791b0f5d68be7da7d8faa38808a52d1aac5146f0 @@ -1,6 +1,6 @@ /************************************************* * Socket Interface Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_SOCKET_H__ ======================================================================== --- botan/symkey.cpp 074224d0aa4368c8291071f47dffe45cb3558206 +++ botan/symkey.cpp 9a1dbc137d57bd32958639b12e0c151d4b9e6f86 @@ -1,6 +1,6 @@ /************************************************* * OctetString Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/symkey.h f33355c7fd13e785fc6f94b21fc0534a4f15b77d +++ botan/symkey.h ae5be2affed3758d5383cd96c60d5643235b2be6 @@ -1,6 +1,6 @@ /************************************************* * OctetString Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_SYMKEY_H__ ======================================================================== --- botan/timers.cpp feff979b666a34d14788555eedf270b7060e592f +++ botan/timers.cpp 988a7b75cf3464c0176894cddc741fb271e48a16 @@ -1,6 +1,6 @@ /************************************************* * Timestamp Functions Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/timers.h 29ede2e248a818cc5b17b7688a94221259ce38a9 +++ botan/timers.h 7faf9a0353f4d8fe1c11b15bcf76a6db4e34860b @@ -1,6 +1,6 @@ /************************************************* * Timestamp Functions Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_TIMERS_H__ ======================================================================== --- botan/types.h 93238b7a0ee25051c6ddc0ee1a61fcd734978899 +++ botan/types.h be7494e11341bccc6fa12fe984b2a892f88a8532 @@ -1,6 +1,6 @@ /************************************************* * Low Level Types Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_TYPES_H__ ======================================================================== --- botan/ui.cpp 54e27258cd81e065af6b57f9a0acf171ff760760 +++ botan/ui.cpp d5b192eb455808424d41a1e7112d7cb11c5cbe7f @@ -1,6 +1,6 @@ /************************************************* * User Interface Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/ui.h 9455f4dce960f0f2b2a05e3e92cc9ba136d31e6e +++ botan/ui.h a749e0f49028256cd9a159c54c56db95a8a6e66e @@ -1,6 +1,6 @@ /************************************************* * User Interface Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_UI_H__ ======================================================================== --- botan/util.cpp 6a85e690a9d0de8c77fd7c9006a3fcabc5f3c097 +++ botan/util.cpp bffaf59d7153d3f2f8b5482031a10a4b68a2d00e @@ -1,6 +1,6 @@ /************************************************* * Utility Functions Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -248,63 +248,6 @@ } /************************************************* -* Check if a character represents a digit * -*************************************************/ -bool is_digit(char c) - { - if(c == '0' || c == '1' || c == '2' || c == '3' || c == '4' || - c == '5' || c == '6' || c == '7' || c == '8' || c == '9') - return true; - return false; - } - -/************************************************* -* Check if a character represents whitespace * -*************************************************/ -bool is_space(char c) - { - if(c == ' ' || c == '\t' || c == '\n' || c == '\r') - return true; - return false; - } - -/************************************************* -* Convert a character to a digit * -*************************************************/ -byte char2digit(char c) - { - if(c == '0') return 0; - if(c == '1') return 1; - if(c == '2') return 2; - if(c == '3') return 3; - if(c == '4') return 4; - if(c == '5') return 5; - if(c == '6') return 6; - if(c == '7') return 7; - if(c == '8') return 8; - if(c == '9') return 9; - throw Invalid_Argument("char2digit: Invalid decimal char " + c); - } - -/************************************************* -* Convert a digit to a character * -*************************************************/ -char digit2char(byte b) - { - if(b == 0) return '0'; - if(b == 1) return '1'; - if(b == 2) return '2'; - if(b == 3) return '3'; - if(b == 4) return '4'; - if(b == 5) return '5'; - if(b == 6) return '6'; - if(b == 7) return '7'; - if(b == 8) return '8'; - if(b == 9) return '9'; - throw Invalid_Argument("digit2char: Input is not a digit"); - } - -/************************************************* * Estimate the entropy of the buffer * *************************************************/ u32bit entropy_estimate(const byte buffer[], u32bit length) ======================================================================== --- botan/util.h c98b09d26267303db39c6930316ec4bfaa577af2 +++ botan/util.h f79616d4efd20a9b88d57cdc3f536bc389e4b12f @@ -1,6 +1,6 @@ /************************************************* * Utility Functions Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_UTIL_H__ @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -88,6 +89,7 @@ std::vector split_on(const std::string&, char); std::vector parse_asn1_oid(const std::string&); bool x500_name_cmp(const std::string&, const std::string&); +u32bit parse_expr(const std::string&); /************************************************* * Misc Utility Functions * @@ -113,28 +115,6 @@ std::string to_string(u64bit, u32bit = 0); u32bit to_u32bit(const std::string&); -/************************************************* -* Character Set Handling * -*************************************************/ -bool is_digit(char); -bool is_space(char); -char to_lower(char); - -byte char2digit(char); -char digit2char(byte); - -std::string local2iso(const std::string&); -std::string iso2local(const std::string&); - -std::string utf2iso(const std::string&); -std::string iso2utf(const std::string&); - -/************************************************* -* Return the values of various defined HashIDs * -*************************************************/ -MemoryVector pkcs_hash_id(const std::string&); -byte ieee1363_hash_id(const std::string&); - } #endif ======================================================================== --- botan/version.h 0384ce49a78d1f67268676f1b3544a8003fbe283 +++ botan/version.h e73ea207b4bcd5f6bb75baff61666b274b205cb9 @@ -1,6 +1,6 @@ /************************************************* * Version Information Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_VERSION_H__ ======================================================================== --- botan/x509_ca.cpp 8b3275ed1718d77b664a4dac69f9e8df5f25a07e +++ botan/x509_ca.cpp 9f52746349237842fd87650177ec418ab196abb3 @@ -1,6 +1,6 @@ /************************************************* * X.509 Certificate Authority Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace Botan { @@ -250,26 +250,26 @@ if(store.add_crl(crl) != VERIFIED) throw Invalid_Argument("X509_CA::update_crl: Invalid CRL provided"); - std::map, bool> removed_from_crl; + std::set > removed_from_crl; for(u32bit j = 0; j != new_revoked.size(); j++) { if(new_revoked[j].reason == DELETE_CRL_ENTRY) - removed_from_crl[new_revoked[j].serial] = true; + removed_from_crl.insert(new_revoked[j].serial); else all_revoked.push_back(new_revoked[j]); } for(u32bit j = 0; j != already_revoked.size(); j++) { - std::map, bool>::const_iterator i; + std::set >::const_iterator i; i = removed_from_crl.find(already_revoked[j].serial); if(i == removed_from_crl.end()) all_revoked.push_back(already_revoked[j]); } + std::sort(all_revoked.begin(), all_revoked.end()); std::vector cert_list; - std::sort(all_revoked.begin(), all_revoked.end()); std::unique_copy(all_revoked.begin(), all_revoked.end(), std::back_inserter(cert_list)); ======================================================================== --- botan/x509_ca.h cacda562e7cb5db8e3bc6bb03cb60a30850f9711 +++ botan/x509_ca.h 8078cf9f2328251a13a938c506447d103a4df5c4 @@ -1,6 +1,6 @@ /************************************************* * X.509 Certificate Authority Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_X509_CA_H__ ======================================================================== --- botan/x509_crl.cpp c9aa820103b53c0d8a55aa949fdf8a02e1e8077f +++ botan/x509_crl.cpp f6d30db8bc65b12ed646fe5418bf14d058a01257 @@ -1,6 +1,6 @@ /************************************************* * X.509 CRL Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/x509_crl.h 17dff45daf11dde3f216958689b06845ed172a4b +++ botan/x509_crl.h 3976dc632eea02244c6cc1e98b6f50b04c0aaf62 @@ -1,6 +1,6 @@ /************************************************* * X.509 CRL Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_X509_CRL_H__ ======================================================================== --- botan/x509_key.cpp f47cf89e09ff326de8136ce3e03f7114eaad2088 +++ botan/x509_key.cpp 7b5056172f3f94a53935a8582b4bc42f69bdc036 @@ -1,6 +1,6 @@ /************************************************* * X.509 Public Key Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/x509_key.h 3acac47396c685c507c8a049f0a583dbed5d0a74 +++ botan/x509_key.h 1bc439ee441be814c600aa25263bc3a1e9a0f519 @@ -1,6 +1,6 @@ /************************************************* * X.509 Public Key Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_X509_PUBLIC_KEY_H__ ======================================================================== --- botan/x509_obj.cpp 18ea0c22c805e2dc52d92b86a788c1430ffca24d +++ botan/x509_obj.cpp 1d6e176d66362ef556dcdca527924776db81c427 @@ -1,6 +1,6 @@ /************************************************* * X.509 SIGNED Object Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/x509_obj.h 990f87e55fc16c14e143ba9061180486240646ba +++ botan/x509_obj.h 2fa126c9ed1f9229d5a704c55757c48edb7d0d07 @@ -1,6 +1,6 @@ /************************************************* * X.509 SIGNED Object Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_X509_OBJECT_H__ ======================================================================== --- botan/x509cert.cpp 2754555bc83253250a1168e7067d288dac9c1905 +++ botan/x509cert.cpp 9554fb9bca448dc6ee6236ba3841f67728c857e8 @@ -1,6 +1,6 @@ /************************************************* * X.509 Certificates Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -43,6 +43,12 @@ for(rdn_iter j = attr.begin(); j != attr.end(); j++) multimap_insert(names, j->first, j->second); + + typedef std::multimap::const_iterator on_iter; + std::multimap othernames = alt_info.get_othernames(); + for(on_iter j = othernames.begin(); j != othernames.end(); j++) + multimap_insert(names, OIDS::lookup(j->first), j->second.value()); + } /************************************************* @@ -56,9 +62,16 @@ const std::string what = X509_DN::deref_info_field(info); std::pair range = names.equal_range(what); + std::vector results; + for(rdn_iter j = range.first; j != range.second; j++) + { + if(std::find(results.begin(), results.end(), j->second) == results.end()) + results.push_back(j->second); + } + std::string value; - for(rdn_iter j = range.first; j != range.second; j++) - value += j->second + '/'; + for(u32bit j = 0; j != results.size(); j++) + value += results[j] + '/'; if(value.size()) value.erase(value.size() - 1, 1); return value; ======================================================================== --- botan/x509cert.h 3799c01700dffeef0a6d241c656e67f3a4af8dd4 +++ botan/x509cert.h 373ec84916c1d04b14060e7591d35c8a0c95b7ca @@ -1,6 +1,6 @@ /************************************************* * X.509 Certificates Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_X509_CERTS_H__ ======================================================================== --- botan/x509find.cpp fa00cdf310b5642aa8896c693b92db77a66defb9 +++ botan/x509find.cpp 4424040676ed96bf27580bff45226299060557e9 @@ -1,6 +1,6 @@ /************************************************* * X.509 Certificate Store Searching Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/x509opt.cpp fba4119a768cdc2f109f87be143a6fe45fbfc914 +++ botan/x509opt.cpp 8cc80bac5a3867975b45f3e390a09eb9b72adf0d @@ -1,6 +1,6 @@ /************************************************* * X.509 Certificate Options Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/x509self.cpp 41060ba068e0afb39c729c5b43955d0f8a0bcef9 +++ botan/x509self.cpp 094994e2e470e89abf1975f722f6bfa539063e96 @@ -1,6 +1,6 @@ /************************************************* * X.509 Certificate Authority Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -49,6 +49,8 @@ subject_dn.add_attribute("X520.OrganizationalUnit", opts.org_unit); subject_dn.add_attribute("X520.SerialNumber", opts.serial_number); subject_alt = AlternativeName(opts.email, opts.uri, opts.dns); + subject_alt.add_othername(OIDS::lookup("PKIX.XMPPAddr"), + opts.xmpp, UTF8_STRING); } /************************************************* ======================================================================== --- botan/x509self.h 395ce349b2550df1a44e5a4eb6cf3e98e35a7125 +++ botan/x509self.h 9e92e9d4c47782f41374b1e4829f65cb51b4dd8e @@ -1,6 +1,6 @@ /************************************************* * X.509 Self-Signed Certificate Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_X509_SELF_H__ @@ -26,9 +26,7 @@ std::string state; std::string serial_number; - std::string email; - std::string uri; - std::string dns; + std::string email, uri, dns, xmpp; std::string challenge; ======================================================================== --- botan/x509stor.cpp 1d4f8428283468c42c16e6dcccd4cd7fc87c9533 +++ botan/x509stor.cpp ab702468d4cd4cdfbe36adcaf37b0782ac4f643a @@ -1,6 +1,6 @@ /************************************************* * X.509 Certificate Store Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include @@ -257,8 +257,8 @@ if(got.size() == 0) continue; - for(u32bit j = 0; j != got.size(); j++) - add_cert(got[j]); + for(u32bit k = 0; k != got.size(); k++) + add_cert(got[k]); return find_cert(issuer_dn, auth_key_id); } } ======================================================================== --- botan/x509stor.h 317580b669aabc7ea56d0fa1e68e7d51a0d6e58c +++ botan/x509stor.h a78774e7bde040bb909220fef6c9e5536540788d @@ -1,6 +1,6 @@ /************************************************* * X.509 Certificate Store Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_X509_CERT_STORE_H__ ======================================================================== --- botan/x917_rng.cpp 1025931766017ebe0ad8ebcd50d8a4649f358b14 +++ botan/x917_rng.cpp b1f28ea6de070326b1cc69ee01ffa6aefe57be2e @@ -1,6 +1,6 @@ /************************************************* * ANSI X9.17 RNG Source File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #include ======================================================================== --- botan/x917_rng.h cb25b08a536563d9e5341db6f181530bd79a867a +++ botan/x917_rng.h 04ab9985fbd607ccfb2ab2d7a783c3d8af0290d7 @@ -1,6 +1,6 @@ /************************************************* * ANSI X9.17 RNG Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ANSI_X917_RNG_H__ ======================================================================== --- botan/x919_mac.h 1705fe887e86ebfdade77bbb4486878f72cbfbc5 +++ botan/x919_mac.h 7687240f8465f0ad5f51fb74fc246c4851f9fad6 @@ -1,6 +1,6 @@ /************************************************* * ANSI X9.19 MAC Header File * -* (C) 1999-2004 The Botan Project * +* (C) 1999-2005 The Botan Project * *************************************************/ #ifndef BOTAN_ANSI_X919_MAC_H__ ======================================================================== --- commands.cc 55800638c9bd2da0aa48ab46d06beba1d5845c32 +++ commands.cc 61185ae5cc7cd776c25ca1655199a314bdd40378 @@ -2214,7 +2214,7 @@ CMD(commit, N_("working copy"), N_("[PATH]..."), N_("commit working copy to database"), - OPT_BRANCH_NAME % OPT_MESSAGE % OPT_MSGFILE % OPT_DATE % OPT_AUTHOR % OPT_DEPTH) + OPT_BRANCH_NAME % OPT_MESSAGE % OPT_MSGFILE % OPT_DATE % OPT_AUTHOR % OPT_DEPTH % OPT_EXCLUDE) { string log_message(""); revision_set rs; @@ -2418,7 +2418,9 @@ decode_base64(i->inner().value, vtmp); certs.insert(make_pair(i->inner().name, vtmp)); } - app.lua.hook_note_commit(rid, certs); + revision_data rdat; + app.db.get_revision(rid, rdat); + app.lua.hook_note_commit(rid, rdat, certs); } } @@ -3302,7 +3304,7 @@ CMD(revert, N_("working copy"), N_("[PATH]..."), - N_("revert file(s), dir(s) or entire working copy"), OPT_DEPTH) + N_("revert file(s), dir(s) or entire working copy"), OPT_DEPTH % OPT_EXCLUDE) { manifest_map m_old; revision_id old_revision_id; ======================================================================== --- contrib/ciabot_monotone_hookversion.py +++ contrib/ciabot_monotone_hookversion.py 3fc87a62b0d4ed9900f6735ebef812fc9948bc93 @@ -0,0 +1,149 @@ +#!/usr/bin/env python +# +# Copyright (C) Nathaniel Smith +# Timothy Brownawell +# Licensed under the MIT license: +# http://www.opensource.org/licenses/mit-license.html +# I.e., do what you like, but keep copyright and there's NO WARRANTY. +# +# CIA bot client script for Monotone repositories, written in python. This +# generates commit messages using CIA's XML commit format, and can deliver +# them using either XML-RPC or email. Based on the script 'ciabot_svn.py' by +# Micah Dowty . + +# This version is modified to be called by a server hook, instead of a cron job. + +# To use: +# -- make a copy of it somewhere +# -- edit the configuration values below +# -- put the following in the server's monotonerc: +# function note_netsync_revision_received(rid, rdat, certs) +# local branch, author, changelog +# for i, cert in pairs(certs) +# do +# if (cert.name == "branch") then +# branch = cert.value +# end +# if (cert.name == "author") then +# author = cert.value +# end +# if (cert.name == "changelog") then +# changelog = cert.value +# end +# end +# local exe = "/path/to/this/script" +# spawn(exe, rid, branch, author, changelog, rdat) +# return +# end + +class config: + def project_for_branch(self, branchname): + # Customize this to return your project name(s). If changes to the + # given branch are uninteresting -- i.e., changes to them should be + # ignored entirely -- then return the python constant None (which is + # distinct from the string "None", a valid but poor project name!). + #if branchname.startswith("net.venge.monotone-viz"): + # return "monotone-viz" + #elif branchname.startswith("net.venge.monotone.contrib.monotree"): + # return "monotree" + #else: + # return "monotone" + return "FIXME" + + # The server to deliver XML-RPC messages to, if using XML-RPC delivery. + xmlrpc_server = "http://cia.navi.cx" + + # The email address to deliver messages to, if using email delivery. + smtp_address = "address@hidden" + + # The SMTP server to connect to, if using email delivery. + smtp_server = "localhost" + + # The 'from' address to put on email, if using email delivery. + from_address = "address@hidden" + + # Set to one of "xmlrpc", "email", "debug". + delivery = "debug" + +################################################################################ + +import sys + +def escape_for_xml(text, is_attrib=0): + text = text.replace("&", "&") + text = text.replace("<", "<") + text = text.replace(">", ">") + if is_attrib: + text = text.replace("'", "'") + text = text.replace("\"", """) + return text + +def send_message(message, c): + if c.delivery == "debug": + print message + elif c.delivery == "xmlrpc": + import xmlrpclib + xmlrpclib.ServerProxy(c.xmlrpc_server).hub.deliver(message) + elif c.delivery == "email": + import smtplib + smtp = smtplib.SMTP(c.smtp_server) + smtp.sendmail(c.from_address, c.smtp_address, + "From: %s\r\nTo: %s\r\n" + "Subject: DeliverXML\r\n\r\n%s" + % (c.from_address, c.smtp_address, message)) + else: + sys.exit("delivery option must be one of 'debug', 'xmlrpc', 'email'") + +def send_change_for(rid, branch, author, log, rev, c): + message_tmpl = """ + + Monotone CIA Bot client python script + 0.1 + + + %(project)s + %(branch)s + + + + %(rid)s + %(author)s + %(files)s + %(log)s + + +""" + + substs = {} + + # Stupid way to pull out everything inside quotes (which currently + # uniquely identifies filenames inside a changeset). + pieces = rev.split('"') + files = [] + for i in range(len(pieces)): + if (i % 2) == 1: + if pieces[i] not in files: + files.append(pieces[i]) + substs["files"] = "\n".join(["%s" % escape_for_xml(f) for f in files]) + changelog = log.strip() + project = c.project_for_branch(branch) + if project is None: + return + substs["author"] = escape_for_xml(author) + substs["project"] = escape_for_xml(project) + substs["branch"] = escape_for_xml(branch) + substs["rid"] = escape_for_xml(rid) + substs["log"] = escape_for_xml(changelog) + + message = message_tmpl % substs + send_message(message, c) + +def main(progname, args): + if len(args) != 5: + sys.exit("Usage: %s revid branch author changelog revision_text" % (progname, )) + (rid, branch, author, log, rev, ) = args + c = config() + send_change_for(rid, branch, author, log, rev, c) + +if __name__ == "__main__": + main(sys.argv[0], sys.argv[1:]) ======================================================================== --- database.cc 04b7bf7f3d9722bb194a0623a339babc83d95c74 +++ database.cc 83c0e4fe4b672da030bc50966c118ac0c2c98017 @@ -480,9 +480,9 @@ database::rehash() { transaction_guard guard(*this); - ticker mcerts("mcerts", "m", 1); - ticker pubkeys("pubkeys", "+", 1); - ticker privkeys("privkeys", "!", 1); + ticker mcerts(_("mcerts"), "m", 1); + ticker pubkeys(_("pubkeys"), "+", 1); + ticker privkeys(_("privkeys"), "!", 1); { // rehash all mcerts ======================================================================== --- database_check.cc 415b63b94a1150b3aff78b9e7fa512e0141577e8 +++ database_check.cc c6145a7b639d6a67fd63c3816af36e67ada5144b @@ -108,7 +108,7 @@ app.db.get_file_ids(files); L(F("checking %d files\n") % files.size()); - ticker ticks("files", "f", files.size()/70+1); + ticker ticks(_("files"), "f", files.size()/70+1); for (std::set::const_iterator i = files.begin(); i != files.end(); ++i) @@ -133,7 +133,7 @@ app.db.get_manifest_ids(manifests); L(F("checking %d manifests\n") % manifests.size()); - ticker ticks("manifests", "m", manifests.size()/70+1); + ticker ticks(_("manifests"), "m", manifests.size()/70+1); for (std::set::const_iterator i = manifests.begin(); i != manifests.end(); ++i) @@ -189,7 +189,7 @@ app.db.get_revision_ids(revisions); L(F("checking %d revisions\n") % revisions.size()); - ticker ticks("revisions", "r", revisions.size()/70+1); + ticker ticks(_("revisions"), "r", revisions.size()/70+1); for (std::set::const_iterator i = revisions.begin(); i != revisions.end(); ++i) @@ -288,7 +288,7 @@ app.db.get_revision_ancestry(graph); L(F("checking %d ancestry edges\n") % graph.size()); - ticker ticks("ancestry", "a", graph.size()/70+1); + ticker ticks(_("ancestry"), "a", graph.size()/70+1); // checked revision has set of parents // graph has revision and associated parents @@ -321,7 +321,7 @@ L(F("checking %d public keys\n") % pubkeys.size()); - ticker ticks("keys", "k", 1); + ticker ticks(_("keys"), "k", 1); for (std::vector::const_iterator i = pubkeys.begin(); i != pubkeys.end(); ++i) @@ -347,7 +347,7 @@ L(F("checking %d revision certs\n") % certs.size()); - ticker ticks("certs", "c", certs.size()/70+1); + ticker ticks(_("certs"), "c", certs.size()/70+1); for (std::vector< revision >::const_iterator i = certs.begin(); i != certs.end(); ++i) @@ -377,7 +377,7 @@ { L(F("checking local history of %d revisions\n") % checked_revisions.size()); - ticker ticks("revisions", "r", 1); + ticker ticks(_("revisions"), "r", 1); for (std::map::iterator i = checked_revisions.begin(); i != checked_revisions.end(); ++i) ======================================================================== --- lua.cc f8a4f1818ea770532218416cb55752238c1f3ce3 +++ lua.cc fc053070a0c0a106e6f9a3e5678ef2a427ad1fcd @@ -1298,12 +1298,14 @@ bool lua_hooks::hook_note_commit(revision_id const & new_id, + revision_data const & rdat, map const & certs) { Lua ll(st); ll .func("note_commit") - .push_str(new_id.inner()()); + .push_str(new_id.inner()()) + .push_str(rdat.inner()()); ll.push_table(); @@ -1315,12 +1317,13 @@ ll.set_table(); } - ll.call(2, 0); + ll.call(3, 0); return ll.ok(); } bool lua_hooks::hook_note_netsync_revision_received(revision_id const & new_id, + revision_data const & rdat, set > > const & certs) @@ -1328,7 +1331,8 @@ Lua ll(st); ll .func("note_netsync_revision_received") - .push_str(new_id.inner()()); + .push_str(new_id.inner()()) + .push_str(rdat.inner()()); ll.push_table(); @@ -1351,7 +1355,7 @@ ll.set_table(); } - ll.call(2, 0); + ll.call(3, 0); return ll.ok(); } ======================================================================== --- lua.hh db3bb1c0a41f36d245e8f1cdbbada5b7a42f7dae +++ lua.hh 950e24bc4b2c16b258f00aee0c4923ae93f256df @@ -125,9 +125,11 @@ // notification hooks bool hook_note_commit(revision_id const & new_id, + revision_data const & rdat, std::map const & certs); bool hook_note_netsync_revision_received(revision_id const & new_id, + revision_data const & rdat, std::set > > const & certs); ======================================================================== --- monotone.cc 21176c710f4d646215c27d82b55f182830d13268 +++ monotone.cc 21be582ccd322a35a5d1864ee1251e5773054619 @@ -61,7 +61,7 @@ {"diffs", 0, POPT_ARG_NONE, NULL, OPT_DIFFS, gettext_noop("print diffs along with logs"), NULL}, {"no-merges", 0, POPT_ARG_NONE, NULL, OPT_NO_MERGES, gettext_noop("skip merges when printing logs"), NULL}, {"set-default", 0, POPT_ARG_NONE, NULL, OPT_SET_DEFAULT, gettext_noop("use the current arguments as the future default"), NULL}, - {"exclude", 0, POPT_ARG_STRING, &argstr, OPT_EXCLUDE, gettext_noop("leave out branches matching a pattern"), NULL}, + {"exclude", 0, POPT_ARG_STRING, &argstr, OPT_EXCLUDE, gettext_noop("leave out anything described by its argument"), NULL}, {"unified", 0, POPT_ARG_NONE, NULL, OPT_UNIFIED_DIFF, gettext_noop("use unified diff format"), NULL}, {"context", 0, POPT_ARG_NONE, NULL, OPT_CONTEXT_DIFF, gettext_noop("use context diff format"), NULL}, {"external", 0, POPT_ARG_NONE, NULL, OPT_EXTERNAL_DIFF, gettext_noop("use external diff hook for generating diffs"), NULL}, ======================================================================== --- monotone.texi b9423f2c78e69bf6307613fd2c4efc81427a92b9 +++ monotone.texi 9b7b9ab00d31aead6a87466ff1a2d843c54084a8 @@ -5584,10 +5584,12 @@ definitions. @ftable @code address@hidden note_commit (@var{new_id}, @var{certs}) address@hidden note_commit (@var{new_id}, @var{revision}, @var{certs}) Called by monotone after the version @var{new_id} is committed. The -second parameter, @var{certs}, is a lua table containing the set of +second parameter, @var{revision} is the text of the revision, what would +be given by "monotone cat revision @var{new_id}". The +third parameter, @var{certs}, is a lua table containing the set of certificate names and values committed along with this version. There is no default definition for this hook. @@ -5598,10 +5600,12 @@ commit-notification systems such as mailing lists or news services. It should not perform any security-critical operations. address@hidden note_netsync_revision_received (@var{new_id}, @var{certs}) address@hidden note_netsync_revision_received (@var{new_id}, @var{revision}, @var{certs}) Called by monotone after the revision @var{new_id} is recieved through -netsync. @var{certs} is a lua table containing one subtable for each +netsync. @var{revision} is the text of the revision, what would be given +by "monotone cat revision @var{new_id}". @var{certs} is a lua table +containing one subtable for each cert attached to the revision @var{new_id}. These subtables have fields named "key", "name", and "value", containing the signing key for the cert, the name of the cert, and the value of the cert. There is no default ======================================================================== --- netsync.cc 47d8fd00598b41e501700e9cf63e6300eb0fb1be +++ netsync.cc 6e37489151e0809548e293eb4d0495b8921cebfe @@ -619,7 +619,9 @@ decode_base64(j->value, vtmp); certs.insert(make_pair(j->key, make_pair(j->name, vtmp))); } - app.lua.hook_note_netsync_revision_received(*i, certs); + revision_data rdat; + app.db.get_revision(*i, rdat); + app.lua.hook_note_netsync_revision_received(*i, rdat, certs); } //Certs (not attached to a new revision) for (vector::iterator i = unattached_certs.begin(); @@ -690,34 +692,34 @@ session::setup_client_tickers() { // xgettext: please use short message and try to avoid multibytes chars - byte_in_ticker.reset(new ticker(_("bytes in"), ">", 1024, true)); + byte_in_ticker.reset(new ticker(N_("bytes in"), ">", 1024, true)); // xgettext: please use short message and try to avoid multibytes chars - byte_out_ticker.reset(new ticker(_("bytes out"), "<", 1024, true)); + byte_out_ticker.reset(new ticker(N_("bytes out"), "<", 1024, true)); if (role == sink_role) { // xgettext: please use short message and try to avoid multibytes chars - revision_checked_ticker.reset(new ticker(_("revs written"), "w", 1)); + revision_checked_ticker.reset(new ticker(N_("revs written"), "w", 1)); // xgettext: please use short message and try to avoid multibytes chars - cert_in_ticker.reset(new ticker(_("certs in"), "c", 3)); + cert_in_ticker.reset(new ticker(N_("certs in"), "c", 3)); // xgettext: please use short message and try to avoid multibytes chars - revision_in_ticker.reset(new ticker(_("revs in"), "r", 1)); + revision_in_ticker.reset(new ticker(N_("revs in"), "r", 1)); } else if (role == source_role) { // xgettext: please use short message and try to avoid multibytes chars - cert_out_ticker.reset(new ticker(_("certs out"), "C", 3)); + cert_out_ticker.reset(new ticker(N_("certs out"), "C", 3)); // xgettext: please use short message and try to avoid multibytes chars - revision_out_ticker.reset(new ticker(_("revs out"), "R", 1)); + revision_out_ticker.reset(new ticker(N_("revs out"), "R", 1)); } else { I(role == source_and_sink_role); // xgettext: please use short message and try to avoid multibytes chars - revision_checked_ticker.reset(new ticker(_("revs written"), "w", 1)); + revision_checked_ticker.reset(new ticker(N_("revs written"), "w", 1)); // xgettext: please use short message and try to avoid multibytes chars - revision_in_ticker.reset(new ticker(_("revs in"), "r", 1)); + revision_in_ticker.reset(new ticker(N_("revs in"), "r", 1)); // xgettext: please use short message and try to avoid multibytes chars - revision_out_ticker.reset(new ticker(_("revs out"), "R", 1)); + revision_out_ticker.reset(new ticker(N_("revs out"), "R", 1)); } } ======================================================================== --- po/POTFILES.in 0f66018918c56534036a8a549e3b81fb12a9c4b6 +++ po/POTFILES.in bd06ee5116d53df04a0065e56e3a6ef2b7837d8c @@ -13,6 +13,7 @@ constants.cc constants.hh cycle_detector.hh +database_check.cc database.cc database.hh diff_patch.cc ======================================================================== --- po/POTFILES.skip 8d5f6c3d6059a2c943f11a6208ead30399dca3c7 +++ po/POTFILES.skip 61bc7af140315b993cde1192087564ea2105250d @@ -1,3 +1,4 @@ +contrib/ciabot_monotone.py idna/nfkc.c popt/popt.c popt/popthelp.c ======================================================================== --- rcs_import.cc 22646283896c3db9024ffa6b1f57dd8d76c6598c +++ rcs_import.cc e01d4dc824657c684430fdf98d0132a1298f10d3 @@ -1255,8 +1255,8 @@ I(cvs.stk.size() == 1); - ticker n_revs("revisions", "r", 1); - ticker n_manifests("manifests", "m", 1); + ticker n_revs(_("revisions"), "r", 1); + ticker n_manifests(_("manifests"), "m", 1); while (cvs.branches.size() > 0) { @@ -1281,7 +1281,7 @@ // now we have a "last" rev for each tag { - ticker n_tags("tags", "t", 1); + ticker n_tags(_("tags"), "t", 1); packet_db_writer dbw(app); transaction_guard guard(app.db); for (map >::const_iterator i = cvs.resolved_tags.begin(); ======================================================================== --- tests/t_restriction_with_exclude.at +++ tests/t_restriction_with_exclude.at bf85428b2d62062acb23d375b0b18a3706adc5dd @@ -0,0 +1,40 @@ +AT_SETUP([use restrictions with --exclude]) +MONOTONE_SETUP + +AT_CHECK(mkdir foo) +AT_DATA(file1, [x +]) +AT_DATA(foo/bar, [y +]) + +AT_CHECK(MONOTONE add file1, [], [ignore], [ignore]) +AT_CHECK(MONOTONE add foo/bar, [], [ignore], [ignore]) + +AT_CHECK(MONOTONE ci --exclude . -m 'x', [1], [ignore], [ignore]) + +AT_CHECK(MONOTONE ci --exclude . file1 -m 'x', [], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "foo/bar", [], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "file1", [1], [ignore], [ignore]) +AT_CHECK(echo a >>file1) + +AT_CHECK(MONOTONE ci --exclude foo -m 'x', [], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "foo/bar", [], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "file1", [1], [ignore], [ignore]) +AT_CHECK(echo a >>file1) + +AT_CHECK(MONOTONE ci . --exclude file1 -m 'x', [], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "foo/bar", [1], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "file1", [], [ignore], [ignore]) +AT_CHECK(echo b >>foo/bar) + +AT_CHECK(MONOTONE ci . --exclude foo foo/bar -m 'x', [], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "foo/bar", [1], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "file1", [1], [ignore], [ignore]) +AT_CHECK(echo a >>file1) +AT_CHECK(echo b >>foo/bar) + +AT_CHECK(MONOTONE ci --exclude foo foo/bar -m 'x', [], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "foo/bar", [1], [ignore], [ignore]) +AT_CHECK(MONOTONE status --brief | grep "file1", [], [ignore], [ignore]) + +AT_CLEANUP ======================================================================== --- testsuite.at f37b217c9d261739b96a0f8ccdc61269f1c0ee67 +++ testsuite.at 9843a5c53ec471614fc6d5ef5dfcf16fc6995608 @@ -704,3 +704,4 @@ m4_include(tests/t_automate_get_manifest.at) m4_include(tests/t_automate_get_revision.at) m4_include(tests/t_unreadable_db.at) +m4_include(tests/t_restriction_with_exclude.at)