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

[Draft] Using EVP_PKEY in OpenSSH #445

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

beldmit
Copy link

@beldmit beldmit commented Sep 27, 2023

An attempt to use EVP_PKEY instead of RSA/DSA/EC structures

@@ -283,6 +288,103 @@ dh_pub_is_valid(const DH *dh, const BIGNUM *dh_pub)
int
dh_gen_key(DH *dh, int need)
{
#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)

Choose a reason for hiding this comment

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

If you are just going to switch over to EVP_PKEY, this should be possible without wholesale code duplication for OpenSSL 3.0 - The EVP_pkey interface isn't significantly different between 1.1.1 and 3.0.

Choose a reason for hiding this comment

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

I think as a first step you should separate out all the OpenSSL 3.0 stuff from this, and make a PR that ONLY converts to the EVP_PKEY API with the LibreSSL (1.1.1) api.

@@ -200,4 +302,48 @@ kex_dh_dec(struct kex *kex, const struct sshbuf *dh_blob,
sshbuf_free(buf);
return r;
}
#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)

Choose a reason for hiding this comment

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

Again, this is bringing in OpenSSL 3.0 stuff, not just converting to EVP_PKEY. I think a first step here is to convert to PKEY without including anything for 3.0, and to just have a minimal change that converts to the EVP_PKEY api with the 1.1.1. interface.

beldmit added a commit to beldmit/openssh-portable that referenced this pull request Oct 18, 2023
A truncated part of openssh#445
@beldmit beldmit mentioned this pull request Oct 18, 2023
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