Skip to content

64bits keyspace - #17

Merged
ushachar merged 1 commit into
masterfrom
wide-keyspace
Feb 12, 2017
Merged

ushachar merged 1 commit into
masterfrom
wide-keyspace

Conversation

@swilly22

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread obj_gen.cpp Outdated
} else if (m_data_size_type == data_size_range) {
if (m_data_size_pattern && *m_data_size_pattern=='S') {
float a = (m_key_index-m_key_min)/(float)(m_key_max-m_key_min);
float a = (m_key_index-m_key_min)/(m_key_max-m_key_min);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the cast? the new_size calc won't be correct....

@ushachar

ushachar commented Feb 1, 2017 •

Copy link
Copy Markdown
Contributor

@swilly22 - Note your git config sets 'root' as the author....
@ushachar this is my git config:
user.name=SWilly22
user.email=[email protected]

Comment thread obj_gen.cpp Outdated
llrn = llrn << 32; // move to upper 32bits

rn = nrand48(m_data_blob); // max is 1<<31
llrn |= rn; // max is 1<<31

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is false...

Comment thread obj_gen.cpp
#ifdef HAVE_RANDOM_R
return RAND_MAX;
unsigned long long rand_max = RAND_MAX;
return (rand_max << 32) | RAND_MAX;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really important, but you can do ((uint64_t)RAND_MAX << 32) | RAND_MAX; instead.

Comment thread obj_gen.cpp
if (m_data_size_pattern && *m_data_size_pattern=='S') {
float a = (m_key_index-m_key_min)/(m_key_max-m_key_min);
float a = (m_key_index-m_key_min)/(float)(m_key_max-m_key_min);
new_size = (m_data_size.size_range.size_max-m_data_size.size_range.size_min)*a + m_data_size.size_range.size_min;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now triggers a compilation warnings on size mismatch - need to add some casts (both here and in random_range two lines below) - and let's use static_cast<> instead of C style...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(static cast to double -- not to float)

@ushachar

ushachar commented Feb 7, 2017

Copy link
Copy Markdown
Contributor

@swilly22 - Note comment - after you fix please squash and repush, then I'll merge.

@ushachar
ushachar merged commit 7043b21 into master Feb 12, 2017
fcostaoliveira added a commit that referenced this pull request Jun 2, 2026
…nSSL 4.0 compat) (#432)

* fix(tls): replace SSL_OP_NO_TLSv1/1_1 with set_min_proto_version (OpenSSL 4.0 compat)

SSL_OP_NO_TLSv1 and SSL_OP_NO_TLSv1_1 are absent from the OpenSSL 4.0
public API. PR #388 covered the threading/init deprecations but missed
these two flags, so master would fail to build against OpenSSL 4.0.

SSL_CTX_set_min_proto_version / SSL_CTX_set_max_proto_version are
semantically equivalent (enforcing the user-requested protocol range)
and are available since OpenSSL 1.1.0. SSL_OP_NO_TLSv1_2 (also removed
in 4.0) is covered by the same guard. Falls back to SSL_OP_NO_TLSv* on
pre-1.1.0 toolchains.

Refs: 2.4 review finding #17

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix(tls): mask protocol gaps inside min/max range under OpenSSL >= 1.1.0

Bugbot flagged that the min/max approach allowed intermediate
protocols the user explicitly omitted (e.g. --tls-protocols
"tlsv1,tlsv1.2" enabled tlsv1.1).

Combines envelope clamp (set_min/max_proto_version) with per-gap
SSL_OP_NO_TLSv1_x masks, guarded by #ifdef so OpenSSL 4.0 (which may
remove the symbols entirely) still builds. For 4.0 the gap-mask is
silently skipped: removing those symbols means the runtime can't
individually disable them anyway, which matches OpenSSL's intended
deprecation policy.

Refs: bugbot MED review on PR #432

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants