summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add password supportpkeyDavid Howells2018-08-213-30/+40
|
* Add public key operations for encrypt, decrypt, sign and verifyDavid Howells2018-08-214-0/+357
| | | | | | | | | | | | | | | Add encryption, decryption, signature creation and signature verification public key operations. Example usage: j=`openssl pkcs8 -in ~/pkcs7/firmwarekey2.priv -topk8 -nocrypt -outform DER | \ keyctl padd asymmetric foo @s` echo -n abcdefghijklmnopqrst >/tmp/data keyctl pkey_encrypt $j 0 /tmp/data enc=pkcs1 >/tmp/enc keyctl pkey_decrypt $j 0 /tmp/enc enc=pkcs1 >/tmp/dec cmp /tmp/data /tmp/dec keyctl pkey_sign $j 0 /tmp/data enc=pkcs1 hash=sha1 >/tmp/sig keyctl pkey_verify $j 0 /tmp/data /tmp/sig enc=pkcs1 hash=sha1 Signed-off-by: David Howells <dhowells@redhat.com>
* TEST: Add a missing backslashDavid Howells2018-08-211-1/+1
| | | | | | Add a missing backslash into a regular expression in the toolbox. Signed-off-by: David Howells <dhowells@redhat.com>
* Move to version 1.5.11v1.5.11David Howells2018-05-111-1/+6
|
* DNS: Support AFS SRV records and cell db config filesDavid Howells2018-05-095-208/+645
|
* tests/bz1031154: skip if selinux is disabledArtem Savkov2017-06-272-0/+10
| | | | | | | | | With selinux disabled the test currently fails trying to setenforce, it should be skipped instead. Found while trying to run in a container where selinux always appears disabled. Signed-off-by: Artem Savkov <asavkov@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com>
* TEST: Add KDF leading zero testMat Martineau2017-06-081-0/+10
| | | | | | | | | | Diffie-Hellman results used as input to a KDF algorithm can have leading zero bytes, and the current kernel DH implementation truncates leading zero bytes. This test confirms that the KDF code correctly handles DH results with leading zeros. Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* Add the interface logic to support DH with KDF handling support.Stephan Müller2017-06-089-0/+456
| | | | | | | | | | | | | | | | | | | | The dh_compute code now allows the following options: - no KDF support / output of raw DH shared secret: dh_compute <private> <prime> <base> - KDF support without "other information" string: dh_compute_kdf <private> <prime> <base> <output length> <hash_type> - KDF support with "other information string: dh_compute_kdf_oi <private> <prime> <base> <output length> <hash_type> where the OI string is provided on STDIN. The test to verify the code is based on a test vector used for the CAVS testing of SP800-56A. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: David Howells <dhowells@redhat.com>
* Doc: Update man pages for KEYCTL_RESTRICT_KEYRINGMat Martineau2017-06-083-0/+100
| | | | | | | | | Created a new manual page for the new keyctl_restrict_keyring function and added 'keyctl restrict_keyring' information for the keyctl command line utility. Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* TEST: Add tests for restricted keyring configurationMat Martineau2017-06-084-0/+593
| | | | | | | Test keyring restrict options using keyctl_restrict() Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* Add keyring restrictionMat Martineau2017-04-044-0/+42
| | | | | Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* lib: Begin the 1.7 library APIDavid Howells2017-04-042-1/+5
| | | | | | New symbols go into the libkeyutils.so.1.7 API. Signed-off-by: David Howells <dhowells@redhat.com>
* spec: Fix licence handlingDavid Howells2017-03-151-2/+5
| | | | | | Fix the handling of licence files in the specfile. Signed-off-by: David Howells <dhowells@redhat.com>
* spec: Pass global ldflags into buildDavid Howells2017-03-151-1/+2
| | | | | | Pass global ldflags into build so that hardening works. Signed-off-by: David Howells <dhowells@redhat.com>
* Move to version 1.5.10v1.5.10David Howells2017-03-151-1/+8
|
* Merge branch 'man_page_layout_fixes' of ↵David Howells2017-03-1527-396/+321
|\ | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mtk/keyutils into next "Here are some more man page layout fixes. The biggest change is reformatting or keyctl(1) so that it's prettier and more readable." Signed-off-by: David Howells <dhowells@redhat.com>
| * man: various pages: Use real minus signsMichael Kerrisk2016-12-1725-45/+45
| | | | | | | | Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyutils(7): Fix layout glitchMichael Kerrisk2016-12-171-3/+6
| | | | | | | | | | | | I introduced this problem with an earlier commit. Sorry! Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyutils(7): Better layoutMichael Kerrisk2016-12-171-6/+2
| | | | | | | | Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyutils(7): Use real minus signsMichael Kerrisk2016-12-171-7/+7
| | | | | | | | Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyutils(7): typo fixMichael Kerrisk2016-12-171-1/+1
| | | | | | | | Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyctl(1): SEE ALSO: add a few missing entriesMichael Kerrisk2016-12-171-1/+5
| | | | | | | | Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyctl(1) Use real minus signesMichael Kerrisk2016-12-171-25/+25
| | | | | | | | | | | | | | Use real minus signs in places where they should be used (e..g, shell command and shell output). Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyctl(1): Remove unneeded .P tagsMichael Kerrisk2016-12-171-98/+91
| | | | | | | | | | | | This make s the source much easier to read. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyctl(1): Use better formatting for shell session examplesMichael Kerrisk2016-12-171-70/+56
| | | | | | | | | | | | | | | | Use .nf/.fi to disable fill. This means we can remove use of .br. It also fixes a few formatting glitches where some pieces of shell code were being right justified in cases where the lines were long. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyctl(1): Use a better shell promptMichael Kerrisk2016-12-171-48/+48
| | | | | | | | | | | | The prompt "testbox>" is confusing and wordy. Use a simple "$" prompt. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyctl(1): Format list of commands as subsectionsMichael Kerrisk2016-12-171-73/+25
| | | | | | | | | | | | This layout makes the commands much easier to scan. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: keyctl(1): Format list of key identifiers as hanging listMichael Kerrisk2016-12-171-29/+20
|/ | | | | | | The current list of key IDs is layed out in a way that is quite hard to san. Use a hanging list instead. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
* Merge branch 'man_formatting_fixes' of ↵David Howells2016-12-1625-77/+124
|\ | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mtk/keyutils.git Signed-off-by: David Howells <dhowells@redhat.com>
| * man: Consistently format pathnames as italicMichael Kerrisk2016-12-133-7/+13
| | | | | | | | Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: Squash multiline NAME entriesMichael Kerrisk2016-12-133-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The norm for man pages is that the NAME line is formatted as a single line without line breaks. The patched pages violate that norm, and break various tools that process man page input (such as my own scripts to format pages for man7.org). Squash the NAME lines in the pages that have this problem, so that a single line is produced. This necessarily entails abbreviating the descriptive text somewhat, but I don't think this is a loss. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: Consistent formatting of NAME linesMichael Kerrisk2016-12-1325-31/+31
| | | | | | | | | | | | | | | | | | Normal man pages convention is that the phrase following the dash is not capitalized. Also, one or two other minor clean-ups in the NAME line. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: Format function references consistentlyMichael Kerrisk2016-12-135-11/+21
| | | | | | | | | | | | Always format functions as: .BR func () Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * man: Formatting fixesMichael Kerrisk2016-12-1319-23/+65
| | | | | | | | | | | | Format 'errno' with .I. Format error constants in bold. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
* | Merge branch 'kerrisk/remove_migrated_man7' of ↵David Howells2016-12-167-799/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mtk/keyutils.git "As discussed face-to-face and by email, there are a number of man pages in keyutils that document kernel APIs. The more natural home for these pages is Linux man-pages. I've already migrated the pages listed below into Linux man-pages, and subsequently enhanced various pages. They'll be released with the next release of man-pages (around the end of Feb 2017)." Signed-off-by: David Howells <dhowells@redhat.com>
| * | man: Delete man pages that will migrate to the Linux man-pages projectMichael Kerrisk2016-12-137-799/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed face-to-face and by email, there are a number of man pages in keyutils that document kernel APIs. The more natural home for these pages is Linux man-pages. I've already migrated the pages listed below into Linux man-pages, and subsequently enhanced various pages. They'll be released with the next release of man-pages (around the end of Feb 2017). keyrings.7 persistent-keyring.7 process-keyring.7 session-keyring.7 thread-keyring.7 user-keyring.7 user-session-keyring.7
* | Merge branch 'mtk_fixes' of ↵David Howells2016-12-1325-180/+112
|\ \ | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mtk/keyutils.git Signed-off-by: David Howells <dhowells@redhat.com>
| * | SEE ALSO: add references to keyctl(1) and keyctl(3)Michael Kerrisk2016-11-081-0/+2
| | | | | | | | | | | | Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * | All pages should refer to keyrings(7) in SEE ALSOMichael Kerrisk2016-11-085-4/+9
| | | | | | | | | | | | Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * | Correctly order SEE ALSO entriesMichael Kerrisk2016-11-0822-47/+46
| | | | | | | | | | | | | | | | | | | | | SEE ALSO entries are ordered first by section, then alphabetically within section. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * | Fix section number referenceMichael Kerrisk2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | request_key() is in Section 2, not 3. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * | Improve formatting of SEE ALSO entriesMichael Kerrisk2016-11-0825-144/+67
| | | | | | | | | | | | | | | | | | | | | | | | * Don't force each entry onto new line * Choose ragged right hand margin and disable hyphenation * Use hard dashes in page names, to prevent hyphenation Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| * | Use consistent mark-up for page references in SEE ALSOMichael Kerrisk2016-11-083-3/+6
| |/ | | | | | | | | | | | | Most pages use ".BR" markup. Make the others (that use \fB..\fR) use the same mark-up. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
* | TEST: Use multiline comparison function for DH testMat Martineau2016-12-131-9/+11
| | | | | | | | | | | | | | | | | | Utilizes the new expect_multiline toolbox function to avoid false positives. The expected output is converted to a heredoc and properly quoted to preserve newlines. Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* | TEST: Add expect_multiline toolbox functionMat Martineau2016-12-131-0/+19
| | | | | | | | | | | | | | | | | | | | expect_payload only looks at the last line of the output file, so it doesn't work for commands that output multiple lines. expect_multiline counts the lines in the expected value and extracts that number of lines from the output file for comparison and assignment. Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* | TEST: Use correct variable when checking for DH functionalityMat Martineau2016-12-132-2/+2
| | | | | | | | | | Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* | Doc: Fix typo regarding remote DH keyMat Martineau2016-12-131-1/+1
| | | | | | | | | | Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* | TEST: Add Diffie-Hellman testsMat Martineau2016-12-135-0/+236
| | | | | | | | | | Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* | Doc: Update manpages for KEYCTL_DH_COMPUTEMat Martineau2016-12-134-0/+142
| | | | | | | | | | | | | | | | | | | | Created a new manual page for section 3 for the keyctl_dh_compute and keyctl_dh_compute_alloc functions and listed these functions in the man3 page for keyctl. Updated the man1 page for the new 'keyctl dh_compute' command. Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>
* | Add Diffie-Hellman compute functionDavid Howells2016-12-135-2/+115
| | | | | | | | Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com>