00001 /* 00002 * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>. 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License as 00006 * published by the Free Software Foundation; either version 2 of the 00007 * License, or any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 FILE_LICENCE ( GPL2_OR_LATER ); 00020 00021 /** 00022 * @file 00023 * 00024 * Secure Hyper Text Transfer Protocol (HTTPS) 00025 * 00026 */ 00027 00028 #include <stddef.h> 00029 #include <gpxe/open.h> 00030 #include <gpxe/tls.h> 00031 #include <gpxe/http.h> 00032 #include <gpxe/features.h> 00033 00034 FEATURE ( FEATURE_PROTOCOL, "HTTPS", DHCP_EB_FEATURE_HTTPS, 1 ); 00035 00036 /** 00037 * Initiate an HTTPS connection 00038 * 00039 * @v xfer Data transfer interface 00040 * @v uri Uniform Resource Identifier 00041 * @ret rc Return status code 00042 */ 00043 static int https_open ( struct xfer_interface *xfer, struct uri *uri ) { 00044 return http_open_filter ( xfer, uri, HTTPS_PORT, add_tls ); 00045 } 00046 00047 /** HTTPS URI opener */ 00048 struct uri_opener https_uri_opener __uri_opener = { 00049 .scheme = "https", 00050 .open = https_open, 00051 };
1.5.7.1