Open ngie-eign opened 1 year ago
@emaste , @khorben: FYI
More work's required in order to get the program to compile cleanly with OpenSSL 3. I'll move this PR back to draft mode and fix those issues.
Is -DOPENSSL_API_COMPAT=0x10100000L
sufficient to build with OpenSSL 3.0 at least initially?
Is
-DOPENSSL_API_COMPAT=0x10100000L
sufficient to build with OpenSSL 3.0 at least initially?
Yes, but I want to clean this up so the folks in this project don't have to do it later.
Yes, but I want to clean this up so the folks in this project don't have to do it later.
Sounds good!
\o/
I've confirmed that the newest revision is functionally correct and produces the same values as it did previously -- I also compared the logic in the python hmac module to confirm that it was sane:
$ make check
./hmac-md5-test1 --short
key: this is a passcode
text: abcdefghijklmnop
digest: 369b855bac0edb31107b180d2b76ed31
./hmac-md5-test1 --long
key: this is a SUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPER LONG passcode
text: abcdefghijklmnop
digest: 54ecf5f3274c
./hmac-md5-test3 --short
key: this is a passcode
text: abcdefghijklmnop
digest: 369b855bac0edb31107b180d2b76ed31
./hmac-md5-test3 --long
key: this is a SUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPER LONG passcode
text: abcdefghijklmnop
digest: 54ecf5f3274c
./hmac-md5-test.py --short
key: this is a passcode
text: abcdefghijklmnop
digest: 369b855bac0e
./hmac-md5-test.py --long
key: this is a SUPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPER LONG passcode
text: abcdefghijklmnop
digest: 54ecf5f3274c
@emaste can you check and merge this PR?
@corecode it might be a little while, but I will put it on the list.
I presume we'd like @ngie-eign to squash the fixups into one commit?
@corecode it might be a little while, but I will put it on the list.
I presume we'd like @ngie-eign to squash the fixups into one commit?
Yes, I was planning on doing that. I left them as fixup commits to aid with reviewing.
OpenSSL 3 deprecated
SSL_library_init
andSSL_load_error_strings
in favor ofOPENSSL_init_ssl
. UseOPENSSL_init_ssl
when dealing with OpenSSL 1.1 and newer to unbreak the build with OpenSSL 3.OpenSSL 3 deprecated all of the
MD5_
APIs. Move to the equivalentEVP_MD
APIs so the code doesn't need to be pinned down to 1.1 compatible APIs and uplifted at a later date.Co-authored-by: Pierre Pronchery pierre@freebsdfoundation.org Co-authored-by: Ed Maste emaste@FreeBSD.org Signed-off-by: Enji Cooper yaneurabeya@gmail.com Sponsored by: The FreeBSD Foundation