Skip to content

Commit

Permalink
examples: update cloudflare servers
Browse files Browse the repository at this point in the history
cloudflare recently notified us about the upcoming deprecation
of their roughtime server we're using as example. This PR updates
our config to point to the new servers. Closes #16.
  • Loading branch information
oreparaz committed Mar 17, 2024
1 parent b9246b1 commit e5f4fa7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion examples/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ $CC -Wall -Werror -g -fsanitize=address,undefined -c ../vrt.c -o vrt.o

$CC -I ../ -Wall -Werror -g -fsanitize=address,undefined -o client vrt_client_unix.c vrt.o tweetnacl.o && ./client

go run test_integration.go
go build test_integration.go
./test_integration
10 changes: 5 additions & 5 deletions examples/vrt_client_freertos.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ __attribute__((aligned(4))) uint8_t vrt_buffer[VRT_QUERY_PACKET_LEN];
// we hardcode here the cloudflare server
// https://github.com/cloudflare/roughtime/blob/master/ecosystem.json
#define HOST_IP_ADDR "162.159.200.1" // roughtime.cloudflare.com
#define PORT 2002
#define PORT 2003

// echo gD63hSj3ScS+wuOeGrubXlq35N1c5Lby/S+T7MNTjxo= | base64 -D | xxd -i
// echo 0GD7c3yP8xEc4Zl2zeuN2SlLvDVVocjsPSL8/Rl/7zg= | base64 -D | xxd -i
static uint8_t public_key_cloudflare[] = {
0x80, 0x3e, 0xb7, 0x85, 0x28, 0xf7, 0x49, 0xc4, 0xbe, 0xc2, 0xe3, 0x9e,
0x1a, 0xbb, 0x9b, 0x5e, 0x5a, 0xb7, 0xe4, 0xdd, 0x5c, 0xe4, 0xb6, 0xf2,
0xfd, 0x2f, 0x93, 0xec, 0xc3, 0x53, 0x8f, 0x1a
0xd0, 0x60, 0xfb, 0x73, 0x7c, 0x8f, 0xf3, 0x11, 0x1c, 0xe1, 0x99, 0x76,
0xcd, 0xeb, 0x8d, 0xd9, 0x29, 0x4b, 0xbc, 0x35, 0x55, 0xa1, 0xc8, 0xec,
0x3d, 0x22, 0xfc, 0xfd, 0x19, 0x7f, 0xef, 0x38
};

static const char *TAG = "vrt_client";
Expand Down
10 changes: 5 additions & 5 deletions examples/vrt_client_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

//#define PORT 2002
//#define HOST "roughtime.sandbox.google.com"
#define PORT 2002
#define PORT 2003
#define HOST "roughtime.cloudflare.com"
#define RECV_BUFFER_LEN 1024

Expand All @@ -27,11 +27,11 @@ static uint8_t public_key_google[] = {
0x86, 0xa7, 0x0b, 0xcf, 0x30, 0x22, 0x4c, 0xc2, 0x54, 0x55, 0x37,
0x1b, 0xf9, 0xd4, 0xa2, 0xbf, 0xb6, 0x4b, 0x68, 0x25, 0x34};

// echo gD63hSj3ScS+wuOeGrubXlq35N1c5Lby/S+T7MNTjxo= | base64 -D | xxd -i
// echo 0GD7c3yP8xEc4Zl2zeuN2SlLvDVVocjsPSL8/Rl/7zg= | base64 -D | xxd -i
static uint8_t public_key_cloudflare[] = {
0x80, 0x3e, 0xb7, 0x85, 0x28, 0xf7, 0x49, 0xc4, 0xbe, 0xc2, 0xe3, 0x9e,
0x1a, 0xbb, 0x9b, 0x5e, 0x5a, 0xb7, 0xe4, 0xdd, 0x5c, 0xe4, 0xb6, 0xf2,
0xfd, 0x2f, 0x93, 0xec, 0xc3, 0x53, 0x8f, 0x1a
0xd0, 0x60, 0xfb, 0x73, 0x7c, 0x8f, 0xf3, 0x11, 0x1c, 0xe1, 0x99, 0x76,
0xcd, 0xeb, 0x8d, 0xd9, 0x29, 0x4b, 0xbc, 0x35, 0x55, 0xa1, 0xc8, 0xec,
0x3d, 0x22, 0xfc, 0xfd, 0x19, 0x7f, 0xef, 0x38
};

#define CHECK(x) \
Expand Down

0 comments on commit e5f4fa7

Please sign in to comment.