Skip to content

Commit

Permalink
fix free
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Oct 28, 2024
1 parent 198d760 commit 8043057
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions openssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,12 @@ func SetFIPS(enabled bool) error {
C.go_openssl_ERR_clear_error()
return errors.New("openssl: FIPS mode not supported by any provider")
}
C.go_openssl_EVP_MD_free(md)

// Enable FIPS mode in the default properties.
if C.go_openssl_EVP_default_properties_enable_fips(nil, mode) != 1 {
return newOpenSSLError("EVP_default_properties_enable_fips")
}

C.go_openssl_EVP_MD_free(md)
return nil
default:
panic(errUnsupportedVersion())
Expand Down

0 comments on commit 8043057

Please sign in to comment.