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

NetSSL Context throws on not implemented DH group #4877

Closed
SinghRajenM opened this issue Feb 19, 2025 · 0 comments · Fixed by #4878
Closed

NetSSL Context throws on not implemented DH group #4877

SinghRajenM opened this issue Feb 19, 2025 · 0 comments · Fixed by #4878

Comments

@SinghRajenM
Copy link
Contributor

Describe the bug
In below code snippet, it seems the else (line 976) case is missing. Please confirm if it is bug, I can submit PR if required.

if (keyDHGroup == KEY_DH_GROUP_2048)
{
dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), 0);
dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), 0);
dh->length = 256;
}
else if (keyDHGroup == KEY_DH_GROUP_1024)
{
dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0);
dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0);
dh->length = 160;
}
{
throw Poco::NotImplementedException(Poco::format(
"DH Group: %d", static_cast<int>(keyDHGroup)));
}

SinghRajenM added a commit to SinghRajenM/poco that referenced this issue Feb 20, 2025
Fixes crash for openssl 1.0.x

#fixes pocoproject#4877
aleks-f pushed a commit that referenced this issue Feb 22, 2025
Fixes crash for openssl 1.0.x

#fixes #4877
@aleks-f aleks-f added this to the Release 1.15.0 milestone Feb 22, 2025
@aleks-f aleks-f added the fixed label Feb 22, 2025
@aleks-f aleks-f changed the title Seems to be a bug in NetSSL_OpenSSL/src/Context.cpp NetSSL Context throws on not implemented DH group Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants