Skip to content
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

Fix compile issues when build on RHEL5_64 with gcc 4.9.4 #8

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crypto/fipsmodule/rand/urandom_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#if defined(OPENSSL_X86_64) && !defined(BORINGSSL_SHARED_LIBRARY) && \
!defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE) && defined(USE_NR_getrandom)

#include <linux/types.h>
#include <linux/random.h>
#include <sys/ptrace.h>
#include <sys/syscall.h>
Expand All @@ -34,6 +35,10 @@
#define PTRACE_O_EXITKILL (1 << 20)
#endif

#if !defined(PTRACE_O_TRACESYSGOOD)
#define PTRACE_O_TRACESYSGOOD (1)
#endif

// This test can be run with $OPENSSL_ia32cap=~0x4000000000000000 in order to
// simulate the absence of RDRAND of machines that have it.

Expand Down
16 changes: 8 additions & 8 deletions crypto/trust_token/trust_token_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ static std::vector<const TRUST_TOKEN_METHOD *> AllMethods() {

class TrustTokenProtocolTestBase : public ::testing::Test {
public:
explicit TrustTokenProtocolTestBase(const TRUST_TOKEN_METHOD *method)
: method_(method) {}
explicit TrustTokenProtocolTestBase(const TRUST_TOKEN_METHOD *trust_token_method)
: method_(trust_token_method) {}

// KeyID returns the key ID associated with key index |i|.
static uint32_t KeyID(size_t i) {
Expand Down Expand Up @@ -586,13 +586,13 @@ TEST_P(TrustTokenMetadataTest, TruncatedProof) {
CBS real_response;
CBS_init(&real_response, issue_resp, resp_len);
uint16_t count;
uint32_t public_metadata;
uint32_t local_public_metadata;
bssl::ScopedCBB bad_response;
ASSERT_TRUE(CBB_init(bad_response.get(), 0));
ASSERT_TRUE(CBS_get_u16(&real_response, &count));
ASSERT_TRUE(CBB_add_u16(bad_response.get(), count));
ASSERT_TRUE(CBS_get_u32(&real_response, &public_metadata));
ASSERT_TRUE(CBB_add_u32(bad_response.get(), public_metadata));
ASSERT_TRUE(CBS_get_u32(&real_response, &local_public_metadata));
ASSERT_TRUE(CBB_add_u32(bad_response.get(), local_public_metadata));

for (size_t i = 0; i < count; i++) {
uint8_t s[PMBTOKEN_NONCE_SIZE];
Expand Down Expand Up @@ -654,13 +654,13 @@ TEST_P(TrustTokenMetadataTest, ExcessDataProof) {
CBS real_response;
CBS_init(&real_response, issue_resp, resp_len);
uint16_t count;
uint32_t public_metadata;
uint32_t local_public_metadata;
bssl::ScopedCBB bad_response;
ASSERT_TRUE(CBB_init(bad_response.get(), 0));
ASSERT_TRUE(CBS_get_u16(&real_response, &count));
ASSERT_TRUE(CBB_add_u16(bad_response.get(), count));
ASSERT_TRUE(CBS_get_u32(&real_response, &public_metadata));
ASSERT_TRUE(CBB_add_u32(bad_response.get(), public_metadata));
ASSERT_TRUE(CBS_get_u32(&real_response, &local_public_metadata));
ASSERT_TRUE(CBB_add_u32(bad_response.get(), local_public_metadata));

for (size_t i = 0; i < count; i++) {
uint8_t s[PMBTOKEN_NONCE_SIZE];
Expand Down