~ubuntu-branches/ubuntu/wily/ecryptfs-utils/wily-proposed

« back to all changes in this revision

Viewing changes to tests/userspace/wrap-unwrap/test.c

  • Committer: Package Import Robot
  • Author(s): Dustin Kirkland, Dustin Kirkland, Tyler Hicks
  • Date: 2015-03-26 18:02:29 UTC
  • mfrom: (1.1.22) (43.1.3 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20150326180229-y6im37zr5gl5pojt
Tags: 107-0ubuntu1
[ Dustin Kirkland ]
* scripts/release.sh:
  - a few more release script improvements, build the source
    package for the Ubuntu development distro
* debian/control:
  - build depend on distro-info, which we use in our release script
* vivid

[ Tyler Hicks ]
* src/libecryptfs/key_management.c:
  - Fix a regression when reading version 1 wrapped passphrase files. A
    return code indicating success was always returned even when an error
    was encountered. The impact is low since the error situation is still
    caught when validating either the wrapping password's signature or the
    wrapped passphrase's signature. Thanks to László Böszörményi for
    catching this mistake.
  - Reject empty passphrases passed into ecryptfs_wrap_passphrase()
* src/libecryptfs/main.c:
  - Reject empty wrapping passphrases passed into generate_passphrase_sig()

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
                rc = 1;
107
107
                goto out;
108
108
        }
 
109
 
 
110
        /* Ensure that an empty passphrase is rejected */
 
111
        if ((rc = ecryptfs_wrap_passphrase(path, "testwrappw", salt, "")) == 0) {
 
112
                fprintf(stderr, "ecryptfs_wrap_passphrase() wrapped an empty passphrase\n");
 
113
                rc = 1;
 
114
                goto out;
 
115
        }
 
116
 
 
117
        /* Ensure that an empty wrapping passphrase is rejected */
 
118
        if ((rc = ecryptfs_wrap_passphrase(path, "", salt, "testpassphrase")) == 0) {
 
119
                fprintf(stderr, "ecryptfs_wrap_passphrase() used an empty wrapping passphrase\n");
 
120
                rc = 1;
 
121
                goto out;
 
122
        }
 
123
 
109
124
        rc = 0;
110
125
out:
111
126
        return rc;