iPXE
|
Peer Content Caching and Retrieval: Content Identification [MS-PCCRC] tests. More...
#include <stdint.h>
#include <string.h>
#include <assert.h>
#include <ipxe/uaccess.h>
#include <ipxe/pccrc.h>
#include <ipxe/sha256.h>
#include <ipxe/sha512.h>
#include <ipxe/hmac.h>
#include <ipxe/test.h>
Go to the source code of this file.
Data Structures | |
struct | peerdist_info_test |
A content information test. More... | |
struct | peerdist_info_segment_test |
A content information segment test. More... | |
struct | peerdist_info_block_test |
A content information block test. More... | |
Macros | |
#define | DATA(...) { __VA_ARGS__ } |
Define inline raw data. More... | |
#define | RANGE(START, END) { .start = START, .end = END } |
Define an inline content range. More... | |
#define | TRIM(START, END) { .start = START, .end = END } |
Define an inline trimmed content range. More... | |
#define | PEERDIST_INFO_TEST(name, DATA, DIGEST, DIGESTSIZE, RANGE, TRIM, SEGMENTS) |
Define a content information test. More... | |
#define | PEERDIST_INFO_SEGMENT_TEST(name, INDEX, RANGE, BLOCKS, BLKSIZE, HASH, SECRET, ID) |
Define a content information segment test. More... | |
#define | PEERDIST_INFO_BLOCK_TEST(name, INDEX, RANGE, TRIM, HASH) |
Define a content information block test. More... | |
#define | SERVER_PASSPHRASE(name, DATA) static uint8_t name[] = DATA |
Define a server passphrase. More... | |
#define | peerdist_info_ok(test, info) peerdist_info_okx ( test, info, __FILE__, __LINE__ ) |
#define | peerdist_info_segment_ok(test, info, segment) peerdist_info_segment_okx ( test, info, segment, __FILE__, __LINE__ ) |
#define | peerdist_info_block_ok(test, segment, block) peerdist_info_block_okx ( test, segment, block, __FILE__, __LINE__ ) |
#define | peerdist_info_passphrase_ok(test, info, pass, pass_len) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
SERVER_PASSPHRASE (passphrase, DATA(0x2a, 0x3d, 0x73, 0xeb, 0x43, 0x5e, 0x9f, 0x2b, 0x8a, 0x34, 0x42, 0x67, 0xe7, 0x46, 0x7a, 0x3c, 0x73, 0x85, 0xc6, 0xe0, 0x55, 0xe2, 0xb4, 0xd3, 0x0d, 0xfe, 0xc7, 0xc3, 0x8b, 0x0e, 0xd7, 0x2c)) | |
Server passphrase used for these test vectors. More... | |
PEERDIST_INFO_TEST (iis_85_png_v1, DATA(0x00, 0x01, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x85, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xd8, 0xd9, 0x76, 0x35, 0x4a, 0x48, 0x72, 0xe9, 0x25, 0x76, 0x18, 0x03, 0xf4, 0x58, 0xd9, 0xda, 0xaa, 0x67, 0xf8, 0xe3, 0x1c, 0x63, 0x0f, 0xb7, 0x4e, 0x6a, 0x31, 0x2e, 0xf8, 0xa2, 0x5a, 0xba, 0x11, 0xaf, 0xc0, 0xd7, 0x94, 0x92, 0x43, 0xf9, 0x4f, 0x9c, 0x1f, 0xab, 0x35, 0xd9, 0xfd, 0x1e, 0x33, 0x1f, 0xcf, 0x78, 0x11, 0xa2, 0xe0, 0x1d, 0x35, 0x87, 0xb3, 0x8d, 0x77, 0x0a, 0x29, 0xe2, 0x02, 0x00, 0x00, 0x00, 0x73, 0xc1, 0x8a, 0xb8, 0x54, 0x91, 0x10, 0xf8, 0xe9, 0x0e, 0x71, 0xbb, 0xc3, 0xab, 0x2a, 0xa8, 0xc4, 0x4d, 0x13, 0xf4, 0x92, 0x94, 0x99, 0x25, 0x5b, 0x66, 0x0f, 0x24, 0xec, 0x77, 0x80, 0x0b, 0x97, 0x4b, 0xdd, 0x65, 0x56, 0x7f, 0xde, 0xec, 0xcd, 0xaf, 0xe4, 0x57, 0xa9, 0x50, 0x3b, 0x45, 0x48, 0xf6, 0x6e, 0xd3, 0xb1, 0x88, 0xdc, 0xfd, 0xa0, 0xac, 0x38, 0x2b, 0x09, 0x71, 0x1a, 0xcc), &sha256_algorithm, 32, RANGE(0, 99710), TRIM(0, 99710), 1) | |
IIS logo (iis-85.png) content information version 1. More... | |
PEERDIST_INFO_SEGMENT_TEST (iis_85_png_v1_s0, 0, RANGE(0, 99710), 2, 65536, DATA(0xd8, 0xd9, 0x76, 0x35, 0x4a, 0x48, 0x72, 0xe9, 0x25, 0x76, 0x18, 0x03, 0xf4, 0x58, 0xd9, 0xda, 0xaa, 0x67, 0xf8, 0xe3, 0x1c, 0x63, 0x0f, 0xb7, 0x4e, 0x6a, 0x31, 0x2e, 0xf8, 0xa2, 0x5a, 0xba), DATA(0x11, 0xaf, 0xc0, 0xd7, 0x94, 0x92, 0x43, 0xf9, 0x4f, 0x9c, 0x1f, 0xab, 0x35, 0xd9, 0xfd, 0x1e, 0x33, 0x1f, 0xcf, 0x78, 0x11, 0xa2, 0xe0, 0x1d, 0x35, 0x87, 0xb3, 0x8d, 0x77, 0x0a, 0x29, 0xe2), DATA(0x49, 0x1b, 0x21, 0x7d, 0xbe, 0xe2, 0xb5, 0xf1, 0x2c, 0xa7, 0x9b, 0x01, 0x5e, 0x06, 0xf4, 0xbb, 0xe6, 0x4f, 0x97, 0x45, 0xba, 0xd7, 0x86, 0x7a, 0xef, 0x17, 0xde, 0x59, 0x92, 0x7e, 0xdc, 0xe9)) | |
IIS logo (iis-85.png) content information version 1 segment 0. More... | |
PEERDIST_INFO_BLOCK_TEST (iis_85_png_v1_s0_b0, 0, RANGE(0, 65536), TRIM(0, 65536), DATA(0x73, 0xc1, 0x8a, 0xb8, 0x54, 0x91, 0x10, 0xf8, 0xe9, 0x0e, 0x71, 0xbb, 0xc3, 0xab, 0x2a, 0xa8, 0xc4, 0x4d, 0x13, 0xf4, 0x92, 0x94, 0x99, 0x25, 0x5b, 0x66, 0x0f, 0x24, 0xec, 0x77, 0x80, 0x0b)) | |
IIS logo (iis-85.png) content information version 1 segment 0 block 0. More... | |
PEERDIST_INFO_BLOCK_TEST (iis_85_png_v1_s0_b1, 1, RANGE(65536, 99710), TRIM(65536, 99710), DATA(0x97, 0x4b, 0xdd, 0x65, 0x56, 0x7f, 0xde, 0xec, 0xcd, 0xaf, 0xe4, 0x57, 0xa9, 0x50, 0x3b, 0x45, 0x48, 0xf6, 0x6e, 0xd3, 0xb1, 0x88, 0xdc, 0xfd, 0xa0, 0xac, 0x38, 0x2b, 0x09, 0x71, 0x1a, 0xcc)) | |
IIS logo (iis-85.png) content information version 1 segment 0 block 1. More... | |
PEERDIST_INFO_TEST (iis_85_png_v2, DATA(0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x99, 0xde, 0xe0, 0xd0, 0xc3, 0x58, 0xe2, 0x68, 0x4b, 0x62, 0x33, 0x0d, 0x32, 0xb5, 0xf1, 0x97, 0x87, 0x24, 0xa0, 0xd0, 0xa5, 0x2b, 0xdc, 0x5e, 0x78, 0x1f, 0xae, 0x71, 0xff, 0x57, 0xa8, 0xbe, 0x3d, 0xd4, 0x58, 0x03, 0x7e, 0xd4, 0x04, 0x11, 0x6b, 0xb6, 0x16, 0xd9, 0xb1, 0x41, 0x16, 0x08, 0x85, 0x20, 0xc4, 0x7c, 0xdc, 0x50, 0xab, 0xce, 0xa3, 0xfa, 0xe1, 0x88, 0xa9, 0x8e, 0xa2, 0x2d, 0xf3, 0xc0, 0x00, 0x00, 0xeb, 0xa0, 0x33, 0x81, 0xd0, 0xd0, 0xcb, 0x74, 0xf4, 0xb6, 0x13, 0xd8, 0x21, 0x0f, 0x37, 0xf0, 0x02, 0xa0, 0x6f, 0x39, 0x10, 0x58, 0x60, 0x96, 0xa1, 0x30, 0xd3, 0x43, 0x98, 0xc0, 0x8e, 0x66, 0xd7, 0xbc, 0xb8, 0xb6, 0xeb, 0x77, 0x83, 0xe4, 0xf8, 0x07, 0x64, 0x7b, 0x63, 0xf1, 0x46, 0xb5, 0x2f, 0x4a, 0xc8, 0x9c, 0xcc, 0x7a, 0xbf, 0x5f, 0xa1, 0x1a, 0xca, 0xfc, 0x2a, 0xcf, 0x50, 0x28, 0x58, 0x6c), &sha512_algorithm, 32, RANGE(0, 99710), TRIM(0, 99710), 2) | |
IIS logo (iis-85.png) content information version 2. More... | |
PEERDIST_INFO_SEGMENT_TEST (iis_85_png_v2_s0, 0, RANGE(0, 39390), 1, 39390, DATA(0xe0, 0xd0, 0xc3, 0x58, 0xe2, 0x68, 0x4b, 0x62, 0x33, 0x0d, 0x32, 0xb5, 0xf1, 0x97, 0x87, 0x24, 0xa0, 0xd0, 0xa5, 0x2b, 0xdc, 0x5e, 0x78, 0x1f, 0xae, 0x71, 0xff, 0x57, 0xa8, 0xbe, 0x3d, 0xd4), DATA(0x58, 0x03, 0x7e, 0xd4, 0x04, 0x11, 0x6b, 0xb6, 0x16, 0xd9, 0xb1, 0x41, 0x16, 0x08, 0x85, 0x20, 0xc4, 0x7c, 0xdc, 0x50, 0xab, 0xce, 0xa3, 0xfa, 0xe1, 0x88, 0xa9, 0x8e, 0xa2, 0x2d, 0xf3, 0xc0), DATA(0x33, 0x71, 0xbb, 0xea, 0xdd, 0xb6, 0x23, 0x53, 0xad, 0xce, 0xf9, 0x70, 0xa0, 0x6f, 0xdf, 0x65, 0x00, 0x1e, 0x04, 0x21, 0xf4, 0xc7, 0x10, 0x82, 0x76, 0xb0, 0xc3, 0x7a, 0x9f, 0x9e, 0xc1, 0x0f)) | |
IIS logo (iis-85.png) content information version 2 segment 0. More... | |
PEERDIST_INFO_BLOCK_TEST (iis_85_png_v2_s0_b0, 0, RANGE(0, 39390), TRIM(0, 39390), DATA(0xe0, 0xd0, 0xc3, 0x58, 0xe2, 0x68, 0x4b, 0x62, 0x33, 0x0d, 0x32, 0xb5, 0xf1, 0x97, 0x87, 0x24, 0xa0, 0xd0, 0xa5, 0x2b, 0xdc, 0x5e, 0x78, 0x1f, 0xae, 0x71, 0xff, 0x57, 0xa8, 0xbe, 0x3d, 0xd4)) | |
IIS logo (iis-85.png) content information version 2 segment 0 block 0. More... | |
PEERDIST_INFO_SEGMENT_TEST (iis_85_png_v2_s1, 1, RANGE(39390, 99710), 1, 60320, DATA(0x33, 0x81, 0xd0, 0xd0, 0xcb, 0x74, 0xf4, 0xb6, 0x13, 0xd8, 0x21, 0x0f, 0x37, 0xf0, 0x02, 0xa0, 0x6f, 0x39, 0x10, 0x58, 0x60, 0x96, 0xa1, 0x30, 0xd3, 0x43, 0x98, 0xc0, 0x8e, 0x66, 0xd7, 0xbc), DATA(0xb8, 0xb6, 0xeb, 0x77, 0x83, 0xe4, 0xf8, 0x07, 0x64, 0x7b, 0x63, 0xf1, 0x46, 0xb5, 0x2f, 0x4a, 0xc8, 0x9c, 0xcc, 0x7a, 0xbf, 0x5f, 0xa1, 0x1a, 0xca, 0xfc, 0x2a, 0xcf, 0x50, 0x28, 0x58, 0x6c), DATA(0xd7, 0xe9, 0x24, 0x42, 0x5e, 0x8f, 0x4f, 0x88, 0xf0, 0x1d, 0xc6, 0xa9, 0xbb, 0x1b, 0xc3, 0x7b, 0xe1, 0x13, 0xec, 0x79, 0x17, 0xc7, 0x45, 0xd4, 0x96, 0x5c, 0x2b, 0x55, 0xfa, 0x16, 0x3a, 0x6e)) | |
IIS logo (iis-85.png) content information version 2 segment 1. More... | |
PEERDIST_INFO_BLOCK_TEST (iis_85_png_v2_s1_b0, 0, RANGE(39390, 99710), TRIM(39390, 99710), DATA(0x33, 0x81, 0xd0, 0xd0, 0xcb, 0x74, 0xf4, 0xb6, 0x13, 0xd8, 0x21, 0x0f, 0x37, 0xf0, 0x02, 0xa0, 0x6f, 0x39, 0x10, 0x58, 0x60, 0x96, 0xa1, 0x30, 0xd3, 0x43, 0x98, 0xc0, 0x8e, 0x66, 0xd7, 0xbc)) | |
IIS logo (iis-85.png) content information version 2 segment 1 block 0. More... | |
static void | peerdist_info_okx (struct peerdist_info_test *test, struct peerdist_info *info, const char *file, unsigned int line) |
Report content information test result. More... | |
static void | peerdist_info_segment_okx (struct peerdist_info_segment_test *test, const struct peerdist_info *info, struct peerdist_info_segment *segment, const char *file, unsigned int line) |
Report content information segment test result. More... | |
static void | peerdist_info_block_okx (struct peerdist_info_block_test *test, const struct peerdist_info_segment *segment, struct peerdist_info_block *block, const char *file, unsigned int line) |
Report content information block test result. More... | |
static void | peerdist_info_passphrase_okx (struct peerdist_info_segment_test *test, const struct peerdist_info *info, uint8_t *pass, size_t pass_len, const char *file, unsigned int line) |
Report server passphrase test result. More... | |
static void | peerdist_info_test_exec (void) |
Perform content information self-tests. More... | |
Variables | |
struct self_test peerdist_info_test | __self_test |
Content information self-test. More... | |
Peer Content Caching and Retrieval: Content Identification [MS-PCCRC] tests.
Definition in file pccrc_test.c.
#define DATA | ( | ... | ) | { __VA_ARGS__ } |
Define inline raw data.
Definition at line 46 of file pccrc_test.c.
Define an inline content range.
START | Start offset |
END | End offset |
range | Content range |
Definition at line 55 of file pccrc_test.c.
Define an inline trimmed content range.
START | Start offset |
END | End offset |
trim | Trimmed content range |
Definition at line 64 of file pccrc_test.c.
Define a content information test.
name | Test name |
DATA | Raw content information |
DIGEST | Expected digest algorithm |
DIGESTSIZE | Expected digest size |
RANGE | Expected content range |
TRIM | Expected trimmer content range |
SEGMENTS | Expected number of segments |
test | Content information test |
Raw content information can be obtained from PeerDist-capable web servers using wget's "--header" option to inject the relevant PeerDist headers. For example:
wget –header "Accept-Encoding: peerdist" \ –header "X-P2P-PeerDist: Version=1.0" \ http://peerdist.server.address/test.url -O - | xxd -i -c 11
Version 1 content information can be retrieved using the headers:
Accept-Encoding: peerdist X-P2P-PeerDist: Version=1.0
Version 2 content information can be retrieved (from compatible servers) using the headers:
Accept-Encoding: peerdist X-P2P-PeerDist: Version=1.1 X-P2P-PeerDistEx: MinContentInformation=2.0, MaxContentInformation=2.0
Definition at line 116 of file pccrc_test.c.
Define a content information segment test.
name | Test name |
INDEX | Segment index |
RANGE | Expected content range |
BLOCKS | Expected number of blocks |
BLKSIZE | Expected block size |
HASH | Expected segment hash of data |
SECRET | Expected segment secret |
ID | Expected segment identifier |
test | Content information segment test |
Definition at line 160 of file pccrc_test.c.
Define a content information block test.
name | Test name |
INDEX | Block index |
RANGE | Expected content range |
TRIM | Expected trimmed content range |
HASH | Expected hash of data |
test | Content information block test |
Definition at line 194 of file pccrc_test.c.
Define a server passphrase.
name | Server passphrase name |
DATA | Raw server passphrase |
The server passphrase can be exported from a Windows BranchCache server using the command:
netsh branchcache exportkey exported.key somepassword
and this encrypted exported key can be decrypted using the oSSL_key_dx or mcrypt_key_dx utilities found in the (prototype) Prequel project at https://fedorahosted.org/prequel/ :
oSSL_key_dx exported.key somepassword or mcrypt_key_dx exported.key somepassword
Either command will display both the server passphrase and the "Server Secret". Note that this latter is the version 1 server secret (i.e. the SHA-256 of the server passphrase); the corresponding version 2 server secret can be obtained by calculating the truncated SHA-512 of the server passphrase.
We do not know the server passphrase during normal operation. We use it in the self-tests only to check for typos and other errors in the test vectors, by checking that the segment secret defined in a content information segment test is as expected.
Definition at line 232 of file pccrc_test.c.
#define peerdist_info_ok | ( | test, | |
info | |||
) | peerdist_info_okx ( test, info, __FILE__, __LINE__ ) |
Definition at line 381 of file pccrc_test.c.
#define peerdist_info_segment_ok | ( | test, | |
info, | |||
segment | |||
) | peerdist_info_segment_okx ( test, info, segment, __FILE__, __LINE__ ) |
Definition at line 417 of file pccrc_test.c.
#define peerdist_info_block_ok | ( | test, | |
segment, | |||
block | |||
) | peerdist_info_block_okx ( test, segment, block, __FILE__, __LINE__ ) |
Definition at line 451 of file pccrc_test.c.
Definition at line 489 of file pccrc_test.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
SERVER_PASSPHRASE | ( | passphrase | , |
DATA(0x2a, 0x3d, 0x73, 0xeb, 0x43, 0x5e, 0x9f, 0x2b, 0x8a, 0x34, 0x42, 0x67, 0xe7, 0x46, 0x7a, 0x3c, 0x73, 0x85, 0xc6, 0xe0, 0x55, 0xe2, 0xb4, 0xd3, 0x0d, 0xfe, 0xc7, 0xc3, 0x8b, 0x0e, 0xd7, 0x2c) | |||
) |
Server passphrase used for these test vectors.
PEERDIST_INFO_TEST | ( | iis_85_png_v1 | , |
DATA(0x00, 0x01, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x85, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xd8, 0xd9, 0x76, 0x35, 0x4a, 0x48, 0x72, 0xe9, 0x25, 0x76, 0x18, 0x03, 0xf4, 0x58, 0xd9, 0xda, 0xaa, 0x67, 0xf8, 0xe3, 0x1c, 0x63, 0x0f, 0xb7, 0x4e, 0x6a, 0x31, 0x2e, 0xf8, 0xa2, 0x5a, 0xba, 0x11, 0xaf, 0xc0, 0xd7, 0x94, 0x92, 0x43, 0xf9, 0x4f, 0x9c, 0x1f, 0xab, 0x35, 0xd9, 0xfd, 0x1e, 0x33, 0x1f, 0xcf, 0x78, 0x11, 0xa2, 0xe0, 0x1d, 0x35, 0x87, 0xb3, 0x8d, 0x77, 0x0a, 0x29, 0xe2, 0x02, 0x00, 0x00, 0x00, 0x73, 0xc1, 0x8a, 0xb8, 0x54, 0x91, 0x10, 0xf8, 0xe9, 0x0e, 0x71, 0xbb, 0xc3, 0xab, 0x2a, 0xa8, 0xc4, 0x4d, 0x13, 0xf4, 0x92, 0x94, 0x99, 0x25, 0x5b, 0x66, 0x0f, 0x24, 0xec, 0x77, 0x80, 0x0b, 0x97, 0x4b, 0xdd, 0x65, 0x56, 0x7f, 0xde, 0xec, 0xcd, 0xaf, 0xe4, 0x57, 0xa9, 0x50, 0x3b, 0x45, 0x48, 0xf6, 0x6e, 0xd3, 0xb1, 0x88, 0xdc, 0xfd, 0xa0, 0xac, 0x38, 0x2b, 0x09, 0x71, 0x1a, 0xcc) | , | ||
& | sha256_algorithm, | ||
32 | , | ||
RANGE(0, 99710) | , | ||
TRIM(0, 99710) | , | ||
1 | |||
) |
IIS logo (iis-85.png) content information version 1.
PEERDIST_INFO_SEGMENT_TEST | ( | iis_85_png_v1_s0 | , |
0 | , | ||
RANGE(0, 99710) | , | ||
2 | , | ||
65536 | , | ||
DATA(0xd8, 0xd9, 0x76, 0x35, 0x4a, 0x48, 0x72, 0xe9, 0x25, 0x76, 0x18, 0x03, 0xf4, 0x58, 0xd9, 0xda, 0xaa, 0x67, 0xf8, 0xe3, 0x1c, 0x63, 0x0f, 0xb7, 0x4e, 0x6a, 0x31, 0x2e, 0xf8, 0xa2, 0x5a, 0xba) | , | ||
DATA(0x11, 0xaf, 0xc0, 0xd7, 0x94, 0x92, 0x43, 0xf9, 0x4f, 0x9c, 0x1f, 0xab, 0x35, 0xd9, 0xfd, 0x1e, 0x33, 0x1f, 0xcf, 0x78, 0x11, 0xa2, 0xe0, 0x1d, 0x35, 0x87, 0xb3, 0x8d, 0x77, 0x0a, 0x29, 0xe2) | , | ||
DATA(0x49, 0x1b, 0x21, 0x7d, 0xbe, 0xe2, 0xb5, 0xf1, 0x2c, 0xa7, 0x9b, 0x01, 0x5e, 0x06, 0xf4, 0xbb, 0xe6, 0x4f, 0x97, 0x45, 0xba, 0xd7, 0x86, 0x7a, 0xef, 0x17, 0xde, 0x59, 0x92, 0x7e, 0xdc, 0xe9) | |||
) |
IIS logo (iis-85.png) content information version 1 segment 0.
PEERDIST_INFO_BLOCK_TEST | ( | iis_85_png_v1_s0_b0 | , |
0 | , | ||
RANGE(0, 65536) | , | ||
TRIM(0, 65536) | , | ||
DATA(0x73, 0xc1, 0x8a, 0xb8, 0x54, 0x91, 0x10, 0xf8, 0xe9, 0x0e, 0x71, 0xbb, 0xc3, 0xab, 0x2a, 0xa8, 0xc4, 0x4d, 0x13, 0xf4, 0x92, 0x94, 0x99, 0x25, 0x5b, 0x66, 0x0f, 0x24, 0xec, 0x77, 0x80, 0x0b) | |||
) |
IIS logo (iis-85.png) content information version 1 segment 0 block 0.
PEERDIST_INFO_BLOCK_TEST | ( | iis_85_png_v1_s0_b1 | , |
1 | , | ||
RANGE(65536, 99710) | , | ||
TRIM(65536, 99710) | , | ||
DATA(0x97, 0x4b, 0xdd, 0x65, 0x56, 0x7f, 0xde, 0xec, 0xcd, 0xaf, 0xe4, 0x57, 0xa9, 0x50, 0x3b, 0x45, 0x48, 0xf6, 0x6e, 0xd3, 0xb1, 0x88, 0xdc, 0xfd, 0xa0, 0xac, 0x38, 0x2b, 0x09, 0x71, 0x1a, 0xcc) | |||
) |
IIS logo (iis-85.png) content information version 1 segment 0 block 1.
PEERDIST_INFO_TEST | ( | iis_85_png_v2 | , |
DATA(0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x99, 0xde, 0xe0, 0xd0, 0xc3, 0x58, 0xe2, 0x68, 0x4b, 0x62, 0x33, 0x0d, 0x32, 0xb5, 0xf1, 0x97, 0x87, 0x24, 0xa0, 0xd0, 0xa5, 0x2b, 0xdc, 0x5e, 0x78, 0x1f, 0xae, 0x71, 0xff, 0x57, 0xa8, 0xbe, 0x3d, 0xd4, 0x58, 0x03, 0x7e, 0xd4, 0x04, 0x11, 0x6b, 0xb6, 0x16, 0xd9, 0xb1, 0x41, 0x16, 0x08, 0x85, 0x20, 0xc4, 0x7c, 0xdc, 0x50, 0xab, 0xce, 0xa3, 0xfa, 0xe1, 0x88, 0xa9, 0x8e, 0xa2, 0x2d, 0xf3, 0xc0, 0x00, 0x00, 0xeb, 0xa0, 0x33, 0x81, 0xd0, 0xd0, 0xcb, 0x74, 0xf4, 0xb6, 0x13, 0xd8, 0x21, 0x0f, 0x37, 0xf0, 0x02, 0xa0, 0x6f, 0x39, 0x10, 0x58, 0x60, 0x96, 0xa1, 0x30, 0xd3, 0x43, 0x98, 0xc0, 0x8e, 0x66, 0xd7, 0xbc, 0xb8, 0xb6, 0xeb, 0x77, 0x83, 0xe4, 0xf8, 0x07, 0x64, 0x7b, 0x63, 0xf1, 0x46, 0xb5, 0x2f, 0x4a, 0xc8, 0x9c, 0xcc, 0x7a, 0xbf, 0x5f, 0xa1, 0x1a, 0xca, 0xfc, 0x2a, 0xcf, 0x50, 0x28, 0x58, 0x6c) | , | ||
& | sha512_algorithm, | ||
32 | , | ||
RANGE(0, 99710) | , | ||
TRIM(0, 99710) | , | ||
2 | |||
) |
IIS logo (iis-85.png) content information version 2.
PEERDIST_INFO_SEGMENT_TEST | ( | iis_85_png_v2_s0 | , |
0 | , | ||
RANGE(0, 39390) | , | ||
1 | , | ||
39390 | , | ||
DATA(0xe0, 0xd0, 0xc3, 0x58, 0xe2, 0x68, 0x4b, 0x62, 0x33, 0x0d, 0x32, 0xb5, 0xf1, 0x97, 0x87, 0x24, 0xa0, 0xd0, 0xa5, 0x2b, 0xdc, 0x5e, 0x78, 0x1f, 0xae, 0x71, 0xff, 0x57, 0xa8, 0xbe, 0x3d, 0xd4) | , | ||
DATA(0x58, 0x03, 0x7e, 0xd4, 0x04, 0x11, 0x6b, 0xb6, 0x16, 0xd9, 0xb1, 0x41, 0x16, 0x08, 0x85, 0x20, 0xc4, 0x7c, 0xdc, 0x50, 0xab, 0xce, 0xa3, 0xfa, 0xe1, 0x88, 0xa9, 0x8e, 0xa2, 0x2d, 0xf3, 0xc0) | , | ||
DATA(0x33, 0x71, 0xbb, 0xea, 0xdd, 0xb6, 0x23, 0x53, 0xad, 0xce, 0xf9, 0x70, 0xa0, 0x6f, 0xdf, 0x65, 0x00, 0x1e, 0x04, 0x21, 0xf4, 0xc7, 0x10, 0x82, 0x76, 0xb0, 0xc3, 0x7a, 0x9f, 0x9e, 0xc1, 0x0f) | |||
) |
IIS logo (iis-85.png) content information version 2 segment 0.
PEERDIST_INFO_BLOCK_TEST | ( | iis_85_png_v2_s0_b0 | , |
0 | , | ||
RANGE(0, 39390) | , | ||
TRIM(0, 39390) | , | ||
DATA(0xe0, 0xd0, 0xc3, 0x58, 0xe2, 0x68, 0x4b, 0x62, 0x33, 0x0d, 0x32, 0xb5, 0xf1, 0x97, 0x87, 0x24, 0xa0, 0xd0, 0xa5, 0x2b, 0xdc, 0x5e, 0x78, 0x1f, 0xae, 0x71, 0xff, 0x57, 0xa8, 0xbe, 0x3d, 0xd4) | |||
) |
IIS logo (iis-85.png) content information version 2 segment 0 block 0.
PEERDIST_INFO_SEGMENT_TEST | ( | iis_85_png_v2_s1 | , |
1 | , | ||
RANGE(39390, 99710) | , | ||
1 | , | ||
60320 | , | ||
DATA(0x33, 0x81, 0xd0, 0xd0, 0xcb, 0x74, 0xf4, 0xb6, 0x13, 0xd8, 0x21, 0x0f, 0x37, 0xf0, 0x02, 0xa0, 0x6f, 0x39, 0x10, 0x58, 0x60, 0x96, 0xa1, 0x30, 0xd3, 0x43, 0x98, 0xc0, 0x8e, 0x66, 0xd7, 0xbc) | , | ||
DATA(0xb8, 0xb6, 0xeb, 0x77, 0x83, 0xe4, 0xf8, 0x07, 0x64, 0x7b, 0x63, 0xf1, 0x46, 0xb5, 0x2f, 0x4a, 0xc8, 0x9c, 0xcc, 0x7a, 0xbf, 0x5f, 0xa1, 0x1a, 0xca, 0xfc, 0x2a, 0xcf, 0x50, 0x28, 0x58, 0x6c) | , | ||
DATA(0xd7, 0xe9, 0x24, 0x42, 0x5e, 0x8f, 0x4f, 0x88, 0xf0, 0x1d, 0xc6, 0xa9, 0xbb, 0x1b, 0xc3, 0x7b, 0xe1, 0x13, 0xec, 0x79, 0x17, 0xc7, 0x45, 0xd4, 0x96, 0x5c, 0x2b, 0x55, 0xfa, 0x16, 0x3a, 0x6e) | |||
) |
IIS logo (iis-85.png) content information version 2 segment 1.
PEERDIST_INFO_BLOCK_TEST | ( | iis_85_png_v2_s1_b0 | , |
0 | , | ||
RANGE(39390, 99710) | , | ||
TRIM(39390, 99710) | , | ||
DATA(0x33, 0x81, 0xd0, 0xd0, 0xcb, 0x74, 0xf4, 0xb6, 0x13, 0xd8, 0x21, 0x0f, 0x37, 0xf0, 0x02, 0xa0, 0x6f, 0x39, 0x10, 0x58, 0x60, 0x96, 0xa1, 0x30, 0xd3, 0x43, 0x98, 0xc0, 0x8e, 0x66, 0xd7, 0xbc) | |||
) |
IIS logo (iis-85.png) content information version 2 segment 1 block 0.
|
static |
Report content information test result.
test | Content information test |
info | Content information to fill in |
file | Test code file |
line | Test code line |
Definition at line 360 of file pccrc_test.c.
References info, okx, test, and virt_to_user().
|
static |
Report content information segment test result.
test | Content information segment test |
info | Content information |
segment | Segment information to fill in |
file | Test code file |
line | Test code line |
Definition at line 393 of file pccrc_test.c.
References digestsize, info, memcmp(), okx, segment, and test.
|
static |
Report content information block test result.
test | Content information block test |
segment | Segment information |
block | Block information to fill in |
file | Test code file |
line | Test code line |
Definition at line 430 of file pccrc_test.c.
References block, digestsize, info, memcmp(), okx, segment, and test.
|
static |
Report server passphrase test result.
test | Content information segment test |
info | Content information |
pass | Server passphrase |
pass_len | Length of server passphrase |
file | Test code file |
line | Test code line |
Definition at line 465 of file pccrc_test.c.
References ctx, digest_final(), digest_init(), digest_update(), digestsize, digest_algorithm::digestsize, hmac_ctxsize(), hmac_final(), hmac_init(), hmac_update(), info, memcmp(), okx, and test.
|
static |
Perform content information self-tests.
Definition at line 497 of file pccrc_test.c.
References block, info, peerdist_info_block_ok, peerdist_info_ok, peerdist_info_passphrase_ok, peerdist_info_segment_ok, and segment.
struct self_test peerdist_info_test __self_test |
Content information self-test.
Definition at line 523 of file pccrc_test.c.