summaryrefslogtreecommitdiff
path: root/httpboot.c
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2017-02-20 15:31:28 +0800
committerPeter Jones <pjones@redhat.com>2017-03-24 18:27:48 -0400
commit3ee08dde9c6541186e6b72d1fbdf1a13d516bea4 (patch)
treea57b90d839ee55cf9fcdc05efa6136ea6ae5e337 /httpboot.c
parent97022acd36497727c6a408d2d1dc9da4a94e2e7a (diff)
downloadefi-boot-shim-3ee08dde9c6541186e6b72d1fbdf1a13d516bea4.tar.gz
efi-boot-shim-3ee08dde9c6541186e6b72d1fbdf1a13d516bea4.zip
httpboot: parse https prefix in the uri
This commit adds the check for "https://" in the uri to support HTTPs Boot. Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'httpboot.c')
-rw-r--r--httpboot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/httpboot.c b/httpboot.c
index 8b124e5e..4454691b 100644
--- a/httpboot.c
+++ b/httpboot.c
@@ -184,6 +184,9 @@ generate_next_uri (CONST CHAR8 *current_uri, CONST CHAR8 *next_loader,
if (strncmpa(current_uri, (CHAR8 *)"http://", 7) == 0) {
ptr = current_uri + 7;
count += 7;
+ } else if (strncmpa(current_uri, (CHAR8 *)"https://", 8) == 0) {
+ ptr = current_uri + 8;
+ count += 8;
} else {
return EFI_INVALID_PARAMETER;
}
@@ -216,6 +219,8 @@ extract_hostname (CONST CHAR8 *url, CHAR8 **hostname)
if (strncmpa(url, (CHAR8 *)"http://", 7) == 0)
start = url + 7;
+ else if (strncmpa(url, (CHAR8 *)"https://", 8) == 0)
+ start = url + 8;
else
return EFI_INVALID_PARAMETER;