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

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

[Monotone-commits-diffs] net.venge.monotone: 909ad7b8486d79eb97462a1918


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone: 909ad7b8486d79eb97462a1918a42867cb0b56a0
Date: Fri, 18 Feb 2011 20:54:40 +0100 (CET)

revision:            909ad7b8486d79eb97462a1918a42867cb0b56a0
date:                2011-02-15T06:40:09
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone
changelog:
* contrib/get_passphrase_from_file.lua: Moved ...
* extra/mtn-hooks/get_passphrase_from_file.lua: ... here.  This is a hook
  that can get your key passphrases from the file (that should be
  protected).  This is suitable for servers and their keys, but can also
  be used by users who would add the function get_passphrase to their
  monotonerc to do the same thing.
* test/extra/passphrase-from-file/__driver__.lua: New test driver.
* test/extra/passphrase-from-file/tester-key-with-passphrase: New key
  file for this test, with a password mention in README.
* test/extra/passphrase-from-file/README: New file.

manifest:
format_version "1"

new_manifest [e1bf1ca42fcb8f78d5bd09edfd594d013a2f8b84]

old_revision [30eb25d40766813d72fde9f68b3ff1ab8581f2d0]

rename "contrib/get_passphrase_from_file.lua"
    to "extra/mtn-hooks/get_passphrase_from_file.lua"

add_dir "test/extra/passphrase-from-file"

add_file "test/extra/passphrase-from-file/README"
 content [33710e7ec0f5bc23277ac2708c38595ac69c436b]

add_file "test/extra/passphrase-from-file/__driver__.lua"
 content [c6e58feab770679af47a912875d08fcd4a726cda]

add_file "test/extra/passphrase-from-file/tester-key-with-passphrase"
 content [83ca0347719d8e959c957fb28fe8aa4c5d4b380f]
============================================================
--- /dev/null	
+++ test/extra/passphrase-from-file/README	33710e7ec0f5bc23277ac2708c38595ac69c436b
@@ -0,0 +1,2 @@
+There's a specially made key here, in the file tester-key-with-passphrase.
+It has the passphrase 'f00bar'
============================================================
--- /dev/null	
+++ test/extra/passphrase-from-file/__driver__.lua	c6e58feab770679af47a912875d08fcd4a726cda
@@ -0,0 +1,29 @@
+mtn_setup()
+
+-- Prepare the test by copying the lua hook to test
+-- and adding a few lines to test_hooks.lua
+mkdir("hooks.d")
+check(copy(srcdir.."/../extra/mtn-hooks/get_passphrase_from_file.lua",
+	   "hooks.d/get_passphrase_from_file.lua"))
+
+append("test_hooks.lua", "\
+\
+includedirpattern(get_confdir() .. \"/hooks.d\",\"*.conf\")\
+includedirpattern(get_confdir() .. \"/hooks.d\",\"*.lua\")\
+")
+
+-- Load the extra key that needs a pass phrase
+check(get("tester-key-with-passphrase"))
+check(mtn("read","tester-key-with-passphrase"), 0, false, false)
+
+-- Write the passphrase file.
+writefile("passphrases", "address@hidden \"f00bar\"\n")
+
+-- Do the test
+addfile("test1", "foo")
+check(raw_mtn("--keydir", test.root .. "/keys",
+	      "address@hidden",
+	      "commit", "--message", "blah-blah", "--branch", "testbranch"),
+      1, false, false)
+check(nokey_mtn("commit", "--message", "blah-blah", "--branch", "testbranch",
+		"--key", "address@hidden"), 0, false, false)
============================================================
--- /dev/null	
+++ test/extra/passphrase-from-file/tester-key-with-passphrase	83ca0347719d8e959c957fb28fe8aa4c5d4b380f
@@ -0,0 +1,4 @@
+[keypair address@hidden
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbA7SsrUht/tItW/ouxlKeLonSEmU54fuLZQtUerzvgn5GvRey22nggHde/9WJJQ3oEBpHj1b+NhTXmrdsp07EG8sSp49c6KEnjl9RzWCbEno6rdwT7DgrYYmryie5YnstG4YTScIXGvb8FE4Ltem3QWwjrSUyKp76CXdIVqRwQIDAQAB#
+MIICyTBDBgkqhkiG9w0BBQ0wNjAeBgkqhkiG9w0BBQwwEQQI4o9Y2Q3tx7ECAicQAgEYMBQGCCqGSIb3DQMHBAhXhTe9TNEnwgSCAoDYaSrY2VHYkAqC+jDLLitjAkDWGgDzni0wL/G3wZ+i46Dod4V1fPjPjVhvyHeQ9C+ztm6ieDVRq3aGdYcxyfTN7g46XUteBajOsNRsvkEpHs9wOVpa7KBg1x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