|
iPXE
|
Peer Content Caching and Retrieval: Retrieval Protocol [MS-PCCRR]. More...
#include <stdio.h>#include <string.h>#include <errno.h>#include <ipxe/uri.h>#include <ipxe/open.h>#include <ipxe/http.h>#include <ipxe/base16.h>#include <ipxe/pccrc.h>#include <ipxe/pccrr.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static int | peerdist_open_post (struct interface *xfer, const char *location, size_t digestsize, const uint8_t *id, unsigned int block) |
| Open retrieval protocol connection using HTTP POST. | |
| static int | peerdist_open_get (struct interface *xfer, const char *location, size_t digestsize, const uint8_t *id, unsigned int block) |
| Open retrieval protocol connection using HTTP GET or local file. | |
Variables | |
| struct peerdist_retrieval | peerdist_post |
| PeerDist retrieval protocol using HTTP POST. | |
| struct peerdist_retrieval | peerdist_get |
| PeerDist retrieval protocol using HTTP GET or local file. | |
Peer Content Caching and Retrieval: Retrieval Protocol [MS-PCCRR].
The MS-PCCRR specification defines an HTTP POST request/response pair for retrieving an encrypted block from a peer (with the decryption keys provided separately via the content information).
The HTTP POST request parameters serve only to identify the block: the actual response body is effectively a static encrypted blob.
We define an additional (non-standard) retrieval protocol in which the block is identified solely using the request URI, with the response being the same content that would be returned as the HTTP POST response body. This allows for encrypted blocks to be retrieved from a static source such as AWS S3 or a local FAT filesystem, without requiring a peer that can understand the retrieval protocol HTTP POST request format.
We define the static request URI format as:
<base>/xx/xxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy-b.blk
where
This path format is designed to allow for efficient storage in a local FAT filesystem (by limiting both the number of directories and the number of entries within each directory).
Definition in file pccrr.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
Open retrieval protocol connection using HTTP POST.
| xfer | Data transfer interface |
| location | Peer location |
| digestsize | Digest size |
| id | Segment identifier |
| block | Block index |
| rc | Return status code |
Definition at line 90 of file pccrr.c.
References block, http_request_content::data, DBGC, digestsize, ENOMEM, htonl, http_open(), http_request_content::len, memcpy(), memset(), NULL, parse_uri(), PEERDIST_MAGIC_PATH, PEERDIST_MSG_AES_128_CBC, peerdist_msg_getblks_t, PEERDIST_MSG_GETBLKS_TYPE, PEERDIST_MSG_GETBLKS_VERSION, rc, snprintf(), strerror(), strlen(), and uri_put().
|
static |
Open retrieval protocol connection using HTTP GET or local file.
| xfer | Data transfer interface |
| location | Peer location |
| digestsize | Digest size |
| id | Segment identifier |
| block | Block index |
| rc | Return status code |
Definition at line 158 of file pccrr.c.
References assert, block, DBGC, digestsize, len, PEERDIST_DIGEST_MAX_SIZE, rc, snprintf(), strerror(), strlen(), and xfer_open_uri_string().
| struct peerdist_retrieval peerdist_post |
PeerDist retrieval protocol using HTTP POST.
Definition at line 143 of file pccrr.c.
Referenced by peerdisc_create(), and peerdisc_socket_rx().
| struct peerdist_retrieval peerdist_get |
PeerDist retrieval protocol using HTTP GET or local file.
Definition at line 190 of file pccrr.c.
Referenced by peerdisc_create().