summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* [util] Rewrite catrom.pl to use Option::ROM libraryMichael Brown2012-06-121-34/+15Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [util] Allow Option::ROM to access multiple ROM imagesMichael Brown2012-06-123-53/+129
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Use "cpuid --ext" instead of "cpuid --amd"Michael Brown2012-06-121-1/+4
| | | | | | | Avoid potential confusion in the documentation by using a vendor-neutral name for the extended (AMD-defined) feature set. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add "sync" commandMichael Brown2012-06-093-0/+86
| | | | | | | Add "sync" command (loosely based on the Unix "sync"), which will wait for any pending operations to complete. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Mark security negotiation as a pending operationMichael Brown2012-06-092-7/+18
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Mark any unacknowledged transmission as a pending operationMichael Brown2012-06-091-3/+33
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pending] Add concept of "pending operations"Michael Brown2012-06-093-0/+114
| | | | | | | | | | iPXE is fundamentally asynchronous in operation: some operations continue in the background even after the foreground has continued to a new task. For example, the closing FIN/ACK exchanges of a TCP connection will take place in the background after an HTTP download has completed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add "cpuid" commandMichael Brown2012-06-079-161/+310
| | | | | | | Allow x86 CPU feature flags (such as support for 64-bit mode) to be checked using the "cpuid" command. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Merge i386 and x86_64 versions of errfile.hMichael Brown2012-06-062-11/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Fix unused-but-set variable warningMichael Brown2012-05-241-2/+0Star
| | | | | Reported-by: Brandon Penglase <bpenglase-ipxe@spaceservices.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Add support for Digest authenticationMichael Brown2012-05-231-0/+173
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Provide credentials only when requested by serverMichael Brown2012-05-231-16/+128
| | | | | | | Provide HTTP Basic authentication credentials only in response to a 401 Unauthorized response from the server. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Split construction of Authorization header out of http_step()Michael Brown2012-05-231-57/+96
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Defer processing response code until after receiving all headersMichael Brown2012-05-221-6/+10
| | | | | | | | | Some headers can modify the meaning of the response code. For example, a WWW-Authenticate header can change the interpretation of a 401 Unauthorized response from "Access denied" to "Please authenticate". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Reopen connections when server does not keep connection aliveMichael Brown2012-05-221-31/+118
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Rename KEY= to PRIVKEY= and "key" to "privkey"Michael Brown2012-05-222-18/+21
| | | | | | | | The setting name "key" conflicts with the setting name "key" already in use by the 802.11 code. Resolve the conflict by renaming the newer setting to "privkey". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Require OCSP check if certificate provides an OCSP URIMichael Brown2012-05-221-0/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Automatically perform OCSP checks when applicableMichael Brown2012-05-221-68/+195
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Allow "imgtrust" to automatically download cross-signed certificatesMichael Brown2012-05-221-0/+13
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [monojob] Allow monojob to be completely silentMichael Brown2012-05-221-7/+11
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Construct OCSP check URIMichael Brown2012-05-223-83/+84
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Fix margin of error for OCSP checksMichael Brown2012-05-221-2/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Return a NULL OCSP check if construction failsMichael Brown2012-05-221-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Return a NULL X.509 certificate if construction failsMichael Brown2012-05-221-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Accept UTCTime/GeneralizedTime with no "seconds" fieldMichael Brown2012-05-221-0/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add self-tests for base64Michael Brown2012-05-202-0/+125
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [base64] Avoid overrunning input data bufferMichael Brown2012-05-201-2/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Work around platforms which choke on EFI_PCI_DEVICE_ENABLEMichael Brown2012-05-161-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | EFI_PCI_DEVICE_ENABLE is a list of the standard attributes that must be enabled for a PCI device to function: I/O cycles, memory cycles, and bus-mastering. We currently call EFI_PCI_IO_PROTOCOL::Attribute() with the parameter EFI_PCI_DEVICE_ENABLE to enable a PCI device. This should translate to a single write to PCI configuration space. Simplicity is not a virtue within the UEFI world. Some platforms will 'helpfully' report an error if EFI_PCI_DEVICE_ENABLE is used on a device that doesn't actually support all three of the relevant attributes. For example, if a PCI device provides only memory-mapped accesses (and so hardwires the I/O enable bit to zero), then using EFI_PCI_DEVICE_ENABLE on such a platform will result in an EFI_UNSUPPORTED error. There is no plausible use case in which it is useful for the platform to return an error in this way, and doing so makes it impossible to distinguish genuine errors from noise. Work around this broken behaviour by attempting to enable the three attributes individually, and ignoring any errors. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Report SCSI response only when applicableMichael Brown2012-05-161-1/+2
| | | | | | | | | | | | | iSCSI generally includes a full SCSI response only when an error occurs. iscsi_scsi_done() currently passes the NULL response through to scsi_response(), which ends up causing scsicmd_response() to dereference a NULL pointer. Fix by calling scsi_response() only if we have a non-NULL response. Reported-by: Brendon Walsh <brendonwalsh@niamu.com> Tested-by: Brendon Walsh <brendonwalsh@niamu.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add self-tests for OCSPMichael Brown2012-05-152-0/+1526
| | | | | | | Add self-tests for OCSP using test vectors generated with the openssl tools. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add framework for OCSPMichael Brown2012-05-156-3/+877
| | | | | | | | Add support for constructing OCSP queries and parsing OCSP responses. (There is no support yet for actually issuing an OCSP query via an HTTP POST.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add functions for constructing ASN.1 objectsMichael Brown2012-05-142-0/+172
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Parse OCSPSigning key purpose, if presentMichael Brown2012-05-143-0/+16
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Generalise x509_parse_bit_string() to asn1_bit_string()Michael Brown2012-05-145-126/+119Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Generalise asn1_{digest,pubkey,signature}_algorithm()Michael Brown2012-05-144-108/+137
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Generalise x509_parse_time() to asn1_generalized_time()Michael Brown2012-05-143-116/+126
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Parse X.509 raw public key bit stringMichael Brown2012-05-142-3/+11
| | | | | | | OCSP requires direct access to the bit string portion of the subject public key information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Include "?subject=" in cross-signed certificate URIMichael Brown2012-05-091-3/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Reduce standard debugging outputMichael Brown2012-05-092-51/+53
| | | | | | | | X.509 certificate processing currently produces an overwhelming amount of debugging information. Move some of this from DBGLVL_LOG to DBGLVL_EXTRA, to make the output more manageable. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Avoid potential NULL pointer dereferenceMichael Brown2012-05-081-3/+5
| | | | | | Detected using Valgrind. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Automatically download cross-signed certificatesMichael Brown2012-05-082-11/+287
| | | | | | | | Automatically attempt to download any required cross-signing certificates from http://ca.ipxe.org/auto, in order to enable the use of standard SSL certificates issued by public CAs. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xferbuf] Add generic data-transfer bufferMichael Brown2012-05-083-0/+140
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Use asynchronous certificate validatorMichael Brown2012-05-082-48/+120
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add asynchronous certificate validatorMichael Brown2012-05-083-0/+196
| | | | | | | | | To allow for automatic download of cross-signing certificates and for OCSP, the validation of certificates must be an asynchronous process. Create a stub validator which uses a job-control interface to report the result of certificate validation. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add x509_auto_append()Michael Brown2012-05-083-41/+81
| | | | | | | | | | CMS includes an unordered certificate set, from which certificates must be extracted in order by matching up issuers with subjects. We will use the same functionality as part of the automatic download of cross-signing certificates. Generalise cms_find_subject() to x509_find_subject(), and create x509_auto_append(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add x509_append_raw()Michael Brown2012-05-084-39/+59
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Check that common name contains no NUL charactersMichael Brown2012-05-081-0/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Allow for X.509 certificates with no common nameMichael Brown2012-05-083-5/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Add list_last_entry()Michael Brown2012-05-082-1/+26
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Discard all TCP connections on shutdownMichael Brown2012-05-081-0/+22
| | | | | | | Allow detection of genuine memory leaks by ensuring that all TCP connections are freed on shutdown. Signed-off-by: Michael Brown <mcb30@ipxe.org>