Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse memory mapped files for `pkeyutl -rawin` #11677
Open
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was partially discussed in #8431, in which we added support to
pkeyutl
, through the new 3.0-rawin
argument, to support "oneshot" sign/verify operations (such as Ed25519/Ed448).At the moment we allocate a buffer as big as the filesize (hoping it does not fail) and use
BIO_read()
to copy the file contents into memory, before running the oneshot operation.openssl/apps/pkeyutl.c
Lines 692 to 703 in 5e427a4
It is desirable to use
mmap()
to avoid creating a buffer in the heap and copy the file contents into it, for performance and to better support large files.Unfortunately, quoting @levitte ,
So we need to enable the
mmap
alternative only on supported platforms.Good first issue
I am marking this as a good first issue, even if it is not necessarily meant for beginners.
Still it seems like a quite self-contained and bite-sized change, and could be a nice gateway item to start to familiarize with the project development process, and as good a starting point as any to dig into OpenSSL.