spacemonkeygo / openssl

OpenSSL bindings for Go
http://godoc.org/github.com/spacemonkeygo/openssl
Apache License 2.0
472 stars 237 forks source link

Update fips.go for OpenSSL 3.x compatability #154

Open ricky-charlet opened 2 years ago

ricky-charlet commented 2 years ago

openssl 1.X api FIPS_mode_set() was deprecated and replaced with EVP_default_properties_enable_fips()

modify fips.go so it can link with libcrypto in the presence of a build with openssl 3.x

ricky-charlet commented 2 years ago

not yet tested. Fri Jun 24 3pm PST. do not merge yet...

ricky-charlet commented 2 years ago

Actually, this will fail in the presence of older openssl versions. You probably should not merge this.

srajesh-elisity commented 1 year ago

Based on the install HOST openssl version, Could we call FIPS_mode_set() or EVP_default_properties_enable_fips() ??

ricky-charlet commented 1 year ago

Yes, Rajesh-elisity. That sounds like the right approach.

ricky-charlet commented 1 year ago

My patch, as it is, succeeds in the presence of opnessl1.1+ or 3.x but fails in the presence of openssl1.0 or lower.