~ecryptfs/ecryptfs/trunk

« back to all changes in this revision

Viewing changes to tests/userspace/verify-passphrase-sig.sh

  • Committer: Dustin Kirkland
  • Date: 2009-02-13 15:57:24 UTC
  • Revision ID: kirkland@canonical.com-20090213155724-1q3qz2o0cbyimu9x
debian/ubuntu packaging

Initial checkin of the Debian/Ubuntu packaging

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
#
3
 
# verify_passphrase_sig.sh: Check for regressions in libecryptfs'
4
 
#                           generate_passphrase_sig()
5
 
# Author: Tyler Hicks <tyhicks@canonical.com>
6
 
#
7
 
# Copyright (C) 2012 Canonical Ltd.
8
 
#
9
 
# This program is free software; you can redistribute it and/or
10
 
# modify it under the terms of the GNU General Public License
11
 
# as published by the Free Software Foundation version 2
12
 
# of the License.
13
 
#
14
 
# This program is distributed in the hope that it will be useful,
15
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
# GNU General Public License for more details.
18
 
#
19
 
# You should have received a copy of the GNU General Public License
20
 
# along with this program; if not, write to the Free Software
21
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22
 
 
23
 
test_script_dir=$(dirname $0)
24
 
rc=1
25
 
 
26
 
pass="foo"
27
 
salt="0011223344556677"
28
 
# Expected values come from testing ecryptfs-utils version 30
29
 
expected_sig="253ca7e88811d184"
30
 
expected_fekek="3f0cffa9389d2c396ad887c6ec657898e2e9e74cbb3cb1d25d410f58de2aa6b70dd81ccedaf8fad725346d8f751b8fc2c50ad69fba27d1d4fb735f207e76c6e9"
31
 
 
32
 
${test_script_dir}/verify-passphrase-sig/test "$pass" "$salt" \
33
 
                                                "$expected_sig" \
34
 
                                                "$expected_fekek"
35
 
rc=$?
36
 
if [ $rc -ne 0 ]; then
37
 
        exit $rc
38
 
fi
39
 
 
40
 
 
41
 
pass="a"
42
 
salt="aaaaaaaaaaaaaaaa"
43
 
expected_sig="c42ec75301dc1674"
44
 
expected_fekek="27f2ff49bfc520109f2579b36377a29955585cee6e8e5210b474a7ef7e5c4e9cf499075ace62d03b78d718d0e311726bb35b6699061f12d0731dd6a3efe9b3f2"
45
 
 
46
 
${test_script_dir}/verify-passphrase-sig/test "$pass" "$salt" \
47
 
                                                "$expected_sig" \
48
 
                                                "$expected_fekek"
49
 
rc=$?
50
 
if [ $rc -ne 0 ]; then
51
 
        exit $rc
52
 
fi
53
 
 
54
 
 
55
 
pass="ef2fa983a4ecc87b6f48821bd9b36940220345624949e6bf826efd692678d78b"
56
 
salt="fa1507f9913d915b"
57
 
expected_sig="09582907da54851e"
58
 
expected_fekek="bdc9089cb08554ac6039c64345a82f49e175c1427104bb1906fed9f3ad703c4f3745b2ef9a2f4210b24c973fe17370ae39def8af31d7b3f304d1209ed4313f4d"
59
 
 
60
 
${test_script_dir}/verify-passphrase-sig/test "$pass" "$salt" \
61
 
                                                "$expected_sig" \
62
 
                                                "$expected_fekek"
63
 
rc=$?
64
 
exit $rc