aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/uefisign
Commit message (Collapse)AuthorAgeFilesLines
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* usr.sbin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-163-6/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-162-4/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-125-5/+5
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+2
|
* uefisign: fix SizeOfHeaders sanity check.Kenneth Camann2021-06-031-1/+1
| | | | | | | | | | | | | This check was too aggressive: it is fine if SizeOfHeaders is exactly equal to the size of the DOS stub + PE header + section table. Despite being wrong this code typically worked for most EFI binaries because SizeOfHeaders is rounded up to a multiple of FileAlignment, which is often large (e.g., 512 bytes for the FreeBSD loader) so most binaries made it through. Reviewed by: imp@ Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/445
* uefisign: handle empty sectionsEric van Gyzen2021-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | loader.efi has an empty set_Xfic section. Handle it correctly. ``` Sections: Idx Name Size VMA LMA File off Algn [...] 3 set_Xcom 00000168 00000000000d4000 00000000000d4000 000d0e00 2**2 CONTENTS, ALLOC, LOAD, DATA 4 set_Xfic 00000000 00000000000d4168 00000000000d4168 00000000 2**2 ALLOC, LOAD, DATA 5 .sdata 00000448 00000000000d5000 00000000000d5000 000d1000 2**2 CONTENTS, ALLOC, LOAD, DATA [...] ``` Reviewed by: trasz, dab Reported by: andy.y.liu@dell.com Tested by: andy.y.liu@dell.com MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D29606
* uefisign: fix handling of errors from child procEric van Gyzen2021-04-061-1/+5
| | | | | | | | | | | | | | | | Close the unused pipe file descriptors so the parent will notice if the child exits prematurely. Previously, the parent would block forever on a read from the pipe. $ uefisign -c foo.cert -k foo.key -o loader.efi loader.efi.unsigned uefisign: section points inside the headers load: 0.06 cmd: uefisign 4502 [piperd] 7.25r 0.00u 0.00s 0% 5968k ... _sleep+0x1be pipe_read+0x3d6 kern_readv+0x8c sys_read+0x83 ... Reviewed by: trasz MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D29605
* usr.sbin/uefisign: prevent specifying certificate, key or outputXin LI2021-03-211-5/+14
| | | | | | multiple times. MFC after: 1 month
* Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-286-6/+0
| | | | | | | | | | | | Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Notes: svn path=/head/; revision=367105
* Stop hardcoding WARNS in uefisign(8).Edward Tomasz Napierala2020-04-011-2/+0
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA Notes: svn path=/head/; revision=359510
* Fix alignment issue in uefisignMarcin Wojtas2018-12-191-8/+14
| | | | | | | | | | | | | | | | | | The pe_certificate structure has to be aligned to 8 bytes. [1] Since this is now checked in edk2, any binaries signed with older version of this tool will fail verification. References: [1] https://docs.microsoft.com/en-us/windows/desktop/Debug/pe-format#the-attribute-certificate-table-image-only Submitted by: Kornel Duleba <mindal@semihalf.com> Reviewed by: trasz Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D18554 Notes: svn path=/head/; revision=342253
* Make uefisign(8) buildable.Jung-uk Kim2018-09-191-3/+3
| | | | Notes: svn path=/projects/openssl111/; revision=338787
* Use capsicum helpers in fstype and ctld.Mariusz Zaborski2018-07-151-3/+2
| | | | | | | Reviewed by: trasz Notes: svn path=/head/; revision=336307
* Add SPDX identifiers for uefisign(8) sources.Edward Tomasz Napierala2018-01-245-0/+10
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=328335
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* uefisign: Remove backwards-compatibility sys/capability.h supportEd Maste2016-09-191-4/+0
| | | | | | | | | | | | | | uefisign previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version in order to facilitate development on the stable branch. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so there's no need for the backwards compatibility support. Reviewed by: trasz Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=305980
* META MODE: Update dependencies with 'the-lot' and add missing directories.Bryan Drewery2015-12-011-0/+19
| | | | | | | | | | | | | | | | | This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291563
* Fix a ton of speelling errorsEitan Adler2015-10-212-2/+2
| | | | | | | | | | arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337 Notes: svn path=/head/; revision=289677
* uefisign(8) ships with 10.2.Edward Tomasz Napierala2015-07-181-2/+2
| | | | | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285671
* Remove the warning about invalid PE checksum; apparently nothingEdward Tomasz Napierala2015-05-201-2/+6
| | | | | | | | | | cares about those checksums anyway. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=283141
* Use LIBADD.Edward Tomasz Napierala2015-02-261-1/+1
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279323
* Add uefisign(8), UEFI Secure Boot signing utility.Edward Tomasz Napierala2015-02-267-0/+1523
MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279315