Skip to content

MacOS FIPS compliant app using FIPS OpenSSL doesn't restrict TLS ciphers to FIPS only #1521

Open
@lmaliniak

Description

@lmaliniak

I was able to build MacOS app using Microsoft Go fork after updating the patches to create openssl_darwin.go.
But, testing the Go app and capturing the advertised ciphers, they contain FIPS and non-FIPS, which is unexpected.
FIPS openssl vendor is installed and fips openssl config was verified. The FIPS mode is enabled in the app on runtime.
The gap from openssl_linux is the following:


if openssl.FIPS() {
		// FIPS mode is enabled,
		// so force FIPS mode for crypto/tls and crypto/x509.
		fipstls.Force()
	}
	sig.BoringCrypto()

Checking the code I understood that it is not allowed to import the fipstls package since it belongs to BoringCrypto. The comment in the top of the file is confusing because of the go build statement in tls.go.

//go:build boringcrypto || goexperiment.opensslcrypto || goexperiment.cngcrypto

// Package fipstls allows control over whether crypto/tls requires FIPS-approved settings.
// This package only exists with GOEXPERIMENT=boringcrypto, but the effects are independent
// of the use of BoringCrypto.

Trying to concatenate boringcrypto to the systemcrypto or opensslcrypto resulted in build error, when trying to build the application.
Trying to add the Force function in the openssl_darwin.go, it didn't have the effect of restricting the advertised TLS ciphers.
I understand that Linux is the only supported platform for BoringCrypto.
go/src/crypto/boring
[Can BoringCrypto be used only for Linux](https://stackoverflow.com/questions/75954995/can-boringcrypto-be-used-only-for-linux-linux-amd64-and-linux-arm64)

What is the recommended way to resolve above?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    fipsnew-platformSupport a platform new to the microsoft/go infrastructurequestionThis issue is a question about the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions