-
Notifications
You must be signed in to change notification settings - Fork 112
chore(everest-ci): bump build-kit base image version to debian13 #1381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
a7a5073
1bc8287
b627f96
d12989d
1cc89d0
95e53c0
3150c93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,34 +254,34 @@ | |
} | ||
|
||
TEST(openssl, base64Decode) { | ||
auto res = openssl::base64_decode(&iso_exi_a_hash_b64[0], sizeof(iso_exi_a_hash_b64)); | ||
auto res = openssl::base64_decode(iso_exi_a_hash_b64, std::strlen(iso_exi_a_hash_b64)); | ||
Check failure on line 257 in lib/everest/tls/tests/openssl_util_test.cpp
|
||
ASSERT_EQ(res.size(), sizeof(iso_exi_a_hash)); | ||
EXPECT_EQ(std::memcmp(res.data(), &iso_exi_a_hash[0], res.size()), 0); | ||
res = openssl::base64_decode(&iso_exi_sig_b64[0], sizeof(iso_exi_sig_b64)); | ||
res = openssl::base64_decode(iso_exi_sig_b64, std::strlen(iso_exi_sig_b64)); | ||
Check failure on line 260 in lib/everest/tls/tests/openssl_util_test.cpp
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change needs to be reverted. |
||
ASSERT_EQ(res.size(), sizeof(iso_exi_sig)); | ||
EXPECT_EQ(std::memcmp(res.data(), &iso_exi_sig[0], res.size()), 0); | ||
|
||
std::array<std::uint8_t, 512> buffer{}; | ||
std::size_t buffer_len = buffer.size(); | ||
|
||
EXPECT_TRUE(openssl::base64_decode(&iso_exi_a_hash_b64[0], sizeof(iso_exi_a_hash_b64), buffer.data(), buffer_len)); | ||
EXPECT_TRUE(openssl::base64_decode(iso_exi_a_hash_b64, std::strlen(iso_exi_a_hash_b64), buffer.data(), buffer_len)); | ||
Check failure on line 267 in lib/everest/tls/tests/openssl_util_test.cpp
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see above why strlen isn't a solution |
||
ASSERT_EQ(buffer_len, sizeof(iso_exi_a_hash)); | ||
EXPECT_EQ(std::memcmp(buffer.data(), &iso_exi_a_hash[0], buffer_len), 0); | ||
} | ||
|
||
TEST(openssl, base64DecodeNl) { | ||
auto res = openssl::base64_decode(&iso_exi_a_hash_b64_nl[0], sizeof(iso_exi_a_hash_b64_nl)); | ||
auto res = openssl::base64_decode(iso_exi_a_hash_b64_nl, std::strlen(iso_exi_a_hash_b64_nl)); | ||
Check failure on line 273 in lib/everest/tls/tests/openssl_util_test.cpp
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see above why strlen isn't a solution |
||
ASSERT_EQ(res.size(), sizeof(iso_exi_a_hash)); | ||
EXPECT_EQ(std::memcmp(res.data(), &iso_exi_a_hash[0], res.size()), 0); | ||
res = openssl::base64_decode(&iso_exi_sig_b64_nl[0], sizeof(iso_exi_sig_b64_nl)); | ||
res = openssl::base64_decode(iso_exi_sig_b64_nl, std::strlen(iso_exi_sig_b64_nl)); | ||
Check failure on line 276 in lib/everest/tls/tests/openssl_util_test.cpp
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see above why strlen isn't a solution |
||
ASSERT_EQ(res.size(), sizeof(iso_exi_sig)); | ||
EXPECT_EQ(std::memcmp(res.data(), &iso_exi_sig[0], res.size()), 0); | ||
|
||
std::array<std::uint8_t, 512> buffer{}; | ||
std::size_t buffer_len = buffer.size(); | ||
|
||
EXPECT_TRUE( | ||
openssl::base64_decode(&iso_exi_a_hash_b64_nl[0], sizeof(iso_exi_a_hash_b64_nl), buffer.data(), buffer_len)); | ||
openssl::base64_decode(iso_exi_a_hash_b64_nl, std::strlen(iso_exi_a_hash_b64_nl), buffer.data(), buffer_len)); | ||
Check failure on line 284 in lib/everest/tls/tests/openssl_util_test.cpp
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see above why strlen isn't a solution |
||
ASSERT_EQ(buffer_len, sizeof(iso_exi_a_hash)); | ||
EXPECT_EQ(std::memcmp(buffer.data(), &iso_exi_a_hash[0], buffer_len), 0); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change needs to be reverted.
openssl::base64_decode() takes a constant pointer and a length - normally from a buffer of known size. It does not need to be null terminated.
And it if isn't null terminated then strlen() will not help.