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

Support SHA-256 algorithm (RFC 8760) #676

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

Maratk1n
Copy link
Contributor

No description provided.

@orgads
Copy link
Contributor

orgads commented Dec 19, 2023

Thank you!

  1. Please add -DUSE_SHA256=1 also to build.sh in --full.
  2. There are many deprecation warnings with openssl 3. Example:
src/auth.cpp:348:18: warning: ‘int SHA256_Update(SHA256_CTX*, const void*, size_t)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  348 |     SHA256_Update( &SHA256Ctx, (unsigned char *) user, strlen(user));
      |     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@Maratk1n
Copy link
Contributor Author

Hi, @orgads

  1. Done
  2. I replaced openssl/sha with EVP module

Thanks for review!

@orgads
Copy link
Contributor

orgads commented Dec 20, 2023

Thank you!

I didn't test functionality yet, but compilation and tests pass.

build.sh Outdated Show resolved Hide resolved
@orgads
Copy link
Contributor

orgads commented Dec 22, 2023

Verified it works, thank you!

Please remove the flag.

@orgads
Copy link
Contributor

orgads commented Dec 25, 2023

LGTM

@lemenkov
Copy link
Member

I've found only a small mostly cosmetic issue. Please address it and rebase on top of current master branch.

@Maratk1n Maratk1n force-pushed the support_sha256_algorithm branch from 3cdbc39 to bcf8221 Compare January 12, 2024 20:49
@Maratk1n
Copy link
Contributor Author

Maratk1n commented Jan 12, 2024

Hi @lemenkov . I've rebased branch and added unit test.

CMakeLists.txt Show resolved Hide resolved
{
unsigned short i;
unsigned char j;
unsigned char *_b = (unsigned char *) _b_raw;

for (i = 0; i < MD5_HASH_SIZE; i++) {
for (i = 0; i < size; i++) {

Check failure

Code scanning / CodeQL

Comparison of narrow type with wide type in loop condition High

Comparison between i of type unsigned short and size of wider type size_t.
@orgads
Copy link
Contributor

orgads commented Jan 20, 2024

Thank you! Maybe squash all the commits at this point? I would leave only the first one as a separate commit.

@Maratk1n Maratk1n force-pushed the support_sha256_algorithm branch 2 times, most recently from 018d0ec to 538ba8f Compare January 20, 2024 17:42
@Maratk1n
Copy link
Contributor Author

No problem. I've squashed commits and rebased branch.

@orgads
Copy link
Contributor

orgads commented Jan 20, 2024

Thanks! Please resolve the open discussion.

@Maratk1n
Copy link
Contributor Author

Did you mean comment from github-advanced-security bot?
I fixed failure but don't have permission to resolve the thread.

@orgads
Copy link
Contributor

orgads commented Jan 20, 2024

I meant our discussion about CMakeLists. You already resolved it :)

@lemenkov
Copy link
Member

Did you mean comment from github-advanced-security bot? I fixed failure but don't have permission to resolve the thread.

@Maratk1n your PR raises a minimum OpenSSL version up to 1.1.0 but still there is a mention of 0.9.8 version in the doc-files. See my notes above.

@Maratk1n Maratk1n force-pushed the support_sha256_algorithm branch from 538ba8f to 1f0b4f9 Compare January 31, 2024 15:40
@Maratk1n
Copy link
Contributor Author

Thank you @lemenkov . Fixed.

@lemenkov
Copy link
Member

@orgads looks good to me. What's your opinion?

@orgads
Copy link
Contributor

orgads commented Jan 31, 2024

lgtm

@lemenkov lemenkov merged commit aa0c7da into SIPp:master Jan 31, 2024
7 checks passed
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.

3 participants