mirror of
https://github.com/libp2p/go-openssl.git
synced 2024-12-27 23:40:18 +08:00
6f143c2df6
This introduces this file: https://github.com/10gen/openssl/blob/master/fips.go Which was pointed to from this issue: https://github.com/spacemonkeygo/openssl/issues/37
22 lines
276 B
Go
22 lines
276 B
Go
// +build cgo
|
|
// +build -darwin
|
|
|
|
package openssl
|
|
|
|
/*
|
|
#include <openssl/ssl.h>
|
|
*/
|
|
import "C"
|
|
|
|
func FIPSModeSet(mode bool) error {
|
|
var r C.int
|
|
if mode {
|
|
r = C.FIPS_mode_set(1)
|
|
} else {
|
|
r = C.FIPS_mode_set(0)
|
|
}
|
|
if r != 1 {
|
|
return errorFromErrorQueue()
|
|
}
|
|
return nil
|
|
} |